From a6fc0abf2aba7c395f6e1a8e07d9987243ce2326 Mon Sep 17 00:00:00 2001 From: Ujjwal Kumar <78945437+ujjwal-ibm@users.noreply.github.com> Date: Mon, 13 May 2024 09:47:37 +0530 Subject: [PATCH] feat(spec): updated the sdk as per the api spec released on 2024-05-10 (#92) Signed-off-by: Ujjwal Kumar --- common/headers.go | 5 + go.mod | 17 +- go.sum | 62 +- vpcv1/vpc_v1.go | 14839 +++++++++++++++++++++++++++++++++++---- vpcv1/vpc_v1_test.go | 15485 ++++++++++++++++++++++++++++++++++++----- 5 files changed, 27609 insertions(+), 2799 deletions(-) diff --git a/common/headers.go b/common/headers.go index 62651e4..ec4e7f8 100644 --- a/common/headers.go +++ b/common/headers.go @@ -4,6 +4,7 @@ import ( "fmt" "runtime" + "github.com/IBM/go-sdk-core/v5/core" "github.com/google/uuid" ) @@ -59,3 +60,7 @@ var systemInfo = fmt.Sprintf("(arch=%s; os=%s; go.version=%s)", runtime.GOARCH, func GetSystemInfo() string { return systemInfo } + +func GetComponentInfo() *core.ProblemComponent { + return core.NewProblemComponent("github.com/IBM/vpc-go-sdk", Version) +} diff --git a/go.mod b/go.mod index 54dc92b..74541ff 100644 --- a/go.mod +++ b/go.mod @@ -3,8 +3,7 @@ module github.com/IBM/vpc-go-sdk go 1.18 require ( - github.com/IBM/go-sdk-core/v5 v5.15.1 - github.com/go-openapi/strfmt v0.22.0 + github.com/IBM/go-sdk-core/v5 v5.16.2 github.com/google/uuid v1.6.0 github.com/onsi/ginkgo v1.16.5 github.com/onsi/gomega v1.27.6 @@ -17,23 +16,25 @@ require ( github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gabriel-vasile/mimetype v1.4.3 // indirect github.com/go-openapi/errors v0.21.0 // indirect + github.com/go-openapi/strfmt v0.22.1 // indirect 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/go-playground/validator/v10 v10.18.0 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-retryablehttp v0.7.5 // indirect - github.com/leodido/go-urn v1.3.0 // indirect + github.com/leodido/go-urn v1.4.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/nxadm/tail v1.4.8 // indirect github.com/oklog/ulid v1.3.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.mongodb.org/mongo-driver v1.13.1 // indirect - golang.org/x/crypto v0.18.0 // indirect - golang.org/x/net v0.20.0 // indirect - golang.org/x/sys v0.16.0 // indirect + go.mongodb.org/mongo-driver v1.14.0 // indirect + golang.org/x/crypto v0.19.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/sys v0.17.0 // indirect golang.org/x/text v0.14.0 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 6ebd23b..cf7b715 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/IBM/go-sdk-core/v5 v5.15.1 h1:XOzNZbBgnlxOGK1JMMBtZJYSVguK4TFPJiYutuzFmdA= -github.com/IBM/go-sdk-core/v5 v5.15.1/go.mod h1:so2mbdIgSp6X8Zm/qLV+whdchTGgi04c3j4xFMsqlCc= +github.com/IBM/go-sdk-core/v5 v5.16.2 h1:4psKDqjN6mPacgbaRjV/qcYtXlnAEISLJF/QQa7FQqo= +github.com/IBM/go-sdk-core/v5 v5.16.2/go.mod h1:aojBkkq4HXkOYdn7YZ6ve8cjPWHdcB3tt8v0b9Cbac8= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -14,15 +14,15 @@ github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcP github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-openapi/errors v0.21.0 h1:FhChC/duCnfoLj1gZ0BgaBmzhJC2SL/sJr8a2vAobSY= github.com/go-openapi/errors v0.21.0/go.mod h1:jxNTMUxRCKj65yb/okJGEtahVd7uvWnuWfj53bse4ho= -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/strfmt v0.22.1 h1:5Ky8cybT4576C6Ffc+8gYji/wRXCo6Ozm8RaWjPI6jc= +github.com/go-openapi/strfmt v0.22.1/go.mod h1:OfVoytIXJasDkkGvkb1Cceb3BPyMOwk1FgmyyEw7NYg= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= 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/go-playground/validator/v10 v10.18.0 h1:BvolUXjp4zuvkZ5YN5t7ebzbhlUtPsPm2S9NAZ5nl9U= +github.com/go-playground/validator/v10 v10.18.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -33,11 +33,9 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE= @@ -50,13 +48,11 @@ github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrj github.com/hashicorp/go-retryablehttp v0.7.5 h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT9yvm0e+Nd5M= github.com/hashicorp/go-retryablehttp v0.7.5/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/leodido/go-urn v1.3.0 h1:jX8FDLfW4ThVXctBNZ+3cIWnCSnrACDV73r76dy0aQQ= -github.com/leodido/go-urn v1.3.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= +github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= +github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= 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/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= @@ -79,37 +75,25 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= 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.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.mongodb.org/mongo-driver v1.14.0 h1:P98w8egYRjYe3XDjxhYJagTokP/H6HzlsnojRgZRd80= +go.mongodb.org/mongo-driver v1.14.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -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.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= -golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= +golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -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.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= -golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/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-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -118,29 +102,17 @@ golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/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.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= -golang.org/x/sys v0.16.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/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 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.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -161,5 +133,7 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWD gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/vpcv1/vpc_v1.go b/vpcv1/vpc_v1.go index 1f60e8f..a62a526 100644 --- a/vpcv1/vpc_v1.go +++ b/vpcv1/vpc_v1.go @@ -15,7 +15,7 @@ */ /* - * IBM OpenAPI SDK Code Generator Version: 3.85.0-75c38f8f-20240206-210220 + * IBM OpenAPI SDK Code Generator Version: 3.88.0-b0b4c159-20240402-205910 */ // Package vpcv1 : Operations and models for the VpcV1 service @@ -38,7 +38,7 @@ import ( // VpcV1 : The IBM Cloud Virtual Private Cloud (VPC) API can be used to programmatically provision and manage virtual // server instances, along with subnets, volumes, load balancers, and more. // -// API Version: 2024-03-26 +// API Version: 2024-05-10 type VpcV1 struct { Service *core.BaseService @@ -46,8 +46,8 @@ type VpcV1 struct { // `2`. generation *int64 - // The API version, in format `YYYY-MM-DD`. For the API behavior documented here, specify any date between `2023-12-05` - // and `2024-03-26`. + // The API version, in format `YYYY-MM-DD`. For the API behavior documented here, specify any date between `2024-04-30` + // and `2024-05-10`. Version *string } @@ -63,8 +63,8 @@ type VpcV1Options struct { URL string Authenticator core.Authenticator - // The API version, in format `YYYY-MM-DD`. For the API behavior documented here, specify any date between `2023-12-05` - // and `2024-03-26`. + // The API version, in format `YYYY-MM-DD`. For the API behavior documented here, specify any date between `2024-04-30` + // and `2024-05-10`. Version *string } @@ -77,22 +77,26 @@ func NewVpcV1UsingExternalConfig(options *VpcV1Options) (vpc *VpcV1, err error) if options.Authenticator == nil { options.Authenticator, err = core.GetAuthenticatorFromEnvironment(options.ServiceName) if err != nil { + err = core.SDKErrorf(err, "", "env-auth-error", common.GetComponentInfo()) return } } vpc, err = NewVpcV1(options) + err = core.RepurposeSDKProblem(err, "new-client-error") if err != nil { return } err = vpc.Service.ConfigureService(options.ServiceName) if err != nil { + err = core.SDKErrorf(err, "", "client-config-error", common.GetComponentInfo()) return } if options.URL != "" { err = vpc.Service.SetServiceURL(options.URL) + err = core.RepurposeSDKProblem(err, "url-set-error") } return } @@ -106,23 +110,26 @@ func NewVpcV1(options *VpcV1Options) (service *VpcV1, err error) { err = core.ValidateStruct(options, "options") if err != nil { + err = core.SDKErrorf(err, "", "invalid-global-options", common.GetComponentInfo()) return } baseService, err := core.NewBaseService(serviceOptions) if err != nil { + err = core.SDKErrorf(err, "", "new-base-error", common.GetComponentInfo()) return } if options.URL != "" { err = baseService.SetServiceURL(options.URL) if err != nil { + err = core.SDKErrorf(err, "", "set-url-error", common.GetComponentInfo()) return } } if options.Version == nil { - options.Version = core.StringPtr("2024-03-19") + options.Version = core.StringPtr("2024-04-30") } service = &VpcV1{ @@ -136,7 +143,7 @@ func NewVpcV1(options *VpcV1Options) (service *VpcV1, err error) { // GetServiceURLForRegion returns the service URL to be used for the specified region func GetServiceURLForRegion(region string) (string, error) { - return "", fmt.Errorf("service does not support regional URLs") + return "", core.SDKErrorf(nil, "service does not support regional URLs", "no-regional-support", common.GetComponentInfo()) } // Clone makes a copy of "vpc" suitable for processing requests. @@ -151,7 +158,11 @@ func (vpc *VpcV1) Clone() *VpcV1 { // SetServiceURL sets the service URL func (vpc *VpcV1) SetServiceURL(url string) error { - return vpc.Service.SetServiceURL(url) + err := vpc.Service.SetServiceURL(url) + if err != nil { + err = core.SDKErrorf(err, "", "url-set-error", common.GetComponentInfo()) + } + return err } // GetServiceURL returns the service URL @@ -190,13 +201,16 @@ func (vpc *VpcV1) DisableRetries() { // isolation from other networks. A VPC is made up of resources in one or more zones. VPCs are regional, and each VPC // can contain resources in multiple zones in a region. func (vpc *VpcV1) ListVpcs(listVpcsOptions *ListVpcsOptions) (result *VPCCollection, response *core.DetailedResponse, err error) { - return vpc.ListVpcsWithContext(context.Background(), listVpcsOptions) + result, response, err = vpc.ListVpcsWithContext(context.Background(), listVpcsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListVpcsWithContext is an alternate form of the ListVpcs method which supports a Context parameter func (vpc *VpcV1) ListVpcsWithContext(ctx context.Context, listVpcsOptions *ListVpcsOptions) (result *VPCCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listVpcsOptions, "listVpcsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -205,6 +219,7 @@ func (vpc *VpcV1) ListVpcsWithContext(ctx context.Context, listVpcsOptions *List builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -235,17 +250,21 @@ func (vpc *VpcV1) ListVpcsWithContext(ctx context.Context, listVpcsOptions *List request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_vpcs", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPCCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -258,13 +277,16 @@ func (vpc *VpcV1) ListVpcsWithContext(ctx context.Context, listVpcsOptions *List // This request creates a new VPC from a VPC prototype object. The prototype object is structured in the same way as a // retrieved VPC, and contains the information necessary to create the new VPC. func (vpc *VpcV1) CreateVPC(createVPCOptions *CreateVPCOptions) (result *VPC, response *core.DetailedResponse, err error) { - return vpc.CreateVPCWithContext(context.Background(), createVPCOptions) + result, response, err = vpc.CreateVPCWithContext(context.Background(), createVPCOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateVPCWithContext is an alternate form of the CreateVPC method which supports a Context parameter func (vpc *VpcV1) CreateVPCWithContext(ctx context.Context, createVPCOptions *CreateVPCOptions) (result *VPC, response *core.DetailedResponse, err error) { err = core.ValidateStruct(createVPCOptions, "createVPCOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -273,6 +295,7 @@ func (vpc *VpcV1) CreateVPCWithContext(ctx context.Context, createVPCOptions *Cr builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -308,22 +331,27 @@ func (vpc *VpcV1) CreateVPCWithContext(ctx context.Context, createVPCOptions *Cr } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_vpc", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPC) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -343,17 +371,21 @@ func (vpc *VpcV1) CreateVPCWithContext(ctx context.Context, createVPCOptions *Cr // All security groups and network ACLs associated with the VPC are automatically deleted. All flow log collectors with // `auto_delete` set to `true` targeting the VPC or any resource in the VPC are automatically deleted. func (vpc *VpcV1) DeleteVPC(deleteVPCOptions *DeleteVPCOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteVPCWithContext(context.Background(), deleteVPCOptions) + response, err = vpc.DeleteVPCWithContext(context.Background(), deleteVPCOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteVPCWithContext is an alternate form of the DeleteVPC method which supports a Context parameter func (vpc *VpcV1) DeleteVPCWithContext(ctx context.Context, deleteVPCOptions *DeleteVPCOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteVPCOptions, "deleteVPCOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteVPCOptions, "deleteVPCOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -366,6 +398,7 @@ func (vpc *VpcV1) DeleteVPCWithContext(ctx context.Context, deleteVPCOptions *De builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -386,10 +419,16 @@ func (vpc *VpcV1) DeleteVPCWithContext(ctx context.Context, deleteVPCOptions *De request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_vpc", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -397,17 +436,21 @@ func (vpc *VpcV1) DeleteVPCWithContext(ctx context.Context, deleteVPCOptions *De // GetVPC : Retrieve a VPC // This request retrieves a single VPC specified by the identifier in the URL. func (vpc *VpcV1) GetVPC(getVPCOptions *GetVPCOptions) (result *VPC, response *core.DetailedResponse, err error) { - return vpc.GetVPCWithContext(context.Background(), getVPCOptions) + result, response, err = vpc.GetVPCWithContext(context.Background(), getVPCOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetVPCWithContext is an alternate form of the GetVPC method which supports a Context parameter func (vpc *VpcV1) GetVPCWithContext(ctx context.Context, getVPCOptions *GetVPCOptions) (result *VPC, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getVPCOptions, "getVPCOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getVPCOptions, "getVPCOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -420,6 +463,7 @@ func (vpc *VpcV1) GetVPCWithContext(ctx context.Context, getVPCOptions *GetVPCOp builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -438,17 +482,21 @@ func (vpc *VpcV1) GetVPCWithContext(ctx context.Context, getVPCOptions *GetVPCOp request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_vpc", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPC) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -461,17 +509,21 @@ func (vpc *VpcV1) GetVPCWithContext(ctx context.Context, getVPCOptions *GetVPCOp // This request updates a VPC with the information provided in a VPC patch object. The patch object is structured in the // same way as a retrieved VPC and needs to contain only the information to be updated. func (vpc *VpcV1) UpdateVPC(updateVPCOptions *UpdateVPCOptions) (result *VPC, response *core.DetailedResponse, err error) { - return vpc.UpdateVPCWithContext(context.Background(), updateVPCOptions) + result, response, err = vpc.UpdateVPCWithContext(context.Background(), updateVPCOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateVPCWithContext is an alternate form of the UpdateVPC method which supports a Context parameter func (vpc *VpcV1) UpdateVPCWithContext(ctx context.Context, updateVPCOptions *UpdateVPCOptions) (result *VPC, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateVPCOptions, "updateVPCOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateVPCOptions, "updateVPCOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -484,6 +536,7 @@ func (vpc *VpcV1) UpdateVPCWithContext(ctx context.Context, updateVPCOptions *Up builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -506,22 +559,27 @@ func (vpc *VpcV1) UpdateVPCWithContext(ctx context.Context, updateVPCOptions *Up _, err = builder.SetBodyContentJSON(updateVPCOptions.VPCPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_vpc", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPC) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -534,17 +592,21 @@ func (vpc *VpcV1) UpdateVPCWithContext(ctx context.Context, updateVPCOptions *Up // This request retrieves the default network ACL for the VPC specified by the identifier in the URL. The default // network ACL is applied to any new subnets in the VPC which do not specify a network ACL. func (vpc *VpcV1) GetVPCDefaultNetworkACL(getVPCDefaultNetworkACLOptions *GetVPCDefaultNetworkACLOptions) (result *DefaultNetworkACL, response *core.DetailedResponse, err error) { - return vpc.GetVPCDefaultNetworkACLWithContext(context.Background(), getVPCDefaultNetworkACLOptions) + result, response, err = vpc.GetVPCDefaultNetworkACLWithContext(context.Background(), getVPCDefaultNetworkACLOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetVPCDefaultNetworkACLWithContext is an alternate form of the GetVPCDefaultNetworkACL method which supports a Context parameter func (vpc *VpcV1) GetVPCDefaultNetworkACLWithContext(ctx context.Context, getVPCDefaultNetworkACLOptions *GetVPCDefaultNetworkACLOptions) (result *DefaultNetworkACL, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getVPCDefaultNetworkACLOptions, "getVPCDefaultNetworkACLOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getVPCDefaultNetworkACLOptions, "getVPCDefaultNetworkACLOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -557,6 +619,7 @@ func (vpc *VpcV1) GetVPCDefaultNetworkACLWithContext(ctx context.Context, getVPC builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{id}/default_network_acl`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -575,17 +638,21 @@ func (vpc *VpcV1) GetVPCDefaultNetworkACLWithContext(ctx context.Context, getVPC request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_vpc_default_network_acl", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDefaultNetworkACL) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -599,17 +666,21 @@ func (vpc *VpcV1) GetVPCDefaultNetworkACLWithContext(ctx context.Context, getVPC // routing table is associated with any subnets in the VPC which have not been explicitly associated with another // routing table. func (vpc *VpcV1) GetVPCDefaultRoutingTable(getVPCDefaultRoutingTableOptions *GetVPCDefaultRoutingTableOptions) (result *DefaultRoutingTable, response *core.DetailedResponse, err error) { - return vpc.GetVPCDefaultRoutingTableWithContext(context.Background(), getVPCDefaultRoutingTableOptions) + result, response, err = vpc.GetVPCDefaultRoutingTableWithContext(context.Background(), getVPCDefaultRoutingTableOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetVPCDefaultRoutingTableWithContext is an alternate form of the GetVPCDefaultRoutingTable method which supports a Context parameter func (vpc *VpcV1) GetVPCDefaultRoutingTableWithContext(ctx context.Context, getVPCDefaultRoutingTableOptions *GetVPCDefaultRoutingTableOptions) (result *DefaultRoutingTable, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getVPCDefaultRoutingTableOptions, "getVPCDefaultRoutingTableOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getVPCDefaultRoutingTableOptions, "getVPCDefaultRoutingTableOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -622,6 +693,7 @@ func (vpc *VpcV1) GetVPCDefaultRoutingTableWithContext(ctx context.Context, getV builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{id}/default_routing_table`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -640,17 +712,21 @@ func (vpc *VpcV1) GetVPCDefaultRoutingTableWithContext(ctx context.Context, getV request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_vpc_default_routing_table", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDefaultRoutingTable) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -663,17 +739,21 @@ func (vpc *VpcV1) GetVPCDefaultRoutingTableWithContext(ctx context.Context, getV // This request retrieves the default security group for the VPC specified by the identifier in the URL. Resources // created in this VPC that allow a security group to be optionally specified will use this security group by default. func (vpc *VpcV1) GetVPCDefaultSecurityGroup(getVPCDefaultSecurityGroupOptions *GetVPCDefaultSecurityGroupOptions) (result *DefaultSecurityGroup, response *core.DetailedResponse, err error) { - return vpc.GetVPCDefaultSecurityGroupWithContext(context.Background(), getVPCDefaultSecurityGroupOptions) + result, response, err = vpc.GetVPCDefaultSecurityGroupWithContext(context.Background(), getVPCDefaultSecurityGroupOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetVPCDefaultSecurityGroupWithContext is an alternate form of the GetVPCDefaultSecurityGroup method which supports a Context parameter func (vpc *VpcV1) GetVPCDefaultSecurityGroupWithContext(ctx context.Context, getVPCDefaultSecurityGroupOptions *GetVPCDefaultSecurityGroupOptions) (result *DefaultSecurityGroup, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getVPCDefaultSecurityGroupOptions, "getVPCDefaultSecurityGroupOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getVPCDefaultSecurityGroupOptions, "getVPCDefaultSecurityGroupOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -686,6 +766,7 @@ func (vpc *VpcV1) GetVPCDefaultSecurityGroupWithContext(ctx context.Context, get builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{id}/default_security_group`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -704,17 +785,21 @@ func (vpc *VpcV1) GetVPCDefaultSecurityGroupWithContext(ctx context.Context, get request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_vpc_default_security_group", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDefaultSecurityGroup) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -726,17 +811,21 @@ func (vpc *VpcV1) GetVPCDefaultSecurityGroupWithContext(ctx context.Context, get // ListVPCAddressPrefixes : List all address prefixes for a VPC // This request lists all address pool prefixes for a VPC. func (vpc *VpcV1) ListVPCAddressPrefixes(listVPCAddressPrefixesOptions *ListVPCAddressPrefixesOptions) (result *AddressPrefixCollection, response *core.DetailedResponse, err error) { - return vpc.ListVPCAddressPrefixesWithContext(context.Background(), listVPCAddressPrefixesOptions) + result, response, err = vpc.ListVPCAddressPrefixesWithContext(context.Background(), listVPCAddressPrefixesOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListVPCAddressPrefixesWithContext is an alternate form of the ListVPCAddressPrefixes method which supports a Context parameter func (vpc *VpcV1) ListVPCAddressPrefixesWithContext(ctx context.Context, listVPCAddressPrefixesOptions *ListVPCAddressPrefixesOptions) (result *AddressPrefixCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listVPCAddressPrefixesOptions, "listVPCAddressPrefixesOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listVPCAddressPrefixesOptions, "listVPCAddressPrefixesOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -749,6 +838,7 @@ func (vpc *VpcV1) ListVPCAddressPrefixesWithContext(ctx context.Context, listVPC builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/address_prefixes`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -773,17 +863,21 @@ func (vpc *VpcV1) ListVPCAddressPrefixesWithContext(ctx context.Context, listVPC request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_vpc_address_prefixes", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalAddressPrefixCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -796,17 +890,21 @@ func (vpc *VpcV1) ListVPCAddressPrefixesWithContext(ctx context.Context, listVPC // This request creates a new prefix from a prefix prototype object. The prototype object is structured in the same way // as a retrieved prefix, and contains the information necessary to create the new prefix. func (vpc *VpcV1) CreateVPCAddressPrefix(createVPCAddressPrefixOptions *CreateVPCAddressPrefixOptions) (result *AddressPrefix, response *core.DetailedResponse, err error) { - return vpc.CreateVPCAddressPrefixWithContext(context.Background(), createVPCAddressPrefixOptions) + result, response, err = vpc.CreateVPCAddressPrefixWithContext(context.Background(), createVPCAddressPrefixOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateVPCAddressPrefixWithContext is an alternate form of the CreateVPCAddressPrefix method which supports a Context parameter func (vpc *VpcV1) CreateVPCAddressPrefixWithContext(ctx context.Context, createVPCAddressPrefixOptions *CreateVPCAddressPrefixOptions) (result *AddressPrefix, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createVPCAddressPrefixOptions, "createVPCAddressPrefixOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createVPCAddressPrefixOptions, "createVPCAddressPrefixOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -819,6 +917,7 @@ func (vpc *VpcV1) CreateVPCAddressPrefixWithContext(ctx context.Context, createV builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/address_prefixes`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -851,22 +950,27 @@ func (vpc *VpcV1) CreateVPCAddressPrefixWithContext(ctx context.Context, createV } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_vpc_address_prefix", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalAddressPrefix) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -879,17 +983,21 @@ func (vpc *VpcV1) CreateVPCAddressPrefixWithContext(ctx context.Context, createV // This request deletes a prefix. This operation cannot be reversed. The request will fail if any subnets use addresses // from this prefix. func (vpc *VpcV1) DeleteVPCAddressPrefix(deleteVPCAddressPrefixOptions *DeleteVPCAddressPrefixOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteVPCAddressPrefixWithContext(context.Background(), deleteVPCAddressPrefixOptions) + response, err = vpc.DeleteVPCAddressPrefixWithContext(context.Background(), deleteVPCAddressPrefixOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteVPCAddressPrefixWithContext is an alternate form of the DeleteVPCAddressPrefix method which supports a Context parameter func (vpc *VpcV1) DeleteVPCAddressPrefixWithContext(ctx context.Context, deleteVPCAddressPrefixOptions *DeleteVPCAddressPrefixOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteVPCAddressPrefixOptions, "deleteVPCAddressPrefixOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteVPCAddressPrefixOptions, "deleteVPCAddressPrefixOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -903,6 +1011,7 @@ func (vpc *VpcV1) DeleteVPCAddressPrefixWithContext(ctx context.Context, deleteV builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/address_prefixes/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -920,10 +1029,16 @@ func (vpc *VpcV1) DeleteVPCAddressPrefixWithContext(ctx context.Context, deleteV request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_vpc_address_prefix", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -931,17 +1046,21 @@ func (vpc *VpcV1) DeleteVPCAddressPrefixWithContext(ctx context.Context, deleteV // GetVPCAddressPrefix : Retrieve an address prefix // This request retrieves a single prefix specified by the identifier in the URL. func (vpc *VpcV1) GetVPCAddressPrefix(getVPCAddressPrefixOptions *GetVPCAddressPrefixOptions) (result *AddressPrefix, response *core.DetailedResponse, err error) { - return vpc.GetVPCAddressPrefixWithContext(context.Background(), getVPCAddressPrefixOptions) + result, response, err = vpc.GetVPCAddressPrefixWithContext(context.Background(), getVPCAddressPrefixOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetVPCAddressPrefixWithContext is an alternate form of the GetVPCAddressPrefix method which supports a Context parameter func (vpc *VpcV1) GetVPCAddressPrefixWithContext(ctx context.Context, getVPCAddressPrefixOptions *GetVPCAddressPrefixOptions) (result *AddressPrefix, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getVPCAddressPrefixOptions, "getVPCAddressPrefixOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getVPCAddressPrefixOptions, "getVPCAddressPrefixOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -955,6 +1074,7 @@ func (vpc *VpcV1) GetVPCAddressPrefixWithContext(ctx context.Context, getVPCAddr builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/address_prefixes/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -973,17 +1093,21 @@ func (vpc *VpcV1) GetVPCAddressPrefixWithContext(ctx context.Context, getVPCAddr request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_vpc_address_prefix", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalAddressPrefix) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -996,17 +1120,21 @@ func (vpc *VpcV1) GetVPCAddressPrefixWithContext(ctx context.Context, getVPCAddr // This request updates a prefix with the information in a provided prefix patch. The prefix patch object is structured // in the same way as a retrieved prefix and contains only the information to be updated. func (vpc *VpcV1) UpdateVPCAddressPrefix(updateVPCAddressPrefixOptions *UpdateVPCAddressPrefixOptions) (result *AddressPrefix, response *core.DetailedResponse, err error) { - return vpc.UpdateVPCAddressPrefixWithContext(context.Background(), updateVPCAddressPrefixOptions) + result, response, err = vpc.UpdateVPCAddressPrefixWithContext(context.Background(), updateVPCAddressPrefixOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateVPCAddressPrefixWithContext is an alternate form of the UpdateVPCAddressPrefix method which supports a Context parameter func (vpc *VpcV1) UpdateVPCAddressPrefixWithContext(ctx context.Context, updateVPCAddressPrefixOptions *UpdateVPCAddressPrefixOptions) (result *AddressPrefix, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateVPCAddressPrefixOptions, "updateVPCAddressPrefixOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateVPCAddressPrefixOptions, "updateVPCAddressPrefixOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -1020,6 +1148,7 @@ func (vpc *VpcV1) UpdateVPCAddressPrefixWithContext(ctx context.Context, updateV builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/address_prefixes/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -1039,22 +1168,27 @@ func (vpc *VpcV1) UpdateVPCAddressPrefixWithContext(ctx context.Context, updateV _, err = builder.SetBodyContentJSON(updateVPCAddressPrefixOptions.AddressPrefixPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_vpc_address_prefix", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalAddressPrefix) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -1081,17 +1215,21 @@ func (vpc *VpcV1) UpdateVPCAddressPrefixWithContext(ctx context.Context, updateV // The bindings will be sorted by their `created_at` property values, with newest bindings first. Bindings with // identical `created_at` property values will in turn be sorted by ascending `name` property values. func (vpc *VpcV1) ListVPCDnsResolutionBindings(listVPCDnsResolutionBindingsOptions *ListVPCDnsResolutionBindingsOptions) (result *VpcdnsResolutionBindingCollection, response *core.DetailedResponse, err error) { - return vpc.ListVPCDnsResolutionBindingsWithContext(context.Background(), listVPCDnsResolutionBindingsOptions) + result, response, err = vpc.ListVPCDnsResolutionBindingsWithContext(context.Background(), listVPCDnsResolutionBindingsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListVPCDnsResolutionBindingsWithContext is an alternate form of the ListVPCDnsResolutionBindings method which supports a Context parameter func (vpc *VpcV1) ListVPCDnsResolutionBindingsWithContext(ctx context.Context, listVPCDnsResolutionBindingsOptions *ListVPCDnsResolutionBindingsOptions) (result *VpcdnsResolutionBindingCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listVPCDnsResolutionBindingsOptions, "listVPCDnsResolutionBindingsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listVPCDnsResolutionBindingsOptions, "listVPCDnsResolutionBindingsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -1104,6 +1242,7 @@ func (vpc *VpcV1) ListVPCDnsResolutionBindingsWithContext(ctx context.Context, l builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/dns_resolution_bindings`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -1143,17 +1282,21 @@ func (vpc *VpcV1) ListVPCDnsResolutionBindingsWithContext(ctx context.Context, l request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_vpc_dns_resolution_bindings", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVpcdnsResolutionBindingCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -1172,17 +1315,21 @@ func (vpc *VpcV1) ListVPCDnsResolutionBindingsWithContext(ctx context.Context, l // // See [About DNS sharing for VPE gateways](/docs/vpc?topic=vpc-hub-spoke-model) for more information. func (vpc *VpcV1) CreateVPCDnsResolutionBinding(createVPCDnsResolutionBindingOptions *CreateVPCDnsResolutionBindingOptions) (result *VpcdnsResolutionBinding, response *core.DetailedResponse, err error) { - return vpc.CreateVPCDnsResolutionBindingWithContext(context.Background(), createVPCDnsResolutionBindingOptions) + result, response, err = vpc.CreateVPCDnsResolutionBindingWithContext(context.Background(), createVPCDnsResolutionBindingOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateVPCDnsResolutionBindingWithContext is an alternate form of the CreateVPCDnsResolutionBinding method which supports a Context parameter func (vpc *VpcV1) CreateVPCDnsResolutionBindingWithContext(ctx context.Context, createVPCDnsResolutionBindingOptions *CreateVPCDnsResolutionBindingOptions) (result *VpcdnsResolutionBinding, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createVPCDnsResolutionBindingOptions, "createVPCDnsResolutionBindingOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createVPCDnsResolutionBindingOptions, "createVPCDnsResolutionBindingOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -1195,6 +1342,7 @@ func (vpc *VpcV1) CreateVPCDnsResolutionBindingWithContext(ctx context.Context, builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/dns_resolution_bindings`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -1221,22 +1369,27 @@ func (vpc *VpcV1) CreateVPCDnsResolutionBindingWithContext(ctx context.Context, } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_vpc_dns_resolution_binding", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVpcdnsResolutionBinding) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -1251,17 +1404,21 @@ func (vpc *VpcV1) CreateVPCDnsResolutionBindingWithContext(ctx context.Context, // For this request to succeed, the VPC specified by the identifier in the URL must not have // `dns.resolver.type` set to `delegated`. func (vpc *VpcV1) DeleteVPCDnsResolutionBinding(deleteVPCDnsResolutionBindingOptions *DeleteVPCDnsResolutionBindingOptions) (result *VpcdnsResolutionBinding, response *core.DetailedResponse, err error) { - return vpc.DeleteVPCDnsResolutionBindingWithContext(context.Background(), deleteVPCDnsResolutionBindingOptions) + result, response, err = vpc.DeleteVPCDnsResolutionBindingWithContext(context.Background(), deleteVPCDnsResolutionBindingOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteVPCDnsResolutionBindingWithContext is an alternate form of the DeleteVPCDnsResolutionBinding method which supports a Context parameter func (vpc *VpcV1) DeleteVPCDnsResolutionBindingWithContext(ctx context.Context, deleteVPCDnsResolutionBindingOptions *DeleteVPCDnsResolutionBindingOptions) (result *VpcdnsResolutionBinding, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteVPCDnsResolutionBindingOptions, "deleteVPCDnsResolutionBindingOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteVPCDnsResolutionBindingOptions, "deleteVPCDnsResolutionBindingOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -1275,6 +1432,7 @@ func (vpc *VpcV1) DeleteVPCDnsResolutionBindingWithContext(ctx context.Context, builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/dns_resolution_bindings/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -1293,17 +1451,21 @@ func (vpc *VpcV1) DeleteVPCDnsResolutionBindingWithContext(ctx context.Context, request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "delete_vpc_dns_resolution_binding", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVpcdnsResolutionBinding) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -1315,17 +1477,21 @@ func (vpc *VpcV1) DeleteVPCDnsResolutionBindingWithContext(ctx context.Context, // GetVPCDnsResolutionBinding : Retrieve a DNS resolution binding // This request retrieves a single DNS resolution binding specified by the identifier in the URL. func (vpc *VpcV1) GetVPCDnsResolutionBinding(getVPCDnsResolutionBindingOptions *GetVPCDnsResolutionBindingOptions) (result *VpcdnsResolutionBinding, response *core.DetailedResponse, err error) { - return vpc.GetVPCDnsResolutionBindingWithContext(context.Background(), getVPCDnsResolutionBindingOptions) + result, response, err = vpc.GetVPCDnsResolutionBindingWithContext(context.Background(), getVPCDnsResolutionBindingOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetVPCDnsResolutionBindingWithContext is an alternate form of the GetVPCDnsResolutionBinding method which supports a Context parameter func (vpc *VpcV1) GetVPCDnsResolutionBindingWithContext(ctx context.Context, getVPCDnsResolutionBindingOptions *GetVPCDnsResolutionBindingOptions) (result *VpcdnsResolutionBinding, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getVPCDnsResolutionBindingOptions, "getVPCDnsResolutionBindingOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getVPCDnsResolutionBindingOptions, "getVPCDnsResolutionBindingOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -1339,6 +1505,7 @@ func (vpc *VpcV1) GetVPCDnsResolutionBindingWithContext(ctx context.Context, get builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/dns_resolution_bindings/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -1357,17 +1524,21 @@ func (vpc *VpcV1) GetVPCDnsResolutionBindingWithContext(ctx context.Context, get request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_vpc_dns_resolution_binding", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVpcdnsResolutionBinding) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -1381,17 +1552,21 @@ func (vpc *VpcV1) GetVPCDnsResolutionBindingWithContext(ctx context.Context, get // DNS resolution binding patch object is structured in the same way as a retrieved DNS resolution binding and contains // only the information to be updated. func (vpc *VpcV1) UpdateVPCDnsResolutionBinding(updateVPCDnsResolutionBindingOptions *UpdateVPCDnsResolutionBindingOptions) (result *VpcdnsResolutionBinding, response *core.DetailedResponse, err error) { - return vpc.UpdateVPCDnsResolutionBindingWithContext(context.Background(), updateVPCDnsResolutionBindingOptions) + result, response, err = vpc.UpdateVPCDnsResolutionBindingWithContext(context.Background(), updateVPCDnsResolutionBindingOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateVPCDnsResolutionBindingWithContext is an alternate form of the UpdateVPCDnsResolutionBinding method which supports a Context parameter func (vpc *VpcV1) UpdateVPCDnsResolutionBindingWithContext(ctx context.Context, updateVPCDnsResolutionBindingOptions *UpdateVPCDnsResolutionBindingOptions) (result *VpcdnsResolutionBinding, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateVPCDnsResolutionBindingOptions, "updateVPCDnsResolutionBindingOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateVPCDnsResolutionBindingOptions, "updateVPCDnsResolutionBindingOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -1405,6 +1580,7 @@ func (vpc *VpcV1) UpdateVPCDnsResolutionBindingWithContext(ctx context.Context, builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/dns_resolution_bindings/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -1424,22 +1600,27 @@ func (vpc *VpcV1) UpdateVPCDnsResolutionBindingWithContext(ctx context.Context, _, err = builder.SetBodyContentJSON(updateVPCDnsResolutionBindingOptions.VpcdnsResolutionBindingPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_vpc_dns_resolution_binding", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVpcdnsResolutionBinding) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -1454,7 +1635,9 @@ func (vpc *VpcV1) UpdateVPCDnsResolutionBindingWithContext(ctx context.Context, // destination will be used. If multiple equally-specific routes exist, traffic will be distributed across them. // Deprecated: this method is deprecated and may be removed in a future release. func (vpc *VpcV1) ListVPCRoutes(listVPCRoutesOptions *ListVPCRoutesOptions) (result *RouteCollectionVPCContext, response *core.DetailedResponse, err error) { - return vpc.ListVPCRoutesWithContext(context.Background(), listVPCRoutesOptions) + result, response, err = vpc.ListVPCRoutesWithContext(context.Background(), listVPCRoutesOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListVPCRoutesWithContext is an alternate form of the ListVPCRoutes method which supports a Context parameter @@ -1463,10 +1646,12 @@ func (vpc *VpcV1) ListVPCRoutesWithContext(ctx context.Context, listVPCRoutesOpt core.GetLogger().Warn("A deprecated operation has been invoked: ListVPCRoutes") err = core.ValidateNotNil(listVPCRoutesOptions, "listVPCRoutesOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listVPCRoutesOptions, "listVPCRoutesOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -1479,6 +1664,7 @@ func (vpc *VpcV1) ListVPCRoutesWithContext(ctx context.Context, listVPCRoutesOpt builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routes`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -1506,17 +1692,21 @@ func (vpc *VpcV1) ListVPCRoutesWithContext(ctx context.Context, listVPCRoutesOpt request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_vpc_routes", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRouteCollectionVPCContext) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -1531,7 +1721,9 @@ func (vpc *VpcV1) ListVPCRoutesWithContext(ctx context.Context, listVPCRoutesOpt // if the new route will cause a loop. // Deprecated: this method is deprecated and may be removed in a future release. func (vpc *VpcV1) CreateVPCRoute(createVPCRouteOptions *CreateVPCRouteOptions) (result *Route, response *core.DetailedResponse, err error) { - return vpc.CreateVPCRouteWithContext(context.Background(), createVPCRouteOptions) + result, response, err = vpc.CreateVPCRouteWithContext(context.Background(), createVPCRouteOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateVPCRouteWithContext is an alternate form of the CreateVPCRoute method which supports a Context parameter @@ -1540,10 +1732,12 @@ func (vpc *VpcV1) CreateVPCRouteWithContext(ctx context.Context, createVPCRouteO core.GetLogger().Warn("A deprecated operation has been invoked: CreateVPCRoute") err = core.ValidateNotNil(createVPCRouteOptions, "createVPCRouteOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createVPCRouteOptions, "createVPCRouteOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -1556,6 +1750,7 @@ func (vpc *VpcV1) CreateVPCRouteWithContext(ctx context.Context, createVPCRouteO builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routes`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -1597,22 +1792,27 @@ func (vpc *VpcV1) CreateVPCRouteWithContext(ctx context.Context, createVPCRouteO } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_vpc_route", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoute) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -1625,7 +1825,9 @@ func (vpc *VpcV1) CreateVPCRouteWithContext(ctx context.Context, createVPCRouteO // This request deletes a route. This operation cannot be reversed. // Deprecated: this method is deprecated and may be removed in a future release. func (vpc *VpcV1) DeleteVPCRoute(deleteVPCRouteOptions *DeleteVPCRouteOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteVPCRouteWithContext(context.Background(), deleteVPCRouteOptions) + response, err = vpc.DeleteVPCRouteWithContext(context.Background(), deleteVPCRouteOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteVPCRouteWithContext is an alternate form of the DeleteVPCRoute method which supports a Context parameter @@ -1634,10 +1836,12 @@ func (vpc *VpcV1) DeleteVPCRouteWithContext(ctx context.Context, deleteVPCRouteO core.GetLogger().Warn("A deprecated operation has been invoked: DeleteVPCRoute") err = core.ValidateNotNil(deleteVPCRouteOptions, "deleteVPCRouteOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteVPCRouteOptions, "deleteVPCRouteOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -1651,6 +1855,7 @@ func (vpc *VpcV1) DeleteVPCRouteWithContext(ctx context.Context, deleteVPCRouteO builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routes/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -1668,10 +1873,16 @@ func (vpc *VpcV1) DeleteVPCRouteWithContext(ctx context.Context, deleteVPCRouteO request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_vpc_route", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -1680,7 +1891,9 @@ func (vpc *VpcV1) DeleteVPCRouteWithContext(ctx context.Context, deleteVPCRouteO // This request retrieves a single route specified by the identifier in the URL. // Deprecated: this method is deprecated and may be removed in a future release. func (vpc *VpcV1) GetVPCRoute(getVPCRouteOptions *GetVPCRouteOptions) (result *Route, response *core.DetailedResponse, err error) { - return vpc.GetVPCRouteWithContext(context.Background(), getVPCRouteOptions) + result, response, err = vpc.GetVPCRouteWithContext(context.Background(), getVPCRouteOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetVPCRouteWithContext is an alternate form of the GetVPCRoute method which supports a Context parameter @@ -1689,10 +1902,12 @@ func (vpc *VpcV1) GetVPCRouteWithContext(ctx context.Context, getVPCRouteOptions core.GetLogger().Warn("A deprecated operation has been invoked: GetVPCRoute") err = core.ValidateNotNil(getVPCRouteOptions, "getVPCRouteOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getVPCRouteOptions, "getVPCRouteOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -1706,6 +1921,7 @@ func (vpc *VpcV1) GetVPCRouteWithContext(ctx context.Context, getVPCRouteOptions builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routes/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -1724,17 +1940,21 @@ func (vpc *VpcV1) GetVPCRouteWithContext(ctx context.Context, getVPCRouteOptions request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_vpc_route", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoute) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -1748,7 +1968,9 @@ func (vpc *VpcV1) GetVPCRouteWithContext(ctx context.Context, getVPCRouteOptions // the same way as a retrieved route and contains only the information to be updated. // Deprecated: this method is deprecated and may be removed in a future release. func (vpc *VpcV1) UpdateVPCRoute(updateVPCRouteOptions *UpdateVPCRouteOptions) (result *Route, response *core.DetailedResponse, err error) { - return vpc.UpdateVPCRouteWithContext(context.Background(), updateVPCRouteOptions) + result, response, err = vpc.UpdateVPCRouteWithContext(context.Background(), updateVPCRouteOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateVPCRouteWithContext is an alternate form of the UpdateVPCRoute method which supports a Context parameter @@ -1757,10 +1979,12 @@ func (vpc *VpcV1) UpdateVPCRouteWithContext(ctx context.Context, updateVPCRouteO core.GetLogger().Warn("A deprecated operation has been invoked: UpdateVPCRoute") err = core.ValidateNotNil(updateVPCRouteOptions, "updateVPCRouteOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateVPCRouteOptions, "updateVPCRouteOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -1774,6 +1998,7 @@ func (vpc *VpcV1) UpdateVPCRouteWithContext(ctx context.Context, updateVPCRouteO builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routes/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -1793,22 +2018,27 @@ func (vpc *VpcV1) UpdateVPCRouteWithContext(ctx context.Context, updateVPCRouteO _, err = builder.SetBodyContentJSON(updateVPCRouteOptions.RoutePatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_vpc_route", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoute) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -1823,17 +2053,21 @@ func (vpc *VpcV1) UpdateVPCRouteWithContext(ctx context.Context, updateVPCRouteO // table. If multiple equally-specific routes exist, traffic will be distributed across them. If no routes match, // delivery will be controlled by the system's built-in routes. func (vpc *VpcV1) ListVPCRoutingTables(listVPCRoutingTablesOptions *ListVPCRoutingTablesOptions) (result *RoutingTableCollection, response *core.DetailedResponse, err error) { - return vpc.ListVPCRoutingTablesWithContext(context.Background(), listVPCRoutingTablesOptions) + result, response, err = vpc.ListVPCRoutingTablesWithContext(context.Background(), listVPCRoutingTablesOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListVPCRoutingTablesWithContext is an alternate form of the ListVPCRoutingTables method which supports a Context parameter func (vpc *VpcV1) ListVPCRoutingTablesWithContext(ctx context.Context, listVPCRoutingTablesOptions *ListVPCRoutingTablesOptions) (result *RoutingTableCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listVPCRoutingTablesOptions, "listVPCRoutingTablesOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listVPCRoutingTablesOptions, "listVPCRoutingTablesOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -1846,6 +2080,7 @@ func (vpc *VpcV1) ListVPCRoutingTablesWithContext(ctx context.Context, listVPCRo builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routing_tables`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -1873,17 +2108,21 @@ func (vpc *VpcV1) ListVPCRoutingTablesWithContext(ctx context.Context, listVPCRo request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_vpc_routing_tables", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoutingTableCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -1896,17 +2135,21 @@ func (vpc *VpcV1) ListVPCRoutingTablesWithContext(ctx context.Context, listVPCRo // This request creates a routing table from a routing table prototype object. The prototype object is structured in the // same way as a retrieved routing table, and contains the information necessary to create the new routing table. func (vpc *VpcV1) CreateVPCRoutingTable(createVPCRoutingTableOptions *CreateVPCRoutingTableOptions) (result *RoutingTable, response *core.DetailedResponse, err error) { - return vpc.CreateVPCRoutingTableWithContext(context.Background(), createVPCRoutingTableOptions) + result, response, err = vpc.CreateVPCRoutingTableWithContext(context.Background(), createVPCRoutingTableOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateVPCRoutingTableWithContext is an alternate form of the CreateVPCRoutingTable method which supports a Context parameter func (vpc *VpcV1) CreateVPCRoutingTableWithContext(ctx context.Context, createVPCRoutingTableOptions *CreateVPCRoutingTableOptions) (result *RoutingTable, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createVPCRoutingTableOptions, "createVPCRoutingTableOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createVPCRoutingTableOptions, "createVPCRoutingTableOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -1919,6 +2162,7 @@ func (vpc *VpcV1) CreateVPCRoutingTableWithContext(ctx context.Context, createVP builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routing_tables`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -1963,22 +2207,27 @@ func (vpc *VpcV1) CreateVPCRoutingTableWithContext(ctx context.Context, createVP } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_vpc_routing_table", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoutingTable) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -1991,17 +2240,21 @@ func (vpc *VpcV1) CreateVPCRoutingTableWithContext(ctx context.Context, createVP // This request deletes a routing table. A routing table cannot be deleted if it is associated with any subnets in the // VPC. Additionally, a VPC's default routing table cannot be deleted. This operation cannot be reversed. func (vpc *VpcV1) DeleteVPCRoutingTable(deleteVPCRoutingTableOptions *DeleteVPCRoutingTableOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteVPCRoutingTableWithContext(context.Background(), deleteVPCRoutingTableOptions) + response, err = vpc.DeleteVPCRoutingTableWithContext(context.Background(), deleteVPCRoutingTableOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteVPCRoutingTableWithContext is an alternate form of the DeleteVPCRoutingTable method which supports a Context parameter func (vpc *VpcV1) DeleteVPCRoutingTableWithContext(ctx context.Context, deleteVPCRoutingTableOptions *DeleteVPCRoutingTableOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteVPCRoutingTableOptions, "deleteVPCRoutingTableOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteVPCRoutingTableOptions, "deleteVPCRoutingTableOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -2015,6 +2268,7 @@ func (vpc *VpcV1) DeleteVPCRoutingTableWithContext(ctx context.Context, deleteVP builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routing_tables/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -2035,10 +2289,16 @@ func (vpc *VpcV1) DeleteVPCRoutingTableWithContext(ctx context.Context, deleteVP request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_vpc_routing_table", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -2046,17 +2306,21 @@ func (vpc *VpcV1) DeleteVPCRoutingTableWithContext(ctx context.Context, deleteVP // GetVPCRoutingTable : Retrieve a VPC routing table // This request retrieves a single routing table specified by the identifier in the URL. func (vpc *VpcV1) GetVPCRoutingTable(getVPCRoutingTableOptions *GetVPCRoutingTableOptions) (result *RoutingTable, response *core.DetailedResponse, err error) { - return vpc.GetVPCRoutingTableWithContext(context.Background(), getVPCRoutingTableOptions) + result, response, err = vpc.GetVPCRoutingTableWithContext(context.Background(), getVPCRoutingTableOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetVPCRoutingTableWithContext is an alternate form of the GetVPCRoutingTable method which supports a Context parameter func (vpc *VpcV1) GetVPCRoutingTableWithContext(ctx context.Context, getVPCRoutingTableOptions *GetVPCRoutingTableOptions) (result *RoutingTable, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getVPCRoutingTableOptions, "getVPCRoutingTableOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getVPCRoutingTableOptions, "getVPCRoutingTableOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -2070,6 +2334,7 @@ func (vpc *VpcV1) GetVPCRoutingTableWithContext(ctx context.Context, getVPCRouti builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routing_tables/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -2088,17 +2353,21 @@ func (vpc *VpcV1) GetVPCRoutingTableWithContext(ctx context.Context, getVPCRouti request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_vpc_routing_table", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoutingTable) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -2111,17 +2380,21 @@ func (vpc *VpcV1) GetVPCRoutingTableWithContext(ctx context.Context, getVPCRouti // This request updates a routing table with the information in a provided routing table patch. The patch object is // structured in the same way as a retrieved table and contains only the information to be updated. func (vpc *VpcV1) UpdateVPCRoutingTable(updateVPCRoutingTableOptions *UpdateVPCRoutingTableOptions) (result *RoutingTable, response *core.DetailedResponse, err error) { - return vpc.UpdateVPCRoutingTableWithContext(context.Background(), updateVPCRoutingTableOptions) + result, response, err = vpc.UpdateVPCRoutingTableWithContext(context.Background(), updateVPCRoutingTableOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateVPCRoutingTableWithContext is an alternate form of the UpdateVPCRoutingTable method which supports a Context parameter func (vpc *VpcV1) UpdateVPCRoutingTableWithContext(ctx context.Context, updateVPCRoutingTableOptions *UpdateVPCRoutingTableOptions) (result *RoutingTable, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateVPCRoutingTableOptions, "updateVPCRoutingTableOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateVPCRoutingTableOptions, "updateVPCRoutingTableOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -2135,6 +2408,7 @@ func (vpc *VpcV1) UpdateVPCRoutingTableWithContext(ctx context.Context, updateVP builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routing_tables/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -2157,22 +2431,27 @@ func (vpc *VpcV1) UpdateVPCRoutingTableWithContext(ctx context.Context, updateVP _, err = builder.SetBodyContentJSON(updateVPCRoutingTableOptions.RoutingTablePatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_vpc_routing_table", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoutingTable) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -2188,17 +2467,21 @@ func (vpc *VpcV1) UpdateVPCRoutingTableWithContext(ctx context.Context, updateVP // highest priority will be used. If two matching routes have the same destination and priority, traffic will be // distributed between them. If no routes match, delivery will be controlled by the system's built-in routes. func (vpc *VpcV1) ListVPCRoutingTableRoutes(listVPCRoutingTableRoutesOptions *ListVPCRoutingTableRoutesOptions) (result *RouteCollection, response *core.DetailedResponse, err error) { - return vpc.ListVPCRoutingTableRoutesWithContext(context.Background(), listVPCRoutingTableRoutesOptions) + result, response, err = vpc.ListVPCRoutingTableRoutesWithContext(context.Background(), listVPCRoutingTableRoutesOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListVPCRoutingTableRoutesWithContext is an alternate form of the ListVPCRoutingTableRoutes method which supports a Context parameter func (vpc *VpcV1) ListVPCRoutingTableRoutesWithContext(ctx context.Context, listVPCRoutingTableRoutesOptions *ListVPCRoutingTableRoutesOptions) (result *RouteCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listVPCRoutingTableRoutesOptions, "listVPCRoutingTableRoutesOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listVPCRoutingTableRoutesOptions, "listVPCRoutingTableRoutesOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -2212,6 +2495,7 @@ func (vpc *VpcV1) ListVPCRoutingTableRoutesWithContext(ctx context.Context, list builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -2236,17 +2520,21 @@ func (vpc *VpcV1) ListVPCRoutingTableRoutesWithContext(ctx context.Context, list request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_vpc_routing_table_routes", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRouteCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -2259,17 +2547,21 @@ func (vpc *VpcV1) ListVPCRoutingTableRoutesWithContext(ctx context.Context, list // This request creates a new VPC route from a VPC route prototype object. The prototype object is structured in the // same way as a retrieved VPC route and contains the information necessary to create the route. func (vpc *VpcV1) CreateVPCRoutingTableRoute(createVPCRoutingTableRouteOptions *CreateVPCRoutingTableRouteOptions) (result *Route, response *core.DetailedResponse, err error) { - return vpc.CreateVPCRoutingTableRouteWithContext(context.Background(), createVPCRoutingTableRouteOptions) + result, response, err = vpc.CreateVPCRoutingTableRouteWithContext(context.Background(), createVPCRoutingTableRouteOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateVPCRoutingTableRouteWithContext is an alternate form of the CreateVPCRoutingTableRoute method which supports a Context parameter func (vpc *VpcV1) CreateVPCRoutingTableRouteWithContext(ctx context.Context, createVPCRoutingTableRouteOptions *CreateVPCRoutingTableRouteOptions) (result *Route, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createVPCRoutingTableRouteOptions, "createVPCRoutingTableRouteOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createVPCRoutingTableRouteOptions, "createVPCRoutingTableRouteOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -2283,6 +2575,7 @@ func (vpc *VpcV1) CreateVPCRoutingTableRouteWithContext(ctx context.Context, cre builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -2324,22 +2617,27 @@ func (vpc *VpcV1) CreateVPCRoutingTableRouteWithContext(ctx context.Context, cre } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_vpc_routing_table_route", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoute) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -2352,17 +2650,21 @@ func (vpc *VpcV1) CreateVPCRoutingTableRouteWithContext(ctx context.Context, cre // This request deletes a VPC route. This operation cannot be reversed. Only VPC routes with an `origin` of `user` are // allowed to be deleted. func (vpc *VpcV1) DeleteVPCRoutingTableRoute(deleteVPCRoutingTableRouteOptions *DeleteVPCRoutingTableRouteOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteVPCRoutingTableRouteWithContext(context.Background(), deleteVPCRoutingTableRouteOptions) + response, err = vpc.DeleteVPCRoutingTableRouteWithContext(context.Background(), deleteVPCRoutingTableRouteOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteVPCRoutingTableRouteWithContext is an alternate form of the DeleteVPCRoutingTableRoute method which supports a Context parameter func (vpc *VpcV1) DeleteVPCRoutingTableRouteWithContext(ctx context.Context, deleteVPCRoutingTableRouteOptions *DeleteVPCRoutingTableRouteOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteVPCRoutingTableRouteOptions, "deleteVPCRoutingTableRouteOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteVPCRoutingTableRouteOptions, "deleteVPCRoutingTableRouteOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -2377,6 +2679,7 @@ func (vpc *VpcV1) DeleteVPCRoutingTableRouteWithContext(ctx context.Context, del builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -2394,10 +2697,16 @@ func (vpc *VpcV1) DeleteVPCRoutingTableRouteWithContext(ctx context.Context, del request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_vpc_routing_table_route", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -2405,17 +2714,21 @@ func (vpc *VpcV1) DeleteVPCRoutingTableRouteWithContext(ctx context.Context, del // GetVPCRoutingTableRoute : Retrieve a VPC routing table route // This request retrieves a single VPC route specified by the identifier in the URL path. func (vpc *VpcV1) GetVPCRoutingTableRoute(getVPCRoutingTableRouteOptions *GetVPCRoutingTableRouteOptions) (result *Route, response *core.DetailedResponse, err error) { - return vpc.GetVPCRoutingTableRouteWithContext(context.Background(), getVPCRoutingTableRouteOptions) + result, response, err = vpc.GetVPCRoutingTableRouteWithContext(context.Background(), getVPCRoutingTableRouteOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetVPCRoutingTableRouteWithContext is an alternate form of the GetVPCRoutingTableRoute method which supports a Context parameter func (vpc *VpcV1) GetVPCRoutingTableRouteWithContext(ctx context.Context, getVPCRoutingTableRouteOptions *GetVPCRoutingTableRouteOptions) (result *Route, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getVPCRoutingTableRouteOptions, "getVPCRoutingTableRouteOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getVPCRoutingTableRouteOptions, "getVPCRoutingTableRouteOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -2430,6 +2743,7 @@ func (vpc *VpcV1) GetVPCRoutingTableRouteWithContext(ctx context.Context, getVPC builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -2448,17 +2762,21 @@ func (vpc *VpcV1) GetVPCRoutingTableRouteWithContext(ctx context.Context, getVPC request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_vpc_routing_table_route", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoute) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -2472,17 +2790,21 @@ func (vpc *VpcV1) GetVPCRoutingTableRouteWithContext(ctx context.Context, getVPC // structured in the same way as a retrieved VPC route and needs to contain only the information to be updated. Only VPC // routes with an `origin` of `user` are allowed to be updated. func (vpc *VpcV1) UpdateVPCRoutingTableRoute(updateVPCRoutingTableRouteOptions *UpdateVPCRoutingTableRouteOptions) (result *Route, response *core.DetailedResponse, err error) { - return vpc.UpdateVPCRoutingTableRouteWithContext(context.Background(), updateVPCRoutingTableRouteOptions) + result, response, err = vpc.UpdateVPCRoutingTableRouteWithContext(context.Background(), updateVPCRoutingTableRouteOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateVPCRoutingTableRouteWithContext is an alternate form of the UpdateVPCRoutingTableRoute method which supports a Context parameter func (vpc *VpcV1) UpdateVPCRoutingTableRouteWithContext(ctx context.Context, updateVPCRoutingTableRouteOptions *UpdateVPCRoutingTableRouteOptions) (result *Route, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateVPCRoutingTableRouteOptions, "updateVPCRoutingTableRouteOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateVPCRoutingTableRouteOptions, "updateVPCRoutingTableRouteOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -2497,6 +2819,7 @@ func (vpc *VpcV1) UpdateVPCRoutingTableRouteWithContext(ctx context.Context, upd builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -2516,22 +2839,27 @@ func (vpc *VpcV1) UpdateVPCRoutingTableRouteWithContext(ctx context.Context, upd _, err = builder.SetBodyContentJSON(updateVPCRoutingTableRouteOptions.RoutePatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_vpc_routing_table_route", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoute) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -2544,13 +2872,16 @@ func (vpc *VpcV1) UpdateVPCRoutingTableRouteWithContext(ctx context.Context, upd // This request lists all subnets in the region. Subnets are contiguous ranges of IP addresses specified in CIDR block // notation. Each subnet is within a particular zone and cannot span multiple zones or regions. func (vpc *VpcV1) ListSubnets(listSubnetsOptions *ListSubnetsOptions) (result *SubnetCollection, response *core.DetailedResponse, err error) { - return vpc.ListSubnetsWithContext(context.Background(), listSubnetsOptions) + result, response, err = vpc.ListSubnetsWithContext(context.Background(), listSubnetsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListSubnetsWithContext is an alternate form of the ListSubnets method which supports a Context parameter func (vpc *VpcV1) ListSubnetsWithContext(ctx context.Context, listSubnetsOptions *ListSubnetsOptions) (result *SubnetCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listSubnetsOptions, "listSubnetsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -2559,6 +2890,7 @@ func (vpc *VpcV1) ListSubnetsWithContext(ctx context.Context, listSubnetsOptions builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -2604,17 +2936,21 @@ func (vpc *VpcV1) ListSubnetsWithContext(ctx context.Context, listSubnetsOptions request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_subnets", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSubnetCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -2628,17 +2964,21 @@ func (vpc *VpcV1) ListSubnetsWithContext(ctx context.Context, listSubnetsOptions // as a retrieved subnet, and contains the information necessary to create the new subnet. For this request to succeed, // the prototype's CIDR block must not overlap with an existing subnet in the VPC. func (vpc *VpcV1) CreateSubnet(createSubnetOptions *CreateSubnetOptions) (result *Subnet, response *core.DetailedResponse, err error) { - return vpc.CreateSubnetWithContext(context.Background(), createSubnetOptions) + result, response, err = vpc.CreateSubnetWithContext(context.Background(), createSubnetOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateSubnetWithContext is an alternate form of the CreateSubnet method which supports a Context parameter func (vpc *VpcV1) CreateSubnetWithContext(ctx context.Context, createSubnetOptions *CreateSubnetOptions) (result *Subnet, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createSubnetOptions, "createSubnetOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createSubnetOptions, "createSubnetOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -2647,6 +2987,7 @@ func (vpc *VpcV1) CreateSubnetWithContext(ctx context.Context, createSubnetOptio builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -2666,22 +3007,27 @@ func (vpc *VpcV1) CreateSubnetWithContext(ctx context.Context, createSubnetOptio _, err = builder.SetBodyContentJSON(createSubnetOptions.SubnetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_subnet", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSubnet) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -2697,17 +3043,21 @@ func (vpc *VpcV1) CreateSubnetWithContext(ctx context.Context, createSubnetOptio // gateways, or endpoint gateways. All flow log collectors with `auto_delete` set to `true` targeting the subnet or any // resource in the subnet are automatically deleted. func (vpc *VpcV1) DeleteSubnet(deleteSubnetOptions *DeleteSubnetOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteSubnetWithContext(context.Background(), deleteSubnetOptions) + response, err = vpc.DeleteSubnetWithContext(context.Background(), deleteSubnetOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteSubnetWithContext is an alternate form of the DeleteSubnet method which supports a Context parameter func (vpc *VpcV1) DeleteSubnetWithContext(ctx context.Context, deleteSubnetOptions *DeleteSubnetOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteSubnetOptions, "deleteSubnetOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteSubnetOptions, "deleteSubnetOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -2720,6 +3070,7 @@ func (vpc *VpcV1) DeleteSubnetWithContext(ctx context.Context, deleteSubnetOptio builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -2737,10 +3088,16 @@ func (vpc *VpcV1) DeleteSubnetWithContext(ctx context.Context, deleteSubnetOptio request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_subnet", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -2748,17 +3105,21 @@ func (vpc *VpcV1) DeleteSubnetWithContext(ctx context.Context, deleteSubnetOptio // GetSubnet : Retrieve a subnet // This request retrieves a single subnet specified by the identifier in the URL. func (vpc *VpcV1) GetSubnet(getSubnetOptions *GetSubnetOptions) (result *Subnet, response *core.DetailedResponse, err error) { - return vpc.GetSubnetWithContext(context.Background(), getSubnetOptions) + result, response, err = vpc.GetSubnetWithContext(context.Background(), getSubnetOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetSubnetWithContext is an alternate form of the GetSubnet method which supports a Context parameter func (vpc *VpcV1) GetSubnetWithContext(ctx context.Context, getSubnetOptions *GetSubnetOptions) (result *Subnet, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getSubnetOptions, "getSubnetOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getSubnetOptions, "getSubnetOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -2771,6 +3132,7 @@ func (vpc *VpcV1) GetSubnetWithContext(ctx context.Context, getSubnetOptions *Ge builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -2789,17 +3151,21 @@ func (vpc *VpcV1) GetSubnetWithContext(ctx context.Context, getSubnetOptions *Ge request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_subnet", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSubnet) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -2812,17 +3178,21 @@ func (vpc *VpcV1) GetSubnetWithContext(ctx context.Context, getSubnetOptions *Ge // This request updates a subnet with the information in a provided subnet patch. The subnet patch object is structured // in the same way as a retrieved subnet and contains only the information to be updated. func (vpc *VpcV1) UpdateSubnet(updateSubnetOptions *UpdateSubnetOptions) (result *Subnet, response *core.DetailedResponse, err error) { - return vpc.UpdateSubnetWithContext(context.Background(), updateSubnetOptions) + result, response, err = vpc.UpdateSubnetWithContext(context.Background(), updateSubnetOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateSubnetWithContext is an alternate form of the UpdateSubnet method which supports a Context parameter func (vpc *VpcV1) UpdateSubnetWithContext(ctx context.Context, updateSubnetOptions *UpdateSubnetOptions) (result *Subnet, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateSubnetOptions, "updateSubnetOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateSubnetOptions, "updateSubnetOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -2835,6 +3205,7 @@ func (vpc *VpcV1) UpdateSubnetWithContext(ctx context.Context, updateSubnetOptio builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -2854,22 +3225,27 @@ func (vpc *VpcV1) UpdateSubnetWithContext(ctx context.Context, updateSubnetOptio _, err = builder.SetBodyContentJSON(updateSubnetOptions.SubnetPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_subnet", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSubnet) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -2881,17 +3257,21 @@ func (vpc *VpcV1) UpdateSubnetWithContext(ctx context.Context, updateSubnetOptio // GetSubnetNetworkACL : Retrieve a subnet's attached network ACL // This request retrieves the network ACL attached to the subnet specified by the identifier in the URL. func (vpc *VpcV1) GetSubnetNetworkACL(getSubnetNetworkACLOptions *GetSubnetNetworkACLOptions) (result *NetworkACL, response *core.DetailedResponse, err error) { - return vpc.GetSubnetNetworkACLWithContext(context.Background(), getSubnetNetworkACLOptions) + result, response, err = vpc.GetSubnetNetworkACLWithContext(context.Background(), getSubnetNetworkACLOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetSubnetNetworkACLWithContext is an alternate form of the GetSubnetNetworkACL method which supports a Context parameter func (vpc *VpcV1) GetSubnetNetworkACLWithContext(ctx context.Context, getSubnetNetworkACLOptions *GetSubnetNetworkACLOptions) (result *NetworkACL, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getSubnetNetworkACLOptions, "getSubnetNetworkACLOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getSubnetNetworkACLOptions, "getSubnetNetworkACLOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -2904,6 +3284,7 @@ func (vpc *VpcV1) GetSubnetNetworkACLWithContext(ctx context.Context, getSubnetN builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{id}/network_acl`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -2922,17 +3303,21 @@ func (vpc *VpcV1) GetSubnetNetworkACLWithContext(ctx context.Context, getSubnetN request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_subnet_network_acl", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACL) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -2944,17 +3329,21 @@ func (vpc *VpcV1) GetSubnetNetworkACLWithContext(ctx context.Context, getSubnetN // ReplaceSubnetNetworkACL : Replace the network ACL for a subnet // This request replaces the existing network ACL for a subnet with the network ACL specified in the request body. func (vpc *VpcV1) ReplaceSubnetNetworkACL(replaceSubnetNetworkACLOptions *ReplaceSubnetNetworkACLOptions) (result *NetworkACL, response *core.DetailedResponse, err error) { - return vpc.ReplaceSubnetNetworkACLWithContext(context.Background(), replaceSubnetNetworkACLOptions) + result, response, err = vpc.ReplaceSubnetNetworkACLWithContext(context.Background(), replaceSubnetNetworkACLOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ReplaceSubnetNetworkACLWithContext is an alternate form of the ReplaceSubnetNetworkACL method which supports a Context parameter func (vpc *VpcV1) ReplaceSubnetNetworkACLWithContext(ctx context.Context, replaceSubnetNetworkACLOptions *ReplaceSubnetNetworkACLOptions) (result *NetworkACL, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(replaceSubnetNetworkACLOptions, "replaceSubnetNetworkACLOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(replaceSubnetNetworkACLOptions, "replaceSubnetNetworkACLOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -2967,6 +3356,7 @@ func (vpc *VpcV1) ReplaceSubnetNetworkACLWithContext(ctx context.Context, replac builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{id}/network_acl`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -2986,22 +3376,27 @@ func (vpc *VpcV1) ReplaceSubnetNetworkACLWithContext(ctx context.Context, replac _, err = builder.SetBodyContentJSON(replaceSubnetNetworkACLOptions.NetworkACLIdentity) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "replace_subnet_network_acl", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACL) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -3013,17 +3408,21 @@ func (vpc *VpcV1) ReplaceSubnetNetworkACLWithContext(ctx context.Context, replac // UnsetSubnetPublicGateway : Detach a public gateway from a subnet // This request detaches the public gateway from the subnet specified by the subnet identifier in the URL. func (vpc *VpcV1) UnsetSubnetPublicGateway(unsetSubnetPublicGatewayOptions *UnsetSubnetPublicGatewayOptions) (response *core.DetailedResponse, err error) { - return vpc.UnsetSubnetPublicGatewayWithContext(context.Background(), unsetSubnetPublicGatewayOptions) + response, err = vpc.UnsetSubnetPublicGatewayWithContext(context.Background(), unsetSubnetPublicGatewayOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UnsetSubnetPublicGatewayWithContext is an alternate form of the UnsetSubnetPublicGateway method which supports a Context parameter func (vpc *VpcV1) UnsetSubnetPublicGatewayWithContext(ctx context.Context, unsetSubnetPublicGatewayOptions *UnsetSubnetPublicGatewayOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(unsetSubnetPublicGatewayOptions, "unsetSubnetPublicGatewayOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(unsetSubnetPublicGatewayOptions, "unsetSubnetPublicGatewayOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -3036,6 +3435,7 @@ func (vpc *VpcV1) UnsetSubnetPublicGatewayWithContext(ctx context.Context, unset builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{id}/public_gateway`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -3053,10 +3453,16 @@ func (vpc *VpcV1) UnsetSubnetPublicGatewayWithContext(ctx context.Context, unset request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "unset_subnet_public_gateway", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -3064,17 +3470,21 @@ func (vpc *VpcV1) UnsetSubnetPublicGatewayWithContext(ctx context.Context, unset // GetSubnetPublicGateway : Retrieve a subnet's attached public gateway // This request retrieves the public gateway attached to the subnet specified by the identifier in the URL. func (vpc *VpcV1) GetSubnetPublicGateway(getSubnetPublicGatewayOptions *GetSubnetPublicGatewayOptions) (result *PublicGateway, response *core.DetailedResponse, err error) { - return vpc.GetSubnetPublicGatewayWithContext(context.Background(), getSubnetPublicGatewayOptions) + result, response, err = vpc.GetSubnetPublicGatewayWithContext(context.Background(), getSubnetPublicGatewayOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetSubnetPublicGatewayWithContext is an alternate form of the GetSubnetPublicGateway method which supports a Context parameter func (vpc *VpcV1) GetSubnetPublicGatewayWithContext(ctx context.Context, getSubnetPublicGatewayOptions *GetSubnetPublicGatewayOptions) (result *PublicGateway, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getSubnetPublicGatewayOptions, "getSubnetPublicGatewayOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getSubnetPublicGatewayOptions, "getSubnetPublicGatewayOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -3087,6 +3497,7 @@ func (vpc *VpcV1) GetSubnetPublicGatewayWithContext(ctx context.Context, getSubn builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{id}/public_gateway`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -3105,17 +3516,21 @@ func (vpc *VpcV1) GetSubnetPublicGatewayWithContext(ctx context.Context, getSubn request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_subnet_public_gateway", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPublicGateway) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -3128,17 +3543,21 @@ func (vpc *VpcV1) GetSubnetPublicGatewayWithContext(ctx context.Context, getSubn // This request attaches the public gateway, specified in the request body, to the subnet specified by the subnet // identifier in the URL. The public gateway must have the same VPC and zone as the subnet. func (vpc *VpcV1) SetSubnetPublicGateway(setSubnetPublicGatewayOptions *SetSubnetPublicGatewayOptions) (result *PublicGateway, response *core.DetailedResponse, err error) { - return vpc.SetSubnetPublicGatewayWithContext(context.Background(), setSubnetPublicGatewayOptions) + result, response, err = vpc.SetSubnetPublicGatewayWithContext(context.Background(), setSubnetPublicGatewayOptions) + err = core.RepurposeSDKProblem(err, "") + return } // SetSubnetPublicGatewayWithContext is an alternate form of the SetSubnetPublicGateway method which supports a Context parameter func (vpc *VpcV1) SetSubnetPublicGatewayWithContext(ctx context.Context, setSubnetPublicGatewayOptions *SetSubnetPublicGatewayOptions) (result *PublicGateway, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(setSubnetPublicGatewayOptions, "setSubnetPublicGatewayOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(setSubnetPublicGatewayOptions, "setSubnetPublicGatewayOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -3151,6 +3570,7 @@ func (vpc *VpcV1) SetSubnetPublicGatewayWithContext(ctx context.Context, setSubn builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{id}/public_gateway`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -3170,22 +3590,27 @@ func (vpc *VpcV1) SetSubnetPublicGatewayWithContext(ctx context.Context, setSubn _, err = builder.SetBodyContentJSON(setSubnetPublicGatewayOptions.PublicGatewayIdentity) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "set_subnet_public_gateway", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPublicGateway) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -3197,17 +3622,21 @@ func (vpc *VpcV1) SetSubnetPublicGatewayWithContext(ctx context.Context, setSubn // GetSubnetRoutingTable : Retrieve a subnet's attached routing table // This request retrieves the routing table attached to the subnet specified by the identifier in the URL. func (vpc *VpcV1) GetSubnetRoutingTable(getSubnetRoutingTableOptions *GetSubnetRoutingTableOptions) (result *RoutingTable, response *core.DetailedResponse, err error) { - return vpc.GetSubnetRoutingTableWithContext(context.Background(), getSubnetRoutingTableOptions) + result, response, err = vpc.GetSubnetRoutingTableWithContext(context.Background(), getSubnetRoutingTableOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetSubnetRoutingTableWithContext is an alternate form of the GetSubnetRoutingTable method which supports a Context parameter func (vpc *VpcV1) GetSubnetRoutingTableWithContext(ctx context.Context, getSubnetRoutingTableOptions *GetSubnetRoutingTableOptions) (result *RoutingTable, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getSubnetRoutingTableOptions, "getSubnetRoutingTableOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getSubnetRoutingTableOptions, "getSubnetRoutingTableOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -3220,6 +3649,7 @@ func (vpc *VpcV1) GetSubnetRoutingTableWithContext(ctx context.Context, getSubne builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{id}/routing_table`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -3238,17 +3668,21 @@ func (vpc *VpcV1) GetSubnetRoutingTableWithContext(ctx context.Context, getSubne request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_subnet_routing_table", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoutingTable) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -3263,17 +3697,21 @@ func (vpc *VpcV1) GetSubnetRoutingTableWithContext(ctx context.Context, getSubne // For this request to succeed, the routing table `route_direct_link_ingress`, // `route_internet_ingress`, `route_transit_gateway_ingress`, and `route_vpc_zone_ingress` properties must be `false`. func (vpc *VpcV1) ReplaceSubnetRoutingTable(replaceSubnetRoutingTableOptions *ReplaceSubnetRoutingTableOptions) (result *RoutingTable, response *core.DetailedResponse, err error) { - return vpc.ReplaceSubnetRoutingTableWithContext(context.Background(), replaceSubnetRoutingTableOptions) + result, response, err = vpc.ReplaceSubnetRoutingTableWithContext(context.Background(), replaceSubnetRoutingTableOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ReplaceSubnetRoutingTableWithContext is an alternate form of the ReplaceSubnetRoutingTable method which supports a Context parameter func (vpc *VpcV1) ReplaceSubnetRoutingTableWithContext(ctx context.Context, replaceSubnetRoutingTableOptions *ReplaceSubnetRoutingTableOptions) (result *RoutingTable, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(replaceSubnetRoutingTableOptions, "replaceSubnetRoutingTableOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(replaceSubnetRoutingTableOptions, "replaceSubnetRoutingTableOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -3286,6 +3724,7 @@ func (vpc *VpcV1) ReplaceSubnetRoutingTableWithContext(ctx context.Context, repl builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{id}/routing_table`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -3305,22 +3744,27 @@ func (vpc *VpcV1) ReplaceSubnetRoutingTableWithContext(ctx context.Context, repl _, err = builder.SetBodyContentJSON(replaceSubnetRoutingTableOptions.RoutingTableIdentity) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "replace_subnet_routing_table", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoutingTable) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -3333,17 +3777,21 @@ func (vpc *VpcV1) ReplaceSubnetRoutingTableWithContext(ctx context.Context, repl // This request lists all reserved IPs in a subnet. A reserved IP resource will exist for every address in the subnet // which is not available for use. func (vpc *VpcV1) ListSubnetReservedIps(listSubnetReservedIpsOptions *ListSubnetReservedIpsOptions) (result *ReservedIPCollection, response *core.DetailedResponse, err error) { - return vpc.ListSubnetReservedIpsWithContext(context.Background(), listSubnetReservedIpsOptions) + result, response, err = vpc.ListSubnetReservedIpsWithContext(context.Background(), listSubnetReservedIpsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListSubnetReservedIpsWithContext is an alternate form of the ListSubnetReservedIps method which supports a Context parameter func (vpc *VpcV1) ListSubnetReservedIpsWithContext(ctx context.Context, listSubnetReservedIpsOptions *ListSubnetReservedIpsOptions) (result *ReservedIPCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listSubnetReservedIpsOptions, "listSubnetReservedIpsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listSubnetReservedIpsOptions, "listSubnetReservedIpsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -3356,6 +3804,7 @@ func (vpc *VpcV1) ListSubnetReservedIpsWithContext(ctx context.Context, listSubn builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{subnet_id}/reserved_ips`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -3395,17 +3844,21 @@ func (vpc *VpcV1) ListSubnetReservedIpsWithContext(ctx context.Context, listSubn request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_subnet_reserved_ips", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIPCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -3418,17 +3871,21 @@ func (vpc *VpcV1) ListSubnetReservedIpsWithContext(ctx context.Context, listSubn // This request reserves an IP address in a subnet. If the provided prototype object includes an `address`, the address // must not already be reserved. func (vpc *VpcV1) CreateSubnetReservedIP(createSubnetReservedIPOptions *CreateSubnetReservedIPOptions) (result *ReservedIP, response *core.DetailedResponse, err error) { - return vpc.CreateSubnetReservedIPWithContext(context.Background(), createSubnetReservedIPOptions) + result, response, err = vpc.CreateSubnetReservedIPWithContext(context.Background(), createSubnetReservedIPOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateSubnetReservedIPWithContext is an alternate form of the CreateSubnetReservedIP method which supports a Context parameter func (vpc *VpcV1) CreateSubnetReservedIPWithContext(ctx context.Context, createSubnetReservedIPOptions *CreateSubnetReservedIPOptions) (result *ReservedIP, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createSubnetReservedIPOptions, "createSubnetReservedIPOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createSubnetReservedIPOptions, "createSubnetReservedIPOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -3441,6 +3898,7 @@ func (vpc *VpcV1) CreateSubnetReservedIPWithContext(ctx context.Context, createS builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{subnet_id}/reserved_ips`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -3473,22 +3931,27 @@ func (vpc *VpcV1) CreateSubnetReservedIPWithContext(ctx context.Context, createS } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_subnet_reserved_ip", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIP) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -3504,17 +3967,21 @@ func (vpc *VpcV1) CreateSubnetReservedIPWithContext(ctx context.Context, createS // network interface, instance network interface or virtual network interface for which it is the primary IP. A // provider-owned reserved IP is not allowed to be deleted. func (vpc *VpcV1) DeleteSubnetReservedIP(deleteSubnetReservedIPOptions *DeleteSubnetReservedIPOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteSubnetReservedIPWithContext(context.Background(), deleteSubnetReservedIPOptions) + response, err = vpc.DeleteSubnetReservedIPWithContext(context.Background(), deleteSubnetReservedIPOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteSubnetReservedIPWithContext is an alternate form of the DeleteSubnetReservedIP method which supports a Context parameter func (vpc *VpcV1) DeleteSubnetReservedIPWithContext(ctx context.Context, deleteSubnetReservedIPOptions *DeleteSubnetReservedIPOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteSubnetReservedIPOptions, "deleteSubnetReservedIPOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteSubnetReservedIPOptions, "deleteSubnetReservedIPOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -3528,6 +3995,7 @@ func (vpc *VpcV1) DeleteSubnetReservedIPWithContext(ctx context.Context, deleteS builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{subnet_id}/reserved_ips/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -3545,10 +4013,16 @@ func (vpc *VpcV1) DeleteSubnetReservedIPWithContext(ctx context.Context, deleteS request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_subnet_reserved_ip", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -3556,17 +4030,21 @@ func (vpc *VpcV1) DeleteSubnetReservedIPWithContext(ctx context.Context, deleteS // GetSubnetReservedIP : Retrieve a reserved IP // This request retrieves a single reserved IP specified by the identifier in the URL. func (vpc *VpcV1) GetSubnetReservedIP(getSubnetReservedIPOptions *GetSubnetReservedIPOptions) (result *ReservedIP, response *core.DetailedResponse, err error) { - return vpc.GetSubnetReservedIPWithContext(context.Background(), getSubnetReservedIPOptions) + result, response, err = vpc.GetSubnetReservedIPWithContext(context.Background(), getSubnetReservedIPOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetSubnetReservedIPWithContext is an alternate form of the GetSubnetReservedIP method which supports a Context parameter func (vpc *VpcV1) GetSubnetReservedIPWithContext(ctx context.Context, getSubnetReservedIPOptions *GetSubnetReservedIPOptions) (result *ReservedIP, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getSubnetReservedIPOptions, "getSubnetReservedIPOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getSubnetReservedIPOptions, "getSubnetReservedIPOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -3580,6 +4058,7 @@ func (vpc *VpcV1) GetSubnetReservedIPWithContext(ctx context.Context, getSubnetR builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{subnet_id}/reserved_ips/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -3598,17 +4077,21 @@ func (vpc *VpcV1) GetSubnetReservedIPWithContext(ctx context.Context, getSubnetR request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_subnet_reserved_ip", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIP) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -3623,17 +4106,21 @@ func (vpc *VpcV1) GetSubnetReservedIPWithContext(ctx context.Context, getSubnetR // // A provider-owned reserved IP is not allowed to be updated. func (vpc *VpcV1) UpdateSubnetReservedIP(updateSubnetReservedIPOptions *UpdateSubnetReservedIPOptions) (result *ReservedIP, response *core.DetailedResponse, err error) { - return vpc.UpdateSubnetReservedIPWithContext(context.Background(), updateSubnetReservedIPOptions) + result, response, err = vpc.UpdateSubnetReservedIPWithContext(context.Background(), updateSubnetReservedIPOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateSubnetReservedIPWithContext is an alternate form of the UpdateSubnetReservedIP method which supports a Context parameter func (vpc *VpcV1) UpdateSubnetReservedIPWithContext(ctx context.Context, updateSubnetReservedIPOptions *UpdateSubnetReservedIPOptions) (result *ReservedIP, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateSubnetReservedIPOptions, "updateSubnetReservedIPOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateSubnetReservedIPOptions, "updateSubnetReservedIPOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -3647,6 +4134,7 @@ func (vpc *VpcV1) UpdateSubnetReservedIPWithContext(ctx context.Context, updateS builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{subnet_id}/reserved_ips/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -3666,22 +4154,27 @@ func (vpc *VpcV1) UpdateSubnetReservedIPWithContext(ctx context.Context, updateS _, err = builder.SetBodyContentJSON(updateSubnetReservedIPOptions.ReservedIPPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_subnet_reserved_ip", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIP) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -3694,13 +4187,16 @@ func (vpc *VpcV1) UpdateSubnetReservedIPWithContext(ctx context.Context, updateS // This request lists all images available in the region. An image provides source data for a volume. Images are either // system-provided, or created from another source, such as importing from Cloud Object Storage. func (vpc *VpcV1) ListImages(listImagesOptions *ListImagesOptions) (result *ImageCollection, response *core.DetailedResponse, err error) { - return vpc.ListImagesWithContext(context.Background(), listImagesOptions) + result, response, err = vpc.ListImagesWithContext(context.Background(), listImagesOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListImagesWithContext is an alternate form of the ListImages method which supports a Context parameter func (vpc *VpcV1) ListImagesWithContext(ctx context.Context, listImagesOptions *ListImagesOptions) (result *ImageCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listImagesOptions, "listImagesOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -3709,6 +4205,7 @@ func (vpc *VpcV1) ListImagesWithContext(ctx context.Context, listImagesOptions * builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/images`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -3745,17 +4242,21 @@ func (vpc *VpcV1) ListImagesWithContext(ctx context.Context, listImagesOptions * request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_images", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalImageCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -3770,17 +4271,21 @@ func (vpc *VpcV1) ListImagesWithContext(ctx context.Context, listImagesOptions * // a URL to the image file on object storage must be specified. If an image is being created from an existing volume, // that volume must be specified. func (vpc *VpcV1) CreateImage(createImageOptions *CreateImageOptions) (result *Image, response *core.DetailedResponse, err error) { - return vpc.CreateImageWithContext(context.Background(), createImageOptions) + result, response, err = vpc.CreateImageWithContext(context.Background(), createImageOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateImageWithContext is an alternate form of the CreateImage method which supports a Context parameter func (vpc *VpcV1) CreateImageWithContext(ctx context.Context, createImageOptions *CreateImageOptions) (result *Image, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createImageOptions, "createImageOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createImageOptions, "createImageOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -3789,6 +4294,7 @@ func (vpc *VpcV1) CreateImageWithContext(ctx context.Context, createImageOptions builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/images`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -3808,22 +4314,27 @@ func (vpc *VpcV1) CreateImageWithContext(ctx context.Context, createImageOptions _, err = builder.SetBodyContentJSON(createImageOptions.ImagePrototype) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_image", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalImage) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -3839,17 +4350,21 @@ func (vpc *VpcV1) CreateImageWithContext(ctx context.Context, createImageOptions // - has a `status` of `pending` with a `status_reasons` code of `image_request_in_progress` // - has `catalog_offering.managed` set to `true`. func (vpc *VpcV1) DeleteImage(deleteImageOptions *DeleteImageOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteImageWithContext(context.Background(), deleteImageOptions) + response, err = vpc.DeleteImageWithContext(context.Background(), deleteImageOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteImageWithContext is an alternate form of the DeleteImage method which supports a Context parameter func (vpc *VpcV1) DeleteImageWithContext(ctx context.Context, deleteImageOptions *DeleteImageOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteImageOptions, "deleteImageOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteImageOptions, "deleteImageOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -3862,6 +4377,7 @@ func (vpc *VpcV1) DeleteImageWithContext(ctx context.Context, deleteImageOptions builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/images/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -3879,10 +4395,16 @@ func (vpc *VpcV1) DeleteImageWithContext(ctx context.Context, deleteImageOptions request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_image", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -3890,17 +4412,21 @@ func (vpc *VpcV1) DeleteImageWithContext(ctx context.Context, deleteImageOptions // GetImage : Retrieve an image // This request retrieves a single image specified by the identifier in the URL. func (vpc *VpcV1) GetImage(getImageOptions *GetImageOptions) (result *Image, response *core.DetailedResponse, err error) { - return vpc.GetImageWithContext(context.Background(), getImageOptions) + result, response, err = vpc.GetImageWithContext(context.Background(), getImageOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetImageWithContext is an alternate form of the GetImage method which supports a Context parameter func (vpc *VpcV1) GetImageWithContext(ctx context.Context, getImageOptions *GetImageOptions) (result *Image, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getImageOptions, "getImageOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getImageOptions, "getImageOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -3913,6 +4439,7 @@ func (vpc *VpcV1) GetImageWithContext(ctx context.Context, getImageOptions *GetI builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/images/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -3931,17 +4458,21 @@ func (vpc *VpcV1) GetImageWithContext(ctx context.Context, getImageOptions *GetI request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_image", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalImage) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -3955,17 +4486,21 @@ func (vpc *VpcV1) GetImageWithContext(ctx context.Context, getImageOptions *GetI // the same way as a retrieved image and contains only the information to be updated. A system-provided image is not // allowed to be updated. An image with a `status` of `deleting` cannot be updated. func (vpc *VpcV1) UpdateImage(updateImageOptions *UpdateImageOptions) (result *Image, response *core.DetailedResponse, err error) { - return vpc.UpdateImageWithContext(context.Background(), updateImageOptions) + result, response, err = vpc.UpdateImageWithContext(context.Background(), updateImageOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateImageWithContext is an alternate form of the UpdateImage method which supports a Context parameter func (vpc *VpcV1) UpdateImageWithContext(ctx context.Context, updateImageOptions *UpdateImageOptions) (result *Image, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateImageOptions, "updateImageOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateImageOptions, "updateImageOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -3978,6 +4513,7 @@ func (vpc *VpcV1) UpdateImageWithContext(ctx context.Context, updateImageOptions builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/images/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -3997,22 +4533,27 @@ func (vpc *VpcV1) UpdateImageWithContext(ctx context.Context, updateImageOptions _, err = builder.SetBodyContentJSON(updateImageOptions.ImagePatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_image", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalImage) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -4035,17 +4576,21 @@ func (vpc *VpcV1) UpdateImageWithContext(ctx context.Context, updateImageOptions // // A system-provided image is not allowed to be deprecated. func (vpc *VpcV1) DeprecateImage(deprecateImageOptions *DeprecateImageOptions) (response *core.DetailedResponse, err error) { - return vpc.DeprecateImageWithContext(context.Background(), deprecateImageOptions) + response, err = vpc.DeprecateImageWithContext(context.Background(), deprecateImageOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeprecateImageWithContext is an alternate form of the DeprecateImage method which supports a Context parameter func (vpc *VpcV1) DeprecateImageWithContext(ctx context.Context, deprecateImageOptions *DeprecateImageOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deprecateImageOptions, "deprecateImageOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deprecateImageOptions, "deprecateImageOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -4058,6 +4603,7 @@ func (vpc *VpcV1) DeprecateImageWithContext(ctx context.Context, deprecateImageO builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/images/{id}/deprecate`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -4075,10 +4621,16 @@ func (vpc *VpcV1) DeprecateImageWithContext(ctx context.Context, deprecateImageO request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "deprecate_image", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -4095,17 +4647,21 @@ func (vpc *VpcV1) DeprecateImageWithContext(ctx context.Context, deprecateImageO // // A system-provided image is not allowed to be obsoleted. func (vpc *VpcV1) ObsoleteImage(obsoleteImageOptions *ObsoleteImageOptions) (response *core.DetailedResponse, err error) { - return vpc.ObsoleteImageWithContext(context.Background(), obsoleteImageOptions) + response, err = vpc.ObsoleteImageWithContext(context.Background(), obsoleteImageOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ObsoleteImageWithContext is an alternate form of the ObsoleteImage method which supports a Context parameter func (vpc *VpcV1) ObsoleteImageWithContext(ctx context.Context, obsoleteImageOptions *ObsoleteImageOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(obsoleteImageOptions, "obsoleteImageOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(obsoleteImageOptions, "obsoleteImageOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -4118,6 +4674,7 @@ func (vpc *VpcV1) ObsoleteImageWithContext(ctx context.Context, obsoleteImageOpt builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/images/{id}/obsolete`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -4135,10 +4692,16 @@ func (vpc *VpcV1) ObsoleteImageWithContext(ctx context.Context, obsoleteImageOpt request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "obsolete_image", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -4151,17 +4714,21 @@ func (vpc *VpcV1) ObsoleteImageWithContext(ctx context.Context, obsoleteImageOpt // `created_at` property values will in turn be sorted by ascending // `name` property values. func (vpc *VpcV1) ListImageExportJobs(listImageExportJobsOptions *ListImageExportJobsOptions) (result *ImageExportJobUnpaginatedCollection, response *core.DetailedResponse, err error) { - return vpc.ListImageExportJobsWithContext(context.Background(), listImageExportJobsOptions) + result, response, err = vpc.ListImageExportJobsWithContext(context.Background(), listImageExportJobsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListImageExportJobsWithContext is an alternate form of the ListImageExportJobs method which supports a Context parameter func (vpc *VpcV1) ListImageExportJobsWithContext(ctx context.Context, listImageExportJobsOptions *ListImageExportJobsOptions) (result *ImageExportJobUnpaginatedCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listImageExportJobsOptions, "listImageExportJobsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listImageExportJobsOptions, "listImageExportJobsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -4174,6 +4741,7 @@ func (vpc *VpcV1) ListImageExportJobsWithContext(ctx context.Context, listImageE builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/images/{image_id}/export_jobs`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -4195,17 +4763,21 @@ func (vpc *VpcV1) ListImageExportJobsWithContext(ctx context.Context, listImageE request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_image_export_jobs", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalImageExportJobUnpaginatedCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -4220,17 +4792,21 @@ func (vpc *VpcV1) ListImageExportJobsWithContext(ctx context.Context, listImageE // `unusable` state. The prototype object is structured in the same way as a retrieved image export job, and contains // the information necessary to create and queue the new image export job. func (vpc *VpcV1) CreateImageExportJob(createImageExportJobOptions *CreateImageExportJobOptions) (result *ImageExportJob, response *core.DetailedResponse, err error) { - return vpc.CreateImageExportJobWithContext(context.Background(), createImageExportJobOptions) + result, response, err = vpc.CreateImageExportJobWithContext(context.Background(), createImageExportJobOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateImageExportJobWithContext is an alternate form of the CreateImageExportJob method which supports a Context parameter func (vpc *VpcV1) CreateImageExportJobWithContext(ctx context.Context, createImageExportJobOptions *CreateImageExportJobOptions) (result *ImageExportJob, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createImageExportJobOptions, "createImageExportJobOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createImageExportJobOptions, "createImageExportJobOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -4243,6 +4819,7 @@ func (vpc *VpcV1) CreateImageExportJobWithContext(ctx context.Context, createIma builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/images/{image_id}/export_jobs`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -4272,22 +4849,27 @@ func (vpc *VpcV1) CreateImageExportJobWithContext(ctx context.Context, createIma } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_image_export_job", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalImageExportJob) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -4301,17 +4883,21 @@ func (vpc *VpcV1) CreateImageExportJobWithContext(ctx context.Context, createIma // will be canceled, and the incomplete exported image object deleted. If the job has completed, the exported image // object will not be deleted. func (vpc *VpcV1) DeleteImageExportJob(deleteImageExportJobOptions *DeleteImageExportJobOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteImageExportJobWithContext(context.Background(), deleteImageExportJobOptions) + response, err = vpc.DeleteImageExportJobWithContext(context.Background(), deleteImageExportJobOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteImageExportJobWithContext is an alternate form of the DeleteImageExportJob method which supports a Context parameter func (vpc *VpcV1) DeleteImageExportJobWithContext(ctx context.Context, deleteImageExportJobOptions *DeleteImageExportJobOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteImageExportJobOptions, "deleteImageExportJobOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteImageExportJobOptions, "deleteImageExportJobOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -4325,6 +4911,7 @@ func (vpc *VpcV1) DeleteImageExportJobWithContext(ctx context.Context, deleteIma builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/images/{image_id}/export_jobs/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -4342,10 +4929,16 @@ func (vpc *VpcV1) DeleteImageExportJobWithContext(ctx context.Context, deleteIma request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_image_export_job", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -4353,17 +4946,21 @@ func (vpc *VpcV1) DeleteImageExportJobWithContext(ctx context.Context, deleteIma // GetImageExportJob : Retrieve an image export job // This request retrieves a single image export job specified by the identifier in the URL. func (vpc *VpcV1) GetImageExportJob(getImageExportJobOptions *GetImageExportJobOptions) (result *ImageExportJob, response *core.DetailedResponse, err error) { - return vpc.GetImageExportJobWithContext(context.Background(), getImageExportJobOptions) + result, response, err = vpc.GetImageExportJobWithContext(context.Background(), getImageExportJobOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetImageExportJobWithContext is an alternate form of the GetImageExportJob method which supports a Context parameter func (vpc *VpcV1) GetImageExportJobWithContext(ctx context.Context, getImageExportJobOptions *GetImageExportJobOptions) (result *ImageExportJob, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getImageExportJobOptions, "getImageExportJobOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getImageExportJobOptions, "getImageExportJobOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -4377,6 +4974,7 @@ func (vpc *VpcV1) GetImageExportJobWithContext(ctx context.Context, getImageExpo builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/images/{image_id}/export_jobs/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -4395,17 +4993,21 @@ func (vpc *VpcV1) GetImageExportJobWithContext(ctx context.Context, getImageExpo request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_image_export_job", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalImageExportJob) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -4419,17 +5021,21 @@ func (vpc *VpcV1) GetImageExportJobWithContext(ctx context.Context, getImageExpo // job patch object is structured in the same way as a retrieved image export job and contains only the information to // be updated. func (vpc *VpcV1) UpdateImageExportJob(updateImageExportJobOptions *UpdateImageExportJobOptions) (result *ImageExportJob, response *core.DetailedResponse, err error) { - return vpc.UpdateImageExportJobWithContext(context.Background(), updateImageExportJobOptions) + result, response, err = vpc.UpdateImageExportJobWithContext(context.Background(), updateImageExportJobOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateImageExportJobWithContext is an alternate form of the UpdateImageExportJob method which supports a Context parameter func (vpc *VpcV1) UpdateImageExportJobWithContext(ctx context.Context, updateImageExportJobOptions *UpdateImageExportJobOptions) (result *ImageExportJob, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateImageExportJobOptions, "updateImageExportJobOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateImageExportJobOptions, "updateImageExportJobOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -4443,6 +5049,7 @@ func (vpc *VpcV1) UpdateImageExportJobWithContext(ctx context.Context, updateIma builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/images/{image_id}/export_jobs/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -4462,22 +5069,27 @@ func (vpc *VpcV1) UpdateImageExportJobWithContext(ctx context.Context, updateIma _, err = builder.SetBodyContentJSON(updateImageExportJobOptions.ImageExportJobPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_image_export_job", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalImageExportJob) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -4489,13 +5101,16 @@ func (vpc *VpcV1) UpdateImageExportJobWithContext(ctx context.Context, updateIma // ListOperatingSystems : List all operating systems // This request lists all operating systems in the region. func (vpc *VpcV1) ListOperatingSystems(listOperatingSystemsOptions *ListOperatingSystemsOptions) (result *OperatingSystemCollection, response *core.DetailedResponse, err error) { - return vpc.ListOperatingSystemsWithContext(context.Background(), listOperatingSystemsOptions) + result, response, err = vpc.ListOperatingSystemsWithContext(context.Background(), listOperatingSystemsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListOperatingSystemsWithContext is an alternate form of the ListOperatingSystems method which supports a Context parameter func (vpc *VpcV1) ListOperatingSystemsWithContext(ctx context.Context, listOperatingSystemsOptions *ListOperatingSystemsOptions) (result *OperatingSystemCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listOperatingSystemsOptions, "listOperatingSystemsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -4504,6 +5119,7 @@ func (vpc *VpcV1) ListOperatingSystemsWithContext(ctx context.Context, listOpera builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/operating_systems`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -4528,17 +5144,21 @@ func (vpc *VpcV1) ListOperatingSystemsWithContext(ctx context.Context, listOpera request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_operating_systems", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalOperatingSystemCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -4550,17 +5170,21 @@ func (vpc *VpcV1) ListOperatingSystemsWithContext(ctx context.Context, listOpera // GetOperatingSystem : Retrieve an operating system // This request retrieves a single operating system specified by the name in the URL. func (vpc *VpcV1) GetOperatingSystem(getOperatingSystemOptions *GetOperatingSystemOptions) (result *OperatingSystem, response *core.DetailedResponse, err error) { - return vpc.GetOperatingSystemWithContext(context.Background(), getOperatingSystemOptions) + result, response, err = vpc.GetOperatingSystemWithContext(context.Background(), getOperatingSystemOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetOperatingSystemWithContext is an alternate form of the GetOperatingSystem method which supports a Context parameter func (vpc *VpcV1) GetOperatingSystemWithContext(ctx context.Context, getOperatingSystemOptions *GetOperatingSystemOptions) (result *OperatingSystem, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getOperatingSystemOptions, "getOperatingSystemOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getOperatingSystemOptions, "getOperatingSystemOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -4573,6 +5197,7 @@ func (vpc *VpcV1) GetOperatingSystemWithContext(ctx context.Context, getOperatin builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/operating_systems/{name}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -4591,17 +5216,21 @@ func (vpc *VpcV1) GetOperatingSystemWithContext(ctx context.Context, getOperatin request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_operating_system", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalOperatingSystem) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -4614,13 +5243,16 @@ func (vpc *VpcV1) GetOperatingSystemWithContext(ctx context.Context, getOperatin // This request lists all keys in the region. A key contains a public SSH key which may be installed on instances when // they are created. Private keys are not stored. func (vpc *VpcV1) ListKeys(listKeysOptions *ListKeysOptions) (result *KeyCollection, response *core.DetailedResponse, err error) { - return vpc.ListKeysWithContext(context.Background(), listKeysOptions) + result, response, err = vpc.ListKeysWithContext(context.Background(), listKeysOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListKeysWithContext is an alternate form of the ListKeys method which supports a Context parameter func (vpc *VpcV1) ListKeysWithContext(ctx context.Context, listKeysOptions *ListKeysOptions) (result *KeyCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listKeysOptions, "listKeysOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -4629,6 +5261,7 @@ func (vpc *VpcV1) ListKeysWithContext(ctx context.Context, listKeysOptions *List builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/keys`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -4653,17 +5286,21 @@ func (vpc *VpcV1) ListKeysWithContext(ctx context.Context, listKeysOptions *List request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_keys", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalKeyCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -4677,17 +5314,21 @@ func (vpc *VpcV1) ListKeysWithContext(ctx context.Context, listKeysOptions *List // as a retrieved key, and contains the information necessary to create the new key. The public key value must be // provided. func (vpc *VpcV1) CreateKey(createKeyOptions *CreateKeyOptions) (result *Key, response *core.DetailedResponse, err error) { - return vpc.CreateKeyWithContext(context.Background(), createKeyOptions) + result, response, err = vpc.CreateKeyWithContext(context.Background(), createKeyOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateKeyWithContext is an alternate form of the CreateKey method which supports a Context parameter func (vpc *VpcV1) CreateKeyWithContext(ctx context.Context, createKeyOptions *CreateKeyOptions) (result *Key, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createKeyOptions, "createKeyOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createKeyOptions, "createKeyOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -4696,6 +5337,7 @@ func (vpc *VpcV1) CreateKeyWithContext(ctx context.Context, createKeyOptions *Cr builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/keys`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -4728,22 +5370,27 @@ func (vpc *VpcV1) CreateKeyWithContext(ctx context.Context, createKeyOptions *Cr } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_key", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalKey) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -4755,17 +5402,21 @@ func (vpc *VpcV1) CreateKeyWithContext(ctx context.Context, createKeyOptions *Cr // DeleteKey : Delete a key // This request deletes a key. This operation cannot be reversed. func (vpc *VpcV1) DeleteKey(deleteKeyOptions *DeleteKeyOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteKeyWithContext(context.Background(), deleteKeyOptions) + response, err = vpc.DeleteKeyWithContext(context.Background(), deleteKeyOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteKeyWithContext is an alternate form of the DeleteKey method which supports a Context parameter func (vpc *VpcV1) DeleteKeyWithContext(ctx context.Context, deleteKeyOptions *DeleteKeyOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteKeyOptions, "deleteKeyOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteKeyOptions, "deleteKeyOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -4778,6 +5429,7 @@ func (vpc *VpcV1) DeleteKeyWithContext(ctx context.Context, deleteKeyOptions *De builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/keys/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -4795,10 +5447,16 @@ func (vpc *VpcV1) DeleteKeyWithContext(ctx context.Context, deleteKeyOptions *De request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_key", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -4806,17 +5464,21 @@ func (vpc *VpcV1) DeleteKeyWithContext(ctx context.Context, deleteKeyOptions *De // GetKey : Retrieve a key // This request retrieves a single key specified by the identifier in the URL. func (vpc *VpcV1) GetKey(getKeyOptions *GetKeyOptions) (result *Key, response *core.DetailedResponse, err error) { - return vpc.GetKeyWithContext(context.Background(), getKeyOptions) + result, response, err = vpc.GetKeyWithContext(context.Background(), getKeyOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetKeyWithContext is an alternate form of the GetKey method which supports a Context parameter func (vpc *VpcV1) GetKeyWithContext(ctx context.Context, getKeyOptions *GetKeyOptions) (result *Key, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getKeyOptions, "getKeyOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getKeyOptions, "getKeyOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -4829,6 +5491,7 @@ func (vpc *VpcV1) GetKeyWithContext(ctx context.Context, getKeyOptions *GetKeyOp builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/keys/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -4847,17 +5510,21 @@ func (vpc *VpcV1) GetKeyWithContext(ctx context.Context, getKeyOptions *GetKeyOp request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_key", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalKey) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -4869,17 +5536,21 @@ func (vpc *VpcV1) GetKeyWithContext(ctx context.Context, getKeyOptions *GetKeyOp // UpdateKey : Update a key // This request updates a key's name. func (vpc *VpcV1) UpdateKey(updateKeyOptions *UpdateKeyOptions) (result *Key, response *core.DetailedResponse, err error) { - return vpc.UpdateKeyWithContext(context.Background(), updateKeyOptions) + result, response, err = vpc.UpdateKeyWithContext(context.Background(), updateKeyOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateKeyWithContext is an alternate form of the UpdateKey method which supports a Context parameter func (vpc *VpcV1) UpdateKeyWithContext(ctx context.Context, updateKeyOptions *UpdateKeyOptions) (result *Key, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateKeyOptions, "updateKeyOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateKeyOptions, "updateKeyOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -4892,6 +5563,7 @@ func (vpc *VpcV1) UpdateKeyWithContext(ctx context.Context, updateKeyOptions *Up builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/keys/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -4911,22 +5583,27 @@ func (vpc *VpcV1) UpdateKeyWithContext(ctx context.Context, updateKeyOptions *Up _, err = builder.SetBodyContentJSON(updateKeyOptions.KeyPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_key", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalKey) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -4939,13 +5616,16 @@ func (vpc *VpcV1) UpdateKeyWithContext(ctx context.Context, updateKeyOptions *Up // This request lists provisionable [instance profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) in the // region. An instance profile specifies the performance characteristics and pricing model for an instance. func (vpc *VpcV1) ListInstanceProfiles(listInstanceProfilesOptions *ListInstanceProfilesOptions) (result *InstanceProfileCollection, response *core.DetailedResponse, err error) { - return vpc.ListInstanceProfilesWithContext(context.Background(), listInstanceProfilesOptions) + result, response, err = vpc.ListInstanceProfilesWithContext(context.Background(), listInstanceProfilesOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListInstanceProfilesWithContext is an alternate form of the ListInstanceProfiles method which supports a Context parameter func (vpc *VpcV1) ListInstanceProfilesWithContext(ctx context.Context, listInstanceProfilesOptions *ListInstanceProfilesOptions) (result *InstanceProfileCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listInstanceProfilesOptions, "listInstanceProfilesOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -4954,6 +5634,7 @@ func (vpc *VpcV1) ListInstanceProfilesWithContext(ctx context.Context, listInsta builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance/profiles`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -4972,17 +5653,21 @@ func (vpc *VpcV1) ListInstanceProfilesWithContext(ctx context.Context, listInsta request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_instance_profiles", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceProfileCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -4994,17 +5679,21 @@ func (vpc *VpcV1) ListInstanceProfilesWithContext(ctx context.Context, listInsta // GetInstanceProfile : Retrieve an instance profile // This request retrieves a single instance profile specified by the name in the URL. func (vpc *VpcV1) GetInstanceProfile(getInstanceProfileOptions *GetInstanceProfileOptions) (result *InstanceProfile, response *core.DetailedResponse, err error) { - return vpc.GetInstanceProfileWithContext(context.Background(), getInstanceProfileOptions) + result, response, err = vpc.GetInstanceProfileWithContext(context.Background(), getInstanceProfileOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetInstanceProfileWithContext is an alternate form of the GetInstanceProfile method which supports a Context parameter func (vpc *VpcV1) GetInstanceProfileWithContext(ctx context.Context, getInstanceProfileOptions *GetInstanceProfileOptions) (result *InstanceProfile, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getInstanceProfileOptions, "getInstanceProfileOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getInstanceProfileOptions, "getInstanceProfileOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -5017,6 +5706,7 @@ func (vpc *VpcV1) GetInstanceProfileWithContext(ctx context.Context, getInstance builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance/profiles/{name}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -5035,17 +5725,21 @@ func (vpc *VpcV1) GetInstanceProfileWithContext(ctx context.Context, getInstance request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_instance_profile", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceProfile) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -5057,13 +5751,16 @@ func (vpc *VpcV1) GetInstanceProfileWithContext(ctx context.Context, getInstance // ListInstanceTemplates : List all instance templates // This request lists all instance templates in the region. func (vpc *VpcV1) ListInstanceTemplates(listInstanceTemplatesOptions *ListInstanceTemplatesOptions) (result *InstanceTemplateCollection, response *core.DetailedResponse, err error) { - return vpc.ListInstanceTemplatesWithContext(context.Background(), listInstanceTemplatesOptions) + result, response, err = vpc.ListInstanceTemplatesWithContext(context.Background(), listInstanceTemplatesOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListInstanceTemplatesWithContext is an alternate form of the ListInstanceTemplates method which supports a Context parameter func (vpc *VpcV1) ListInstanceTemplatesWithContext(ctx context.Context, listInstanceTemplatesOptions *ListInstanceTemplatesOptions) (result *InstanceTemplateCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listInstanceTemplatesOptions, "listInstanceTemplatesOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -5072,6 +5769,7 @@ func (vpc *VpcV1) ListInstanceTemplatesWithContext(ctx context.Context, listInst builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance/templates`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -5090,17 +5788,21 @@ func (vpc *VpcV1) ListInstanceTemplatesWithContext(ctx context.Context, listInst request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_instance_templates", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceTemplateCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -5116,17 +5818,21 @@ func (vpc *VpcV1) ListInstanceTemplatesWithContext(ctx context.Context, listInst // If a `source_template` is specified in the prototype object, its contents are copied into the new template prior to // copying any other properties provided in the prototype object. func (vpc *VpcV1) CreateInstanceTemplate(createInstanceTemplateOptions *CreateInstanceTemplateOptions) (result InstanceTemplateIntf, response *core.DetailedResponse, err error) { - return vpc.CreateInstanceTemplateWithContext(context.Background(), createInstanceTemplateOptions) + result, response, err = vpc.CreateInstanceTemplateWithContext(context.Background(), createInstanceTemplateOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateInstanceTemplateWithContext is an alternate form of the CreateInstanceTemplate method which supports a Context parameter func (vpc *VpcV1) CreateInstanceTemplateWithContext(ctx context.Context, createInstanceTemplateOptions *CreateInstanceTemplateOptions) (result InstanceTemplateIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createInstanceTemplateOptions, "createInstanceTemplateOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createInstanceTemplateOptions, "createInstanceTemplateOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -5135,6 +5841,7 @@ func (vpc *VpcV1) CreateInstanceTemplateWithContext(ctx context.Context, createI builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance/templates`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -5154,22 +5861,27 @@ func (vpc *VpcV1) CreateInstanceTemplateWithContext(ctx context.Context, createI _, err = builder.SetBodyContentJSON(createInstanceTemplateOptions.InstanceTemplatePrototype) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_instance_template", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceTemplate) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -5181,17 +5893,21 @@ func (vpc *VpcV1) CreateInstanceTemplateWithContext(ctx context.Context, createI // DeleteInstanceTemplate : Delete an instance template // This request deletes the instance template. This operation cannot be reversed. func (vpc *VpcV1) DeleteInstanceTemplate(deleteInstanceTemplateOptions *DeleteInstanceTemplateOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteInstanceTemplateWithContext(context.Background(), deleteInstanceTemplateOptions) + response, err = vpc.DeleteInstanceTemplateWithContext(context.Background(), deleteInstanceTemplateOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteInstanceTemplateWithContext is an alternate form of the DeleteInstanceTemplate method which supports a Context parameter func (vpc *VpcV1) DeleteInstanceTemplateWithContext(ctx context.Context, deleteInstanceTemplateOptions *DeleteInstanceTemplateOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteInstanceTemplateOptions, "deleteInstanceTemplateOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteInstanceTemplateOptions, "deleteInstanceTemplateOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -5204,6 +5920,7 @@ func (vpc *VpcV1) DeleteInstanceTemplateWithContext(ctx context.Context, deleteI builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance/templates/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -5221,10 +5938,16 @@ func (vpc *VpcV1) DeleteInstanceTemplateWithContext(ctx context.Context, deleteI request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_instance_template", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -5232,17 +5955,21 @@ func (vpc *VpcV1) DeleteInstanceTemplateWithContext(ctx context.Context, deleteI // GetInstanceTemplate : Retrieve an instance template // This request retrieves a single instance template specified by the identifier in the URL. func (vpc *VpcV1) GetInstanceTemplate(getInstanceTemplateOptions *GetInstanceTemplateOptions) (result InstanceTemplateIntf, response *core.DetailedResponse, err error) { - return vpc.GetInstanceTemplateWithContext(context.Background(), getInstanceTemplateOptions) + result, response, err = vpc.GetInstanceTemplateWithContext(context.Background(), getInstanceTemplateOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetInstanceTemplateWithContext is an alternate form of the GetInstanceTemplate method which supports a Context parameter func (vpc *VpcV1) GetInstanceTemplateWithContext(ctx context.Context, getInstanceTemplateOptions *GetInstanceTemplateOptions) (result InstanceTemplateIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getInstanceTemplateOptions, "getInstanceTemplateOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getInstanceTemplateOptions, "getInstanceTemplateOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -5255,6 +5982,7 @@ func (vpc *VpcV1) GetInstanceTemplateWithContext(ctx context.Context, getInstanc builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance/templates/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -5273,17 +6001,21 @@ func (vpc *VpcV1) GetInstanceTemplateWithContext(ctx context.Context, getInstanc request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_instance_template", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceTemplate) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -5297,17 +6029,21 @@ func (vpc *VpcV1) GetInstanceTemplateWithContext(ctx context.Context, getInstanc // template patch object is structured in the same way as a retrieved instance template and contains only the // information to be updated. func (vpc *VpcV1) UpdateInstanceTemplate(updateInstanceTemplateOptions *UpdateInstanceTemplateOptions) (result InstanceTemplateIntf, response *core.DetailedResponse, err error) { - return vpc.UpdateInstanceTemplateWithContext(context.Background(), updateInstanceTemplateOptions) + result, response, err = vpc.UpdateInstanceTemplateWithContext(context.Background(), updateInstanceTemplateOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateInstanceTemplateWithContext is an alternate form of the UpdateInstanceTemplate method which supports a Context parameter func (vpc *VpcV1) UpdateInstanceTemplateWithContext(ctx context.Context, updateInstanceTemplateOptions *UpdateInstanceTemplateOptions) (result InstanceTemplateIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateInstanceTemplateOptions, "updateInstanceTemplateOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateInstanceTemplateOptions, "updateInstanceTemplateOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -5320,6 +6056,7 @@ func (vpc *VpcV1) UpdateInstanceTemplateWithContext(ctx context.Context, updateI builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance/templates/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -5339,22 +6076,27 @@ func (vpc *VpcV1) UpdateInstanceTemplateWithContext(ctx context.Context, updateI _, err = builder.SetBodyContentJSON(updateInstanceTemplateOptions.InstanceTemplatePatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_instance_template", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceTemplate) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -5366,13 +6108,16 @@ func (vpc *VpcV1) UpdateInstanceTemplateWithContext(ctx context.Context, updateI // ListInstances : List all instances // This request lists all instances in the region. func (vpc *VpcV1) ListInstances(listInstancesOptions *ListInstancesOptions) (result *InstanceCollection, response *core.DetailedResponse, err error) { - return vpc.ListInstancesWithContext(context.Background(), listInstancesOptions) + result, response, err = vpc.ListInstancesWithContext(context.Background(), listInstancesOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListInstancesWithContext is an alternate form of the ListInstances method which supports a Context parameter func (vpc *VpcV1) ListInstancesWithContext(ctx context.Context, listInstancesOptions *ListInstancesOptions) (result *InstanceCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listInstancesOptions, "listInstancesOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -5381,6 +6126,7 @@ func (vpc *VpcV1) ListInstancesWithContext(ctx context.Context, listInstancesOpt builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -5408,15 +6154,6 @@ func (vpc *VpcV1) ListInstancesWithContext(ctx context.Context, listInstancesOpt if listInstancesOptions.Name != nil { builder.AddQuery("name", fmt.Sprint(*listInstancesOptions.Name)) } - if listInstancesOptions.VPCID != nil { - builder.AddQuery("vpc.id", fmt.Sprint(*listInstancesOptions.VPCID)) - } - if listInstancesOptions.VPCCRN != nil { - builder.AddQuery("vpc.crn", fmt.Sprint(*listInstancesOptions.VPCCRN)) - } - if listInstancesOptions.VPCName != nil { - builder.AddQuery("vpc.name", fmt.Sprint(*listInstancesOptions.VPCName)) - } if listInstancesOptions.DedicatedHostID != nil { builder.AddQuery("dedicated_host.id", fmt.Sprint(*listInstancesOptions.DedicatedHostID)) } @@ -5444,20 +6181,33 @@ func (vpc *VpcV1) ListInstancesWithContext(ctx context.Context, listInstancesOpt if listInstancesOptions.ReservationName != nil { builder.AddQuery("reservation.name", fmt.Sprint(*listInstancesOptions.ReservationName)) } + if listInstancesOptions.VPCID != nil { + builder.AddQuery("vpc.id", fmt.Sprint(*listInstancesOptions.VPCID)) + } + if listInstancesOptions.VPCCRN != nil { + builder.AddQuery("vpc.crn", fmt.Sprint(*listInstancesOptions.VPCCRN)) + } + if listInstancesOptions.VPCName != nil { + builder.AddQuery("vpc.name", fmt.Sprint(*listInstancesOptions.VPCName)) + } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_instances", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -5471,17 +6221,21 @@ func (vpc *VpcV1) ListInstancesWithContext(ctx context.Context, listInstancesOpt // same way as a retrieved instance, and contains the information necessary to provision the new instance. The instance // is automatically started. func (vpc *VpcV1) CreateInstance(createInstanceOptions *CreateInstanceOptions) (result *Instance, response *core.DetailedResponse, err error) { - return vpc.CreateInstanceWithContext(context.Background(), createInstanceOptions) + result, response, err = vpc.CreateInstanceWithContext(context.Background(), createInstanceOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateInstanceWithContext is an alternate form of the CreateInstance method which supports a Context parameter func (vpc *VpcV1) CreateInstanceWithContext(ctx context.Context, createInstanceOptions *CreateInstanceOptions) (result *Instance, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createInstanceOptions, "createInstanceOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createInstanceOptions, "createInstanceOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -5490,6 +6244,7 @@ func (vpc *VpcV1) CreateInstanceWithContext(ctx context.Context, createInstanceO builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -5509,22 +6264,27 @@ func (vpc *VpcV1) CreateInstanceWithContext(ctx context.Context, createInstanceO _, err = builder.SetBodyContentJSON(createInstanceOptions.InstancePrototype) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_instance", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstance) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -5540,17 +6300,21 @@ func (vpc *VpcV1) CreateInstanceWithContext(ctx context.Context, createInstanceO // `auto_delete` set to `true` targeting the instance, the instance network attachments, the instance network // interfaces, or the automatically deleted virtual network interfaces are automatically deleted. func (vpc *VpcV1) DeleteInstance(deleteInstanceOptions *DeleteInstanceOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteInstanceWithContext(context.Background(), deleteInstanceOptions) + response, err = vpc.DeleteInstanceWithContext(context.Background(), deleteInstanceOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteInstanceWithContext is an alternate form of the DeleteInstance method which supports a Context parameter func (vpc *VpcV1) DeleteInstanceWithContext(ctx context.Context, deleteInstanceOptions *DeleteInstanceOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteInstanceOptions, "deleteInstanceOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteInstanceOptions, "deleteInstanceOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -5563,6 +6327,7 @@ func (vpc *VpcV1) DeleteInstanceWithContext(ctx context.Context, deleteInstanceO builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -5583,10 +6348,16 @@ func (vpc *VpcV1) DeleteInstanceWithContext(ctx context.Context, deleteInstanceO request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_instance", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -5594,17 +6365,21 @@ func (vpc *VpcV1) DeleteInstanceWithContext(ctx context.Context, deleteInstanceO // GetInstance : Retrieve an instance // This request retrieves a single instance specified by the identifier in the URL. func (vpc *VpcV1) GetInstance(getInstanceOptions *GetInstanceOptions) (result *Instance, response *core.DetailedResponse, err error) { - return vpc.GetInstanceWithContext(context.Background(), getInstanceOptions) + result, response, err = vpc.GetInstanceWithContext(context.Background(), getInstanceOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetInstanceWithContext is an alternate form of the GetInstance method which supports a Context parameter func (vpc *VpcV1) GetInstanceWithContext(ctx context.Context, getInstanceOptions *GetInstanceOptions) (result *Instance, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getInstanceOptions, "getInstanceOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getInstanceOptions, "getInstanceOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -5617,6 +6392,7 @@ func (vpc *VpcV1) GetInstanceWithContext(ctx context.Context, getInstanceOptions builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -5635,17 +6411,21 @@ func (vpc *VpcV1) GetInstanceWithContext(ctx context.Context, getInstanceOptions request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_instance", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstance) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -5658,17 +6438,21 @@ func (vpc *VpcV1) GetInstanceWithContext(ctx context.Context, getInstanceOptions // This request updates an instance with the information in a provided instance patch. The instance patch object is // structured in the same way as a retrieved instance and contains only the information to be updated. func (vpc *VpcV1) UpdateInstance(updateInstanceOptions *UpdateInstanceOptions) (result *Instance, response *core.DetailedResponse, err error) { - return vpc.UpdateInstanceWithContext(context.Background(), updateInstanceOptions) + result, response, err = vpc.UpdateInstanceWithContext(context.Background(), updateInstanceOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateInstanceWithContext is an alternate form of the UpdateInstance method which supports a Context parameter func (vpc *VpcV1) UpdateInstanceWithContext(ctx context.Context, updateInstanceOptions *UpdateInstanceOptions) (result *Instance, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateInstanceOptions, "updateInstanceOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateInstanceOptions, "updateInstanceOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -5681,6 +6465,7 @@ func (vpc *VpcV1) UpdateInstanceWithContext(ctx context.Context, updateInstanceO builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -5703,22 +6488,27 @@ func (vpc *VpcV1) UpdateInstanceWithContext(ctx context.Context, updateInstanceO _, err = builder.SetBodyContentJSON(updateInstanceOptions.InstancePatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_instance", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstance) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -5731,17 +6521,21 @@ func (vpc *VpcV1) UpdateInstanceWithContext(ctx context.Context, updateInstanceO // This request retrieves configuration used to initialize the instance, such as SSH keys and the Windows administrator // password. These can subsequently be changed on the instance and therefore may not be current. func (vpc *VpcV1) GetInstanceInitialization(getInstanceInitializationOptions *GetInstanceInitializationOptions) (result *InstanceInitialization, response *core.DetailedResponse, err error) { - return vpc.GetInstanceInitializationWithContext(context.Background(), getInstanceInitializationOptions) + result, response, err = vpc.GetInstanceInitializationWithContext(context.Background(), getInstanceInitializationOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetInstanceInitializationWithContext is an alternate form of the GetInstanceInitialization method which supports a Context parameter func (vpc *VpcV1) GetInstanceInitializationWithContext(ctx context.Context, getInstanceInitializationOptions *GetInstanceInitializationOptions) (result *InstanceInitialization, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getInstanceInitializationOptions, "getInstanceInitializationOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getInstanceInitializationOptions, "getInstanceInitializationOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -5754,6 +6548,7 @@ func (vpc *VpcV1) GetInstanceInitializationWithContext(ctx context.Context, getI builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{id}/initialization`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -5772,17 +6567,21 @@ func (vpc *VpcV1) GetInstanceInitializationWithContext(ctx context.Context, getI request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_instance_initialization", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceInitialization) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -5795,17 +6594,21 @@ func (vpc *VpcV1) GetInstanceInitializationWithContext(ctx context.Context, getI // This request creates a new action which will be queued up to run as soon as any pending or running actions have // completed. func (vpc *VpcV1) CreateInstanceAction(createInstanceActionOptions *CreateInstanceActionOptions) (result *InstanceAction, response *core.DetailedResponse, err error) { - return vpc.CreateInstanceActionWithContext(context.Background(), createInstanceActionOptions) + result, response, err = vpc.CreateInstanceActionWithContext(context.Background(), createInstanceActionOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateInstanceActionWithContext is an alternate form of the CreateInstanceAction method which supports a Context parameter func (vpc *VpcV1) CreateInstanceActionWithContext(ctx context.Context, createInstanceActionOptions *CreateInstanceActionOptions) (result *InstanceAction, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createInstanceActionOptions, "createInstanceActionOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createInstanceActionOptions, "createInstanceActionOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -5818,6 +6621,7 @@ func (vpc *VpcV1) CreateInstanceActionWithContext(ctx context.Context, createIns builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/actions`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -5844,22 +6648,27 @@ func (vpc *VpcV1) CreateInstanceActionWithContext(ctx context.Context, createIns } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_instance_action", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceAction) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -5874,17 +6683,21 @@ func (vpc *VpcV1) CreateInstanceActionWithContext(ctx context.Context, createIns // request. The access token is only valid for a short period of time, and a maximum of one token is valid for a given // instance at a time. func (vpc *VpcV1) CreateInstanceConsoleAccessToken(createInstanceConsoleAccessTokenOptions *CreateInstanceConsoleAccessTokenOptions) (result *InstanceConsoleAccessToken, response *core.DetailedResponse, err error) { - return vpc.CreateInstanceConsoleAccessTokenWithContext(context.Background(), createInstanceConsoleAccessTokenOptions) + result, response, err = vpc.CreateInstanceConsoleAccessTokenWithContext(context.Background(), createInstanceConsoleAccessTokenOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateInstanceConsoleAccessTokenWithContext is an alternate form of the CreateInstanceConsoleAccessToken method which supports a Context parameter func (vpc *VpcV1) CreateInstanceConsoleAccessTokenWithContext(ctx context.Context, createInstanceConsoleAccessTokenOptions *CreateInstanceConsoleAccessTokenOptions) (result *InstanceConsoleAccessToken, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createInstanceConsoleAccessTokenOptions, "createInstanceConsoleAccessTokenOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createInstanceConsoleAccessTokenOptions, "createInstanceConsoleAccessTokenOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -5897,6 +6710,7 @@ func (vpc *VpcV1) CreateInstanceConsoleAccessTokenWithContext(ctx context.Contex builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/console_access_token`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -5923,22 +6737,27 @@ func (vpc *VpcV1) CreateInstanceConsoleAccessTokenWithContext(ctx context.Contex } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_instance_console_access_token", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceConsoleAccessToken) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -5952,17 +6771,21 @@ func (vpc *VpcV1) CreateInstanceConsoleAccessTokenWithContext(ctx context.Contex // physical host and is also referred to as instance storage. By default, the listed disks are sorted by their // `created_at` property values, with the newest disk first. func (vpc *VpcV1) ListInstanceDisks(listInstanceDisksOptions *ListInstanceDisksOptions) (result *InstanceDiskCollection, response *core.DetailedResponse, err error) { - return vpc.ListInstanceDisksWithContext(context.Background(), listInstanceDisksOptions) + result, response, err = vpc.ListInstanceDisksWithContext(context.Background(), listInstanceDisksOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListInstanceDisksWithContext is an alternate form of the ListInstanceDisks method which supports a Context parameter func (vpc *VpcV1) ListInstanceDisksWithContext(ctx context.Context, listInstanceDisksOptions *ListInstanceDisksOptions) (result *InstanceDiskCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listInstanceDisksOptions, "listInstanceDisksOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listInstanceDisksOptions, "listInstanceDisksOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -5975,6 +6798,7 @@ func (vpc *VpcV1) ListInstanceDisksWithContext(ctx context.Context, listInstance builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/disks`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -5993,17 +6817,21 @@ func (vpc *VpcV1) ListInstanceDisksWithContext(ctx context.Context, listInstance request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_instance_disks", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceDiskCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -6015,17 +6843,21 @@ func (vpc *VpcV1) ListInstanceDisksWithContext(ctx context.Context, listInstance // GetInstanceDisk : Retrieve an instance disk // This request retrieves a single instance disk specified by the identifier in the URL. func (vpc *VpcV1) GetInstanceDisk(getInstanceDiskOptions *GetInstanceDiskOptions) (result *InstanceDisk, response *core.DetailedResponse, err error) { - return vpc.GetInstanceDiskWithContext(context.Background(), getInstanceDiskOptions) + result, response, err = vpc.GetInstanceDiskWithContext(context.Background(), getInstanceDiskOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetInstanceDiskWithContext is an alternate form of the GetInstanceDisk method which supports a Context parameter func (vpc *VpcV1) GetInstanceDiskWithContext(ctx context.Context, getInstanceDiskOptions *GetInstanceDiskOptions) (result *InstanceDisk, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getInstanceDiskOptions, "getInstanceDiskOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getInstanceDiskOptions, "getInstanceDiskOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -6039,6 +6871,7 @@ func (vpc *VpcV1) GetInstanceDiskWithContext(ctx context.Context, getInstanceDis builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/disks/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -6057,17 +6890,21 @@ func (vpc *VpcV1) GetInstanceDiskWithContext(ctx context.Context, getInstanceDis request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_instance_disk", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceDisk) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -6079,17 +6916,21 @@ func (vpc *VpcV1) GetInstanceDiskWithContext(ctx context.Context, getInstanceDis // UpdateInstanceDisk : Update an instance disk // This request updates the instance disk with the information in a provided patch. func (vpc *VpcV1) UpdateInstanceDisk(updateInstanceDiskOptions *UpdateInstanceDiskOptions) (result *InstanceDisk, response *core.DetailedResponse, err error) { - return vpc.UpdateInstanceDiskWithContext(context.Background(), updateInstanceDiskOptions) + result, response, err = vpc.UpdateInstanceDiskWithContext(context.Background(), updateInstanceDiskOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateInstanceDiskWithContext is an alternate form of the UpdateInstanceDisk method which supports a Context parameter func (vpc *VpcV1) UpdateInstanceDiskWithContext(ctx context.Context, updateInstanceDiskOptions *UpdateInstanceDiskOptions) (result *InstanceDisk, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateInstanceDiskOptions, "updateInstanceDiskOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateInstanceDiskOptions, "updateInstanceDiskOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -6103,6 +6944,7 @@ func (vpc *VpcV1) UpdateInstanceDiskWithContext(ctx context.Context, updateInsta builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/disks/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -6122,22 +6964,27 @@ func (vpc *VpcV1) UpdateInstanceDiskWithContext(ctx context.Context, updateInsta _, err = builder.SetBodyContentJSON(updateInstanceDiskOptions.InstanceDiskPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_instance_disk", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceDisk) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -6154,17 +7001,21 @@ func (vpc *VpcV1) UpdateInstanceDiskWithContext(ctx context.Context, updateInsta // Network attachments with identical `created_at` property values will in turn be sorted by ascending `name` property // values. func (vpc *VpcV1) ListInstanceNetworkAttachments(listInstanceNetworkAttachmentsOptions *ListInstanceNetworkAttachmentsOptions) (result *InstanceNetworkAttachmentCollection, response *core.DetailedResponse, err error) { - return vpc.ListInstanceNetworkAttachmentsWithContext(context.Background(), listInstanceNetworkAttachmentsOptions) + result, response, err = vpc.ListInstanceNetworkAttachmentsWithContext(context.Background(), listInstanceNetworkAttachmentsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListInstanceNetworkAttachmentsWithContext is an alternate form of the ListInstanceNetworkAttachments method which supports a Context parameter func (vpc *VpcV1) ListInstanceNetworkAttachmentsWithContext(ctx context.Context, listInstanceNetworkAttachmentsOptions *ListInstanceNetworkAttachmentsOptions) (result *InstanceNetworkAttachmentCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listInstanceNetworkAttachmentsOptions, "listInstanceNetworkAttachmentsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listInstanceNetworkAttachmentsOptions, "listInstanceNetworkAttachmentsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -6177,6 +7028,7 @@ func (vpc *VpcV1) ListInstanceNetworkAttachmentsWithContext(ctx context.Context, builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_attachments`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -6195,17 +7047,21 @@ func (vpc *VpcV1) ListInstanceNetworkAttachmentsWithContext(ctx context.Context, request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_instance_network_attachments", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceNetworkAttachmentCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -6219,17 +7075,21 @@ func (vpc *VpcV1) ListInstanceNetworkAttachmentsWithContext(ctx context.Context, // prototype object is structured in the same way as a retrieved instance network attachment, and contains the // information necessary to create the new instance network attachment. func (vpc *VpcV1) CreateInstanceNetworkAttachment(createInstanceNetworkAttachmentOptions *CreateInstanceNetworkAttachmentOptions) (result *InstanceNetworkAttachment, response *core.DetailedResponse, err error) { - return vpc.CreateInstanceNetworkAttachmentWithContext(context.Background(), createInstanceNetworkAttachmentOptions) + result, response, err = vpc.CreateInstanceNetworkAttachmentWithContext(context.Background(), createInstanceNetworkAttachmentOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateInstanceNetworkAttachmentWithContext is an alternate form of the CreateInstanceNetworkAttachment method which supports a Context parameter func (vpc *VpcV1) CreateInstanceNetworkAttachmentWithContext(ctx context.Context, createInstanceNetworkAttachmentOptions *CreateInstanceNetworkAttachmentOptions) (result *InstanceNetworkAttachment, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createInstanceNetworkAttachmentOptions, "createInstanceNetworkAttachmentOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createInstanceNetworkAttachmentOptions, "createInstanceNetworkAttachmentOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -6242,6 +7102,7 @@ func (vpc *VpcV1) CreateInstanceNetworkAttachmentWithContext(ctx context.Context builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_attachments`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -6268,22 +7129,27 @@ func (vpc *VpcV1) CreateInstanceNetworkAttachmentWithContext(ctx context.Context } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_instance_network_attachment", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceNetworkAttachment) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -6298,17 +7164,21 @@ func (vpc *VpcV1) CreateInstanceNetworkAttachmentWithContext(ctx context.Context // `true` targeting the instance network attachment are automatically deleted. The primary instance network attachment // is not allowed to be deleted. func (vpc *VpcV1) DeleteInstanceNetworkAttachment(deleteInstanceNetworkAttachmentOptions *DeleteInstanceNetworkAttachmentOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteInstanceNetworkAttachmentWithContext(context.Background(), deleteInstanceNetworkAttachmentOptions) + response, err = vpc.DeleteInstanceNetworkAttachmentWithContext(context.Background(), deleteInstanceNetworkAttachmentOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteInstanceNetworkAttachmentWithContext is an alternate form of the DeleteInstanceNetworkAttachment method which supports a Context parameter func (vpc *VpcV1) DeleteInstanceNetworkAttachmentWithContext(ctx context.Context, deleteInstanceNetworkAttachmentOptions *DeleteInstanceNetworkAttachmentOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteInstanceNetworkAttachmentOptions, "deleteInstanceNetworkAttachmentOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteInstanceNetworkAttachmentOptions, "deleteInstanceNetworkAttachmentOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -6322,6 +7192,7 @@ func (vpc *VpcV1) DeleteInstanceNetworkAttachmentWithContext(ctx context.Context builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_attachments/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -6339,10 +7210,16 @@ func (vpc *VpcV1) DeleteInstanceNetworkAttachmentWithContext(ctx context.Context request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_instance_network_attachment", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -6350,17 +7227,21 @@ func (vpc *VpcV1) DeleteInstanceNetworkAttachmentWithContext(ctx context.Context // GetInstanceNetworkAttachment : Retrieve an instance network attachment // This request retrieves a single instance network attachment specified by the identifier in the URL. func (vpc *VpcV1) GetInstanceNetworkAttachment(getInstanceNetworkAttachmentOptions *GetInstanceNetworkAttachmentOptions) (result *InstanceNetworkAttachment, response *core.DetailedResponse, err error) { - return vpc.GetInstanceNetworkAttachmentWithContext(context.Background(), getInstanceNetworkAttachmentOptions) + result, response, err = vpc.GetInstanceNetworkAttachmentWithContext(context.Background(), getInstanceNetworkAttachmentOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetInstanceNetworkAttachmentWithContext is an alternate form of the GetInstanceNetworkAttachment method which supports a Context parameter func (vpc *VpcV1) GetInstanceNetworkAttachmentWithContext(ctx context.Context, getInstanceNetworkAttachmentOptions *GetInstanceNetworkAttachmentOptions) (result *InstanceNetworkAttachment, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getInstanceNetworkAttachmentOptions, "getInstanceNetworkAttachmentOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getInstanceNetworkAttachmentOptions, "getInstanceNetworkAttachmentOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -6374,6 +7255,7 @@ func (vpc *VpcV1) GetInstanceNetworkAttachmentWithContext(ctx context.Context, g builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_attachments/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -6392,17 +7274,21 @@ func (vpc *VpcV1) GetInstanceNetworkAttachmentWithContext(ctx context.Context, g request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_instance_network_attachment", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceNetworkAttachment) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -6416,17 +7302,21 @@ func (vpc *VpcV1) GetInstanceNetworkAttachmentWithContext(ctx context.Context, g // patch object. The instance network attachment patch object is structured in the same way as a retrieved instance // network attachment and needs to contain only the information to be updated. func (vpc *VpcV1) UpdateInstanceNetworkAttachment(updateInstanceNetworkAttachmentOptions *UpdateInstanceNetworkAttachmentOptions) (result *InstanceNetworkAttachment, response *core.DetailedResponse, err error) { - return vpc.UpdateInstanceNetworkAttachmentWithContext(context.Background(), updateInstanceNetworkAttachmentOptions) + result, response, err = vpc.UpdateInstanceNetworkAttachmentWithContext(context.Background(), updateInstanceNetworkAttachmentOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateInstanceNetworkAttachmentWithContext is an alternate form of the UpdateInstanceNetworkAttachment method which supports a Context parameter func (vpc *VpcV1) UpdateInstanceNetworkAttachmentWithContext(ctx context.Context, updateInstanceNetworkAttachmentOptions *UpdateInstanceNetworkAttachmentOptions) (result *InstanceNetworkAttachment, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateInstanceNetworkAttachmentOptions, "updateInstanceNetworkAttachmentOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateInstanceNetworkAttachmentOptions, "updateInstanceNetworkAttachmentOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -6440,6 +7330,7 @@ func (vpc *VpcV1) UpdateInstanceNetworkAttachmentWithContext(ctx context.Context builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_attachments/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -6459,22 +7350,27 @@ func (vpc *VpcV1) UpdateInstanceNetworkAttachmentWithContext(ctx context.Context _, err = builder.SetBodyContentJSON(updateInstanceNetworkAttachmentOptions.InstanceNetworkAttachmentPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_instance_network_attachment", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceNetworkAttachment) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -6493,17 +7389,21 @@ func (vpc *VpcV1) UpdateInstanceNetworkAttachmentWithContext(ctx context.Context // representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients) of its corresponding network // attachment and its attached virtual network interface. func (vpc *VpcV1) ListInstanceNetworkInterfaces(listInstanceNetworkInterfacesOptions *ListInstanceNetworkInterfacesOptions) (result *NetworkInterfaceUnpaginatedCollection, response *core.DetailedResponse, err error) { - return vpc.ListInstanceNetworkInterfacesWithContext(context.Background(), listInstanceNetworkInterfacesOptions) + result, response, err = vpc.ListInstanceNetworkInterfacesWithContext(context.Background(), listInstanceNetworkInterfacesOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListInstanceNetworkInterfacesWithContext is an alternate form of the ListInstanceNetworkInterfaces method which supports a Context parameter func (vpc *VpcV1) ListInstanceNetworkInterfacesWithContext(ctx context.Context, listInstanceNetworkInterfacesOptions *ListInstanceNetworkInterfacesOptions) (result *NetworkInterfaceUnpaginatedCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listInstanceNetworkInterfacesOptions, "listInstanceNetworkInterfacesOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listInstanceNetworkInterfacesOptions, "listInstanceNetworkInterfacesOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -6516,6 +7416,7 @@ func (vpc *VpcV1) ListInstanceNetworkInterfacesWithContext(ctx context.Context, builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_interfaces`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -6534,17 +7435,21 @@ func (vpc *VpcV1) ListInstanceNetworkInterfacesWithContext(ctx context.Context, request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_instance_network_interfaces", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkInterfaceUnpaginatedCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -6563,17 +7468,21 @@ func (vpc *VpcV1) ListInstanceNetworkInterfacesWithContext(ctx context.Context, // representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients) of its corresponding network // attachment and its attached virtual network interface, and new network interfaces are not allowed to be created. func (vpc *VpcV1) CreateInstanceNetworkInterface(createInstanceNetworkInterfaceOptions *CreateInstanceNetworkInterfaceOptions) (result *NetworkInterface, response *core.DetailedResponse, err error) { - return vpc.CreateInstanceNetworkInterfaceWithContext(context.Background(), createInstanceNetworkInterfaceOptions) + result, response, err = vpc.CreateInstanceNetworkInterfaceWithContext(context.Background(), createInstanceNetworkInterfaceOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateInstanceNetworkInterfaceWithContext is an alternate form of the CreateInstanceNetworkInterface method which supports a Context parameter func (vpc *VpcV1) CreateInstanceNetworkInterfaceWithContext(ctx context.Context, createInstanceNetworkInterfaceOptions *CreateInstanceNetworkInterfaceOptions) (result *NetworkInterface, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createInstanceNetworkInterfaceOptions, "createInstanceNetworkInterfaceOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createInstanceNetworkInterfaceOptions, "createInstanceNetworkInterfaceOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -6586,6 +7495,7 @@ func (vpc *VpcV1) CreateInstanceNetworkInterfaceWithContext(ctx context.Context, builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_interfaces`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -6621,22 +7531,27 @@ func (vpc *VpcV1) CreateInstanceNetworkInterfaceWithContext(ctx context.Context, } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_instance_network_interface", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkInterface) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -6655,17 +7570,21 @@ func (vpc *VpcV1) CreateInstanceNetworkInterfaceWithContext(ctx context.Context, // representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients) of its corresponding network // attachment and its attached virtual network interface, and is not allowed to be deleted. func (vpc *VpcV1) DeleteInstanceNetworkInterface(deleteInstanceNetworkInterfaceOptions *DeleteInstanceNetworkInterfaceOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteInstanceNetworkInterfaceWithContext(context.Background(), deleteInstanceNetworkInterfaceOptions) + response, err = vpc.DeleteInstanceNetworkInterfaceWithContext(context.Background(), deleteInstanceNetworkInterfaceOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteInstanceNetworkInterfaceWithContext is an alternate form of the DeleteInstanceNetworkInterface method which supports a Context parameter func (vpc *VpcV1) DeleteInstanceNetworkInterfaceWithContext(ctx context.Context, deleteInstanceNetworkInterfaceOptions *DeleteInstanceNetworkInterfaceOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteInstanceNetworkInterfaceOptions, "deleteInstanceNetworkInterfaceOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteInstanceNetworkInterfaceOptions, "deleteInstanceNetworkInterfaceOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -6679,6 +7598,7 @@ func (vpc *VpcV1) DeleteInstanceNetworkInterfaceWithContext(ctx context.Context, builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_interfaces/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -6696,10 +7616,16 @@ func (vpc *VpcV1) DeleteInstanceNetworkInterfaceWithContext(ctx context.Context, request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_instance_network_interface", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -6711,17 +7637,21 @@ func (vpc *VpcV1) DeleteInstanceNetworkInterfaceWithContext(ctx context.Context, // [read-only representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients) of its // corresponding network attachment and its attached virtual network interface. func (vpc *VpcV1) GetInstanceNetworkInterface(getInstanceNetworkInterfaceOptions *GetInstanceNetworkInterfaceOptions) (result *NetworkInterface, response *core.DetailedResponse, err error) { - return vpc.GetInstanceNetworkInterfaceWithContext(context.Background(), getInstanceNetworkInterfaceOptions) + result, response, err = vpc.GetInstanceNetworkInterfaceWithContext(context.Background(), getInstanceNetworkInterfaceOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetInstanceNetworkInterfaceWithContext is an alternate form of the GetInstanceNetworkInterface method which supports a Context parameter func (vpc *VpcV1) GetInstanceNetworkInterfaceWithContext(ctx context.Context, getInstanceNetworkInterfaceOptions *GetInstanceNetworkInterfaceOptions) (result *NetworkInterface, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getInstanceNetworkInterfaceOptions, "getInstanceNetworkInterfaceOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getInstanceNetworkInterfaceOptions, "getInstanceNetworkInterfaceOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -6735,6 +7665,7 @@ func (vpc *VpcV1) GetInstanceNetworkInterfaceWithContext(ctx context.Context, ge builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_interfaces/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -6753,17 +7684,21 @@ func (vpc *VpcV1) GetInstanceNetworkInterfaceWithContext(ctx context.Context, ge request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_instance_network_interface", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkInterface) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -6781,17 +7716,21 @@ func (vpc *VpcV1) GetInstanceNetworkInterfaceWithContext(ctx context.Context, ge // representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients) of its corresponding network // attachment and its attached virtual network interface, and is not allowed to be updated. func (vpc *VpcV1) UpdateInstanceNetworkInterface(updateInstanceNetworkInterfaceOptions *UpdateInstanceNetworkInterfaceOptions) (result *NetworkInterface, response *core.DetailedResponse, err error) { - return vpc.UpdateInstanceNetworkInterfaceWithContext(context.Background(), updateInstanceNetworkInterfaceOptions) + result, response, err = vpc.UpdateInstanceNetworkInterfaceWithContext(context.Background(), updateInstanceNetworkInterfaceOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateInstanceNetworkInterfaceWithContext is an alternate form of the UpdateInstanceNetworkInterface method which supports a Context parameter func (vpc *VpcV1) UpdateInstanceNetworkInterfaceWithContext(ctx context.Context, updateInstanceNetworkInterfaceOptions *UpdateInstanceNetworkInterfaceOptions) (result *NetworkInterface, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateInstanceNetworkInterfaceOptions, "updateInstanceNetworkInterfaceOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateInstanceNetworkInterfaceOptions, "updateInstanceNetworkInterfaceOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -6805,6 +7744,7 @@ func (vpc *VpcV1) UpdateInstanceNetworkInterfaceWithContext(ctx context.Context, builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_interfaces/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -6824,22 +7764,27 @@ func (vpc *VpcV1) UpdateInstanceNetworkInterfaceWithContext(ctx context.Context, _, err = builder.SetBodyContentJSON(updateInstanceNetworkInterfaceOptions.NetworkInterfacePatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_instance_network_interface", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkInterface) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -6851,17 +7796,21 @@ func (vpc *VpcV1) UpdateInstanceNetworkInterfaceWithContext(ctx context.Context, // ListInstanceNetworkInterfaceFloatingIps : List all floating IPs associated with an instance network interface // This request lists all floating IPs associated with an instance network interface. func (vpc *VpcV1) ListInstanceNetworkInterfaceFloatingIps(listInstanceNetworkInterfaceFloatingIpsOptions *ListInstanceNetworkInterfaceFloatingIpsOptions) (result *FloatingIPUnpaginatedCollection, response *core.DetailedResponse, err error) { - return vpc.ListInstanceNetworkInterfaceFloatingIpsWithContext(context.Background(), listInstanceNetworkInterfaceFloatingIpsOptions) + result, response, err = vpc.ListInstanceNetworkInterfaceFloatingIpsWithContext(context.Background(), listInstanceNetworkInterfaceFloatingIpsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListInstanceNetworkInterfaceFloatingIpsWithContext is an alternate form of the ListInstanceNetworkInterfaceFloatingIps method which supports a Context parameter func (vpc *VpcV1) ListInstanceNetworkInterfaceFloatingIpsWithContext(ctx context.Context, listInstanceNetworkInterfaceFloatingIpsOptions *ListInstanceNetworkInterfaceFloatingIpsOptions) (result *FloatingIPUnpaginatedCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listInstanceNetworkInterfaceFloatingIpsOptions, "listInstanceNetworkInterfaceFloatingIpsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listInstanceNetworkInterfaceFloatingIpsOptions, "listInstanceNetworkInterfaceFloatingIpsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -6875,6 +7824,7 @@ func (vpc *VpcV1) ListInstanceNetworkInterfaceFloatingIpsWithContext(ctx context builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -6893,17 +7843,21 @@ func (vpc *VpcV1) ListInstanceNetworkInterfaceFloatingIpsWithContext(ctx context request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_instance_network_interface_floating_ips", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIPUnpaginatedCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -6915,17 +7869,21 @@ func (vpc *VpcV1) ListInstanceNetworkInterfaceFloatingIpsWithContext(ctx context // RemoveInstanceNetworkInterfaceFloatingIP : Disassociate a floating IP from an instance network interface // This request disassociates the specified floating IP from the specified instance network interface. func (vpc *VpcV1) RemoveInstanceNetworkInterfaceFloatingIP(removeInstanceNetworkInterfaceFloatingIPOptions *RemoveInstanceNetworkInterfaceFloatingIPOptions) (response *core.DetailedResponse, err error) { - return vpc.RemoveInstanceNetworkInterfaceFloatingIPWithContext(context.Background(), removeInstanceNetworkInterfaceFloatingIPOptions) + response, err = vpc.RemoveInstanceNetworkInterfaceFloatingIPWithContext(context.Background(), removeInstanceNetworkInterfaceFloatingIPOptions) + err = core.RepurposeSDKProblem(err, "") + return } // RemoveInstanceNetworkInterfaceFloatingIPWithContext is an alternate form of the RemoveInstanceNetworkInterfaceFloatingIP method which supports a Context parameter func (vpc *VpcV1) RemoveInstanceNetworkInterfaceFloatingIPWithContext(ctx context.Context, removeInstanceNetworkInterfaceFloatingIPOptions *RemoveInstanceNetworkInterfaceFloatingIPOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(removeInstanceNetworkInterfaceFloatingIPOptions, "removeInstanceNetworkInterfaceFloatingIPOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(removeInstanceNetworkInterfaceFloatingIPOptions, "removeInstanceNetworkInterfaceFloatingIPOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -6940,6 +7898,7 @@ func (vpc *VpcV1) RemoveInstanceNetworkInterfaceFloatingIPWithContext(ctx contex builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -6957,10 +7916,16 @@ func (vpc *VpcV1) RemoveInstanceNetworkInterfaceFloatingIPWithContext(ctx contex request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "remove_instance_network_interface_floating_ip", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -6969,17 +7934,21 @@ func (vpc *VpcV1) RemoveInstanceNetworkInterfaceFloatingIPWithContext(ctx contex // This request retrieves a specified floating IP address if it is associated with the instance network interface and // instance specified in the URL. func (vpc *VpcV1) GetInstanceNetworkInterfaceFloatingIP(getInstanceNetworkInterfaceFloatingIPOptions *GetInstanceNetworkInterfaceFloatingIPOptions) (result *FloatingIP, response *core.DetailedResponse, err error) { - return vpc.GetInstanceNetworkInterfaceFloatingIPWithContext(context.Background(), getInstanceNetworkInterfaceFloatingIPOptions) + result, response, err = vpc.GetInstanceNetworkInterfaceFloatingIPWithContext(context.Background(), getInstanceNetworkInterfaceFloatingIPOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetInstanceNetworkInterfaceFloatingIPWithContext is an alternate form of the GetInstanceNetworkInterfaceFloatingIP method which supports a Context parameter func (vpc *VpcV1) GetInstanceNetworkInterfaceFloatingIPWithContext(ctx context.Context, getInstanceNetworkInterfaceFloatingIPOptions *GetInstanceNetworkInterfaceFloatingIPOptions) (result *FloatingIP, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getInstanceNetworkInterfaceFloatingIPOptions, "getInstanceNetworkInterfaceFloatingIPOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getInstanceNetworkInterfaceFloatingIPOptions, "getInstanceNetworkInterfaceFloatingIPOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -6994,6 +7963,7 @@ func (vpc *VpcV1) GetInstanceNetworkInterfaceFloatingIPWithContext(ctx context.C builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -7012,17 +7982,21 @@ func (vpc *VpcV1) GetInstanceNetworkInterfaceFloatingIPWithContext(ctx context.C request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_instance_network_interface_floating_ip", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIP) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -7041,17 +8015,21 @@ func (vpc *VpcV1) GetInstanceNetworkInterfaceFloatingIPWithContext(ctx context.C // // A request body is not required, and if provided, is ignored. func (vpc *VpcV1) AddInstanceNetworkInterfaceFloatingIP(addInstanceNetworkInterfaceFloatingIPOptions *AddInstanceNetworkInterfaceFloatingIPOptions) (result *FloatingIP, response *core.DetailedResponse, err error) { - return vpc.AddInstanceNetworkInterfaceFloatingIPWithContext(context.Background(), addInstanceNetworkInterfaceFloatingIPOptions) + result, response, err = vpc.AddInstanceNetworkInterfaceFloatingIPWithContext(context.Background(), addInstanceNetworkInterfaceFloatingIPOptions) + err = core.RepurposeSDKProblem(err, "") + return } // AddInstanceNetworkInterfaceFloatingIPWithContext is an alternate form of the AddInstanceNetworkInterfaceFloatingIP method which supports a Context parameter func (vpc *VpcV1) AddInstanceNetworkInterfaceFloatingIPWithContext(ctx context.Context, addInstanceNetworkInterfaceFloatingIPOptions *AddInstanceNetworkInterfaceFloatingIPOptions) (result *FloatingIP, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(addInstanceNetworkInterfaceFloatingIPOptions, "addInstanceNetworkInterfaceFloatingIPOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(addInstanceNetworkInterfaceFloatingIPOptions, "addInstanceNetworkInterfaceFloatingIPOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -7066,6 +8044,7 @@ func (vpc *VpcV1) AddInstanceNetworkInterfaceFloatingIPWithContext(ctx context.C builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -7084,17 +8063,21 @@ func (vpc *VpcV1) AddInstanceNetworkInterfaceFloatingIPWithContext(ctx context.C request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "add_instance_network_interface_floating_ip", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIP) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -7107,7 +8090,9 @@ func (vpc *VpcV1) AddInstanceNetworkInterfaceFloatingIPWithContext(ctx context.C // This request lists the primary reserved IP for an instance network interface. // Deprecated: this method is deprecated and may be removed in a future release. func (vpc *VpcV1) ListInstanceNetworkInterfaceIps(listInstanceNetworkInterfaceIpsOptions *ListInstanceNetworkInterfaceIpsOptions) (result *ReservedIPCollectionInstanceNetworkInterfaceContext, response *core.DetailedResponse, err error) { - return vpc.ListInstanceNetworkInterfaceIpsWithContext(context.Background(), listInstanceNetworkInterfaceIpsOptions) + result, response, err = vpc.ListInstanceNetworkInterfaceIpsWithContext(context.Background(), listInstanceNetworkInterfaceIpsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListInstanceNetworkInterfaceIpsWithContext is an alternate form of the ListInstanceNetworkInterfaceIps method which supports a Context parameter @@ -7116,10 +8101,12 @@ func (vpc *VpcV1) ListInstanceNetworkInterfaceIpsWithContext(ctx context.Context core.GetLogger().Warn("A deprecated operation has been invoked: ListInstanceNetworkInterfaceIps") err = core.ValidateNotNil(listInstanceNetworkInterfaceIpsOptions, "listInstanceNetworkInterfaceIpsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listInstanceNetworkInterfaceIpsOptions, "listInstanceNetworkInterfaceIpsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -7133,6 +8120,7 @@ func (vpc *VpcV1) ListInstanceNetworkInterfaceIpsWithContext(ctx context.Context builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_interfaces/{network_interface_id}/ips`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -7157,17 +8145,21 @@ func (vpc *VpcV1) ListInstanceNetworkInterfaceIpsWithContext(ctx context.Context request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_instance_network_interface_ips", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIPCollectionInstanceNetworkInterfaceContext) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -7180,7 +8172,9 @@ func (vpc *VpcV1) ListInstanceNetworkInterfaceIpsWithContext(ctx context.Context // This request retrieves the primary reserved IP for an instance network interface. // Deprecated: this method is deprecated and may be removed in a future release. func (vpc *VpcV1) GetInstanceNetworkInterfaceIP(getInstanceNetworkInterfaceIPOptions *GetInstanceNetworkInterfaceIPOptions) (result *ReservedIP, response *core.DetailedResponse, err error) { - return vpc.GetInstanceNetworkInterfaceIPWithContext(context.Background(), getInstanceNetworkInterfaceIPOptions) + result, response, err = vpc.GetInstanceNetworkInterfaceIPWithContext(context.Background(), getInstanceNetworkInterfaceIPOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetInstanceNetworkInterfaceIPWithContext is an alternate form of the GetInstanceNetworkInterfaceIP method which supports a Context parameter @@ -7189,10 +8183,12 @@ func (vpc *VpcV1) GetInstanceNetworkInterfaceIPWithContext(ctx context.Context, core.GetLogger().Warn("A deprecated operation has been invoked: GetInstanceNetworkInterfaceIP") err = core.ValidateNotNil(getInstanceNetworkInterfaceIPOptions, "getInstanceNetworkInterfaceIPOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getInstanceNetworkInterfaceIPOptions, "getInstanceNetworkInterfaceIPOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -7207,6 +8203,7 @@ func (vpc *VpcV1) GetInstanceNetworkInterfaceIPWithContext(ctx context.Context, builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_interfaces/{network_interface_id}/ips/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -7225,17 +8222,21 @@ func (vpc *VpcV1) GetInstanceNetworkInterfaceIPWithContext(ctx context.Context, request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_instance_network_interface_ip", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIP) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -7249,17 +8250,21 @@ func (vpc *VpcV1) GetInstanceNetworkInterfaceIPWithContext(ctx context.Context, // instance may have many volume attachments but each volume attachment connects exactly one instance to exactly one // volume. func (vpc *VpcV1) ListInstanceVolumeAttachments(listInstanceVolumeAttachmentsOptions *ListInstanceVolumeAttachmentsOptions) (result *VolumeAttachmentCollection, response *core.DetailedResponse, err error) { - return vpc.ListInstanceVolumeAttachmentsWithContext(context.Background(), listInstanceVolumeAttachmentsOptions) + result, response, err = vpc.ListInstanceVolumeAttachmentsWithContext(context.Background(), listInstanceVolumeAttachmentsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListInstanceVolumeAttachmentsWithContext is an alternate form of the ListInstanceVolumeAttachments method which supports a Context parameter func (vpc *VpcV1) ListInstanceVolumeAttachmentsWithContext(ctx context.Context, listInstanceVolumeAttachmentsOptions *ListInstanceVolumeAttachmentsOptions) (result *VolumeAttachmentCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listInstanceVolumeAttachmentsOptions, "listInstanceVolumeAttachmentsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listInstanceVolumeAttachmentsOptions, "listInstanceVolumeAttachmentsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -7272,6 +8277,7 @@ func (vpc *VpcV1) ListInstanceVolumeAttachmentsWithContext(ctx context.Context, builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/volume_attachments`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -7290,17 +8296,21 @@ func (vpc *VpcV1) ListInstanceVolumeAttachmentsWithContext(ctx context.Context, request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_instance_volume_attachments", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolumeAttachmentCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -7315,17 +8325,21 @@ func (vpc *VpcV1) ListInstanceVolumeAttachmentsWithContext(ctx context.Context, // the same way as a retrieved volume attachment, and contains the information necessary to create the new volume // attachment. func (vpc *VpcV1) CreateInstanceVolumeAttachment(createInstanceVolumeAttachmentOptions *CreateInstanceVolumeAttachmentOptions) (result *VolumeAttachment, response *core.DetailedResponse, err error) { - return vpc.CreateInstanceVolumeAttachmentWithContext(context.Background(), createInstanceVolumeAttachmentOptions) + result, response, err = vpc.CreateInstanceVolumeAttachmentWithContext(context.Background(), createInstanceVolumeAttachmentOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateInstanceVolumeAttachmentWithContext is an alternate form of the CreateInstanceVolumeAttachment method which supports a Context parameter func (vpc *VpcV1) CreateInstanceVolumeAttachmentWithContext(ctx context.Context, createInstanceVolumeAttachmentOptions *CreateInstanceVolumeAttachmentOptions) (result *VolumeAttachment, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createInstanceVolumeAttachmentOptions, "createInstanceVolumeAttachmentOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createInstanceVolumeAttachmentOptions, "createInstanceVolumeAttachmentOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -7338,6 +8352,7 @@ func (vpc *VpcV1) CreateInstanceVolumeAttachmentWithContext(ctx context.Context, builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/volume_attachments`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -7367,22 +8382,27 @@ func (vpc *VpcV1) CreateInstanceVolumeAttachmentWithContext(ctx context.Context, } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_instance_volume_attachment", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolumeAttachment) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -7395,17 +8415,21 @@ func (vpc *VpcV1) CreateInstanceVolumeAttachmentWithContext(ctx context.Context, // This request deletes a volume attachment. This operation cannot be reversed, but a new volume attachment may // subsequently be created for the volume. For this request to succeed, the volume must not be busy. func (vpc *VpcV1) DeleteInstanceVolumeAttachment(deleteInstanceVolumeAttachmentOptions *DeleteInstanceVolumeAttachmentOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteInstanceVolumeAttachmentWithContext(context.Background(), deleteInstanceVolumeAttachmentOptions) + response, err = vpc.DeleteInstanceVolumeAttachmentWithContext(context.Background(), deleteInstanceVolumeAttachmentOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteInstanceVolumeAttachmentWithContext is an alternate form of the DeleteInstanceVolumeAttachment method which supports a Context parameter func (vpc *VpcV1) DeleteInstanceVolumeAttachmentWithContext(ctx context.Context, deleteInstanceVolumeAttachmentOptions *DeleteInstanceVolumeAttachmentOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteInstanceVolumeAttachmentOptions, "deleteInstanceVolumeAttachmentOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteInstanceVolumeAttachmentOptions, "deleteInstanceVolumeAttachmentOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -7419,6 +8443,7 @@ func (vpc *VpcV1) DeleteInstanceVolumeAttachmentWithContext(ctx context.Context, builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/volume_attachments/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -7436,10 +8461,16 @@ func (vpc *VpcV1) DeleteInstanceVolumeAttachmentWithContext(ctx context.Context, request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_instance_volume_attachment", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -7447,17 +8478,21 @@ func (vpc *VpcV1) DeleteInstanceVolumeAttachmentWithContext(ctx context.Context, // GetInstanceVolumeAttachment : Retrieve a volume attachment // This request retrieves a single volume attachment specified by the identifier in the URL. func (vpc *VpcV1) GetInstanceVolumeAttachment(getInstanceVolumeAttachmentOptions *GetInstanceVolumeAttachmentOptions) (result *VolumeAttachment, response *core.DetailedResponse, err error) { - return vpc.GetInstanceVolumeAttachmentWithContext(context.Background(), getInstanceVolumeAttachmentOptions) + result, response, err = vpc.GetInstanceVolumeAttachmentWithContext(context.Background(), getInstanceVolumeAttachmentOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetInstanceVolumeAttachmentWithContext is an alternate form of the GetInstanceVolumeAttachment method which supports a Context parameter func (vpc *VpcV1) GetInstanceVolumeAttachmentWithContext(ctx context.Context, getInstanceVolumeAttachmentOptions *GetInstanceVolumeAttachmentOptions) (result *VolumeAttachment, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getInstanceVolumeAttachmentOptions, "getInstanceVolumeAttachmentOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getInstanceVolumeAttachmentOptions, "getInstanceVolumeAttachmentOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -7471,6 +8506,7 @@ func (vpc *VpcV1) GetInstanceVolumeAttachmentWithContext(ctx context.Context, ge builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/volume_attachments/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -7489,17 +8525,21 @@ func (vpc *VpcV1) GetInstanceVolumeAttachmentWithContext(ctx context.Context, ge request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_instance_volume_attachment", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolumeAttachment) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -7513,17 +8553,21 @@ func (vpc *VpcV1) GetInstanceVolumeAttachmentWithContext(ctx context.Context, ge // volume attachment patch object is structured in the same way as a retrieved volume attachment and needs to contain // only the information to be updated. func (vpc *VpcV1) UpdateInstanceVolumeAttachment(updateInstanceVolumeAttachmentOptions *UpdateInstanceVolumeAttachmentOptions) (result *VolumeAttachment, response *core.DetailedResponse, err error) { - return vpc.UpdateInstanceVolumeAttachmentWithContext(context.Background(), updateInstanceVolumeAttachmentOptions) + result, response, err = vpc.UpdateInstanceVolumeAttachmentWithContext(context.Background(), updateInstanceVolumeAttachmentOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateInstanceVolumeAttachmentWithContext is an alternate form of the UpdateInstanceVolumeAttachment method which supports a Context parameter func (vpc *VpcV1) UpdateInstanceVolumeAttachmentWithContext(ctx context.Context, updateInstanceVolumeAttachmentOptions *UpdateInstanceVolumeAttachmentOptions) (result *VolumeAttachment, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateInstanceVolumeAttachmentOptions, "updateInstanceVolumeAttachmentOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateInstanceVolumeAttachmentOptions, "updateInstanceVolumeAttachmentOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -7537,6 +8581,7 @@ func (vpc *VpcV1) UpdateInstanceVolumeAttachmentWithContext(ctx context.Context, builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/volume_attachments/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -7556,22 +8601,27 @@ func (vpc *VpcV1) UpdateInstanceVolumeAttachmentWithContext(ctx context.Context, _, err = builder.SetBodyContentJSON(updateInstanceVolumeAttachmentOptions.VolumeAttachmentPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_instance_volume_attachment", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolumeAttachment) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -7583,13 +8633,16 @@ func (vpc *VpcV1) UpdateInstanceVolumeAttachmentWithContext(ctx context.Context, // ListInstanceGroups : List all instance groups // This request lists all instance groups in the region. func (vpc *VpcV1) ListInstanceGroups(listInstanceGroupsOptions *ListInstanceGroupsOptions) (result *InstanceGroupCollection, response *core.DetailedResponse, err error) { - return vpc.ListInstanceGroupsWithContext(context.Background(), listInstanceGroupsOptions) + result, response, err = vpc.ListInstanceGroupsWithContext(context.Background(), listInstanceGroupsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListInstanceGroupsWithContext is an alternate form of the ListInstanceGroups method which supports a Context parameter func (vpc *VpcV1) ListInstanceGroupsWithContext(ctx context.Context, listInstanceGroupsOptions *ListInstanceGroupsOptions) (result *InstanceGroupCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listInstanceGroupsOptions, "listInstanceGroupsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -7598,6 +8651,7 @@ func (vpc *VpcV1) ListInstanceGroupsWithContext(ctx context.Context, listInstanc builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -7622,17 +8676,21 @@ func (vpc *VpcV1) ListInstanceGroupsWithContext(ctx context.Context, listInstanc request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_instance_groups", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -7644,17 +8702,21 @@ func (vpc *VpcV1) ListInstanceGroupsWithContext(ctx context.Context, listInstanc // CreateInstanceGroup : Create an instance group // This request creates a new instance group. func (vpc *VpcV1) CreateInstanceGroup(createInstanceGroupOptions *CreateInstanceGroupOptions) (result *InstanceGroup, response *core.DetailedResponse, err error) { - return vpc.CreateInstanceGroupWithContext(context.Background(), createInstanceGroupOptions) + result, response, err = vpc.CreateInstanceGroupWithContext(context.Background(), createInstanceGroupOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateInstanceGroupWithContext is an alternate form of the CreateInstanceGroup method which supports a Context parameter func (vpc *VpcV1) CreateInstanceGroupWithContext(ctx context.Context, createInstanceGroupOptions *CreateInstanceGroupOptions) (result *InstanceGroup, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createInstanceGroupOptions, "createInstanceGroupOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createInstanceGroupOptions, "createInstanceGroupOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -7663,6 +8725,7 @@ func (vpc *VpcV1) CreateInstanceGroupWithContext(ctx context.Context, createInst builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -7707,22 +8770,27 @@ func (vpc *VpcV1) CreateInstanceGroupWithContext(ctx context.Context, createInst } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_instance_group", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroup) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -7735,17 +8803,21 @@ func (vpc *VpcV1) CreateInstanceGroupWithContext(ctx context.Context, createInst // This request deletes an instance group. This operation cannot be reversed. Any instances associated with the group // will be deleted. func (vpc *VpcV1) DeleteInstanceGroup(deleteInstanceGroupOptions *DeleteInstanceGroupOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteInstanceGroupWithContext(context.Background(), deleteInstanceGroupOptions) + response, err = vpc.DeleteInstanceGroupWithContext(context.Background(), deleteInstanceGroupOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteInstanceGroupWithContext is an alternate form of the DeleteInstanceGroup method which supports a Context parameter func (vpc *VpcV1) DeleteInstanceGroupWithContext(ctx context.Context, deleteInstanceGroupOptions *DeleteInstanceGroupOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteInstanceGroupOptions, "deleteInstanceGroupOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteInstanceGroupOptions, "deleteInstanceGroupOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -7758,6 +8830,7 @@ func (vpc *VpcV1) DeleteInstanceGroupWithContext(ctx context.Context, deleteInst builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -7775,10 +8848,16 @@ func (vpc *VpcV1) DeleteInstanceGroupWithContext(ctx context.Context, deleteInst request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_instance_group", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -7786,17 +8865,21 @@ func (vpc *VpcV1) DeleteInstanceGroupWithContext(ctx context.Context, deleteInst // GetInstanceGroup : Retrieve an instance group // This request retrieves a single instance group specified by identifier in the URL. func (vpc *VpcV1) GetInstanceGroup(getInstanceGroupOptions *GetInstanceGroupOptions) (result *InstanceGroup, response *core.DetailedResponse, err error) { - return vpc.GetInstanceGroupWithContext(context.Background(), getInstanceGroupOptions) + result, response, err = vpc.GetInstanceGroupWithContext(context.Background(), getInstanceGroupOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetInstanceGroupWithContext is an alternate form of the GetInstanceGroup method which supports a Context parameter func (vpc *VpcV1) GetInstanceGroupWithContext(ctx context.Context, getInstanceGroupOptions *GetInstanceGroupOptions) (result *InstanceGroup, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getInstanceGroupOptions, "getInstanceGroupOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getInstanceGroupOptions, "getInstanceGroupOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -7809,6 +8892,7 @@ func (vpc *VpcV1) GetInstanceGroupWithContext(ctx context.Context, getInstanceGr builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -7827,17 +8911,21 @@ func (vpc *VpcV1) GetInstanceGroupWithContext(ctx context.Context, getInstanceGr request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_instance_group", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroup) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -7850,17 +8938,21 @@ func (vpc *VpcV1) GetInstanceGroupWithContext(ctx context.Context, getInstanceGr // This request updates an instance group with the information provided instance group patch. The instance group patch // object is structured in the same way as a retrieved instance group and contains only the information to be updated. func (vpc *VpcV1) UpdateInstanceGroup(updateInstanceGroupOptions *UpdateInstanceGroupOptions) (result *InstanceGroup, response *core.DetailedResponse, err error) { - return vpc.UpdateInstanceGroupWithContext(context.Background(), updateInstanceGroupOptions) + result, response, err = vpc.UpdateInstanceGroupWithContext(context.Background(), updateInstanceGroupOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateInstanceGroupWithContext is an alternate form of the UpdateInstanceGroup method which supports a Context parameter func (vpc *VpcV1) UpdateInstanceGroupWithContext(ctx context.Context, updateInstanceGroupOptions *UpdateInstanceGroupOptions) (result *InstanceGroup, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateInstanceGroupOptions, "updateInstanceGroupOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateInstanceGroupOptions, "updateInstanceGroupOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -7873,6 +8965,7 @@ func (vpc *VpcV1) UpdateInstanceGroupWithContext(ctx context.Context, updateInst builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -7892,22 +8985,27 @@ func (vpc *VpcV1) UpdateInstanceGroupWithContext(ctx context.Context, updateInst _, err = builder.SetBodyContentJSON(updateInstanceGroupOptions.InstanceGroupPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_instance_group", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroup) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -7919,17 +9017,21 @@ func (vpc *VpcV1) UpdateInstanceGroupWithContext(ctx context.Context, updateInst // DeleteInstanceGroupLoadBalancer : Delete an instance group load balancer // This request unbinds the instance group from the load balancer pool, and deletes the load balancer pool members. func (vpc *VpcV1) DeleteInstanceGroupLoadBalancer(deleteInstanceGroupLoadBalancerOptions *DeleteInstanceGroupLoadBalancerOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteInstanceGroupLoadBalancerWithContext(context.Background(), deleteInstanceGroupLoadBalancerOptions) + response, err = vpc.DeleteInstanceGroupLoadBalancerWithContext(context.Background(), deleteInstanceGroupLoadBalancerOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteInstanceGroupLoadBalancerWithContext is an alternate form of the DeleteInstanceGroupLoadBalancer method which supports a Context parameter func (vpc *VpcV1) DeleteInstanceGroupLoadBalancerWithContext(ctx context.Context, deleteInstanceGroupLoadBalancerOptions *DeleteInstanceGroupLoadBalancerOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteInstanceGroupLoadBalancerOptions, "deleteInstanceGroupLoadBalancerOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteInstanceGroupLoadBalancerOptions, "deleteInstanceGroupLoadBalancerOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -7942,6 +9044,7 @@ func (vpc *VpcV1) DeleteInstanceGroupLoadBalancerWithContext(ctx context.Context builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/load_balancer`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -7959,10 +9062,16 @@ func (vpc *VpcV1) DeleteInstanceGroupLoadBalancerWithContext(ctx context.Context request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_instance_group_load_balancer", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -7970,17 +9079,21 @@ func (vpc *VpcV1) DeleteInstanceGroupLoadBalancerWithContext(ctx context.Context // ListInstanceGroupManagers : List all managers for an instance group // This request lists all managers for an instance group. func (vpc *VpcV1) ListInstanceGroupManagers(listInstanceGroupManagersOptions *ListInstanceGroupManagersOptions) (result *InstanceGroupManagerCollection, response *core.DetailedResponse, err error) { - return vpc.ListInstanceGroupManagersWithContext(context.Background(), listInstanceGroupManagersOptions) + result, response, err = vpc.ListInstanceGroupManagersWithContext(context.Background(), listInstanceGroupManagersOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListInstanceGroupManagersWithContext is an alternate form of the ListInstanceGroupManagers method which supports a Context parameter func (vpc *VpcV1) ListInstanceGroupManagersWithContext(ctx context.Context, listInstanceGroupManagersOptions *ListInstanceGroupManagersOptions) (result *InstanceGroupManagerCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listInstanceGroupManagersOptions, "listInstanceGroupManagersOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listInstanceGroupManagersOptions, "listInstanceGroupManagersOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -7993,6 +9106,7 @@ func (vpc *VpcV1) ListInstanceGroupManagersWithContext(ctx context.Context, list builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -8017,17 +9131,21 @@ func (vpc *VpcV1) ListInstanceGroupManagersWithContext(ctx context.Context, list request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_instance_group_managers", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -8039,17 +9157,21 @@ func (vpc *VpcV1) ListInstanceGroupManagersWithContext(ctx context.Context, list // CreateInstanceGroupManager : Create a manager for an instance group // This request creates a new instance group manager. func (vpc *VpcV1) CreateInstanceGroupManager(createInstanceGroupManagerOptions *CreateInstanceGroupManagerOptions) (result InstanceGroupManagerIntf, response *core.DetailedResponse, err error) { - return vpc.CreateInstanceGroupManagerWithContext(context.Background(), createInstanceGroupManagerOptions) + result, response, err = vpc.CreateInstanceGroupManagerWithContext(context.Background(), createInstanceGroupManagerOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateInstanceGroupManagerWithContext is an alternate form of the CreateInstanceGroupManager method which supports a Context parameter func (vpc *VpcV1) CreateInstanceGroupManagerWithContext(ctx context.Context, createInstanceGroupManagerOptions *CreateInstanceGroupManagerOptions) (result InstanceGroupManagerIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createInstanceGroupManagerOptions, "createInstanceGroupManagerOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createInstanceGroupManagerOptions, "createInstanceGroupManagerOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -8062,6 +9184,7 @@ func (vpc *VpcV1) CreateInstanceGroupManagerWithContext(ctx context.Context, cre builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -8081,22 +9204,27 @@ func (vpc *VpcV1) CreateInstanceGroupManagerWithContext(ctx context.Context, cre _, err = builder.SetBodyContentJSON(createInstanceGroupManagerOptions.InstanceGroupManagerPrototype) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_instance_group_manager", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManager) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -8108,17 +9236,21 @@ func (vpc *VpcV1) CreateInstanceGroupManagerWithContext(ctx context.Context, cre // DeleteInstanceGroupManager : Delete an instance group manager // This request deletes an instance group manager. This operation cannot be reversed. func (vpc *VpcV1) DeleteInstanceGroupManager(deleteInstanceGroupManagerOptions *DeleteInstanceGroupManagerOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteInstanceGroupManagerWithContext(context.Background(), deleteInstanceGroupManagerOptions) + response, err = vpc.DeleteInstanceGroupManagerWithContext(context.Background(), deleteInstanceGroupManagerOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteInstanceGroupManagerWithContext is an alternate form of the DeleteInstanceGroupManager method which supports a Context parameter func (vpc *VpcV1) DeleteInstanceGroupManagerWithContext(ctx context.Context, deleteInstanceGroupManagerOptions *DeleteInstanceGroupManagerOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteInstanceGroupManagerOptions, "deleteInstanceGroupManagerOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteInstanceGroupManagerOptions, "deleteInstanceGroupManagerOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -8132,6 +9264,7 @@ func (vpc *VpcV1) DeleteInstanceGroupManagerWithContext(ctx context.Context, del builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -8149,10 +9282,16 @@ func (vpc *VpcV1) DeleteInstanceGroupManagerWithContext(ctx context.Context, del request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_instance_group_manager", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -8160,17 +9299,21 @@ func (vpc *VpcV1) DeleteInstanceGroupManagerWithContext(ctx context.Context, del // GetInstanceGroupManager : Retrieve an instance group manager // This request retrieves a single instance group manager specified by identifier in the URL. func (vpc *VpcV1) GetInstanceGroupManager(getInstanceGroupManagerOptions *GetInstanceGroupManagerOptions) (result InstanceGroupManagerIntf, response *core.DetailedResponse, err error) { - return vpc.GetInstanceGroupManagerWithContext(context.Background(), getInstanceGroupManagerOptions) + result, response, err = vpc.GetInstanceGroupManagerWithContext(context.Background(), getInstanceGroupManagerOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetInstanceGroupManagerWithContext is an alternate form of the GetInstanceGroupManager method which supports a Context parameter func (vpc *VpcV1) GetInstanceGroupManagerWithContext(ctx context.Context, getInstanceGroupManagerOptions *GetInstanceGroupManagerOptions) (result InstanceGroupManagerIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getInstanceGroupManagerOptions, "getInstanceGroupManagerOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getInstanceGroupManagerOptions, "getInstanceGroupManagerOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -8184,6 +9327,7 @@ func (vpc *VpcV1) GetInstanceGroupManagerWithContext(ctx context.Context, getIns builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -8202,17 +9346,21 @@ func (vpc *VpcV1) GetInstanceGroupManagerWithContext(ctx context.Context, getIns request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_instance_group_manager", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManager) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -8224,17 +9372,21 @@ func (vpc *VpcV1) GetInstanceGroupManagerWithContext(ctx context.Context, getIns // UpdateInstanceGroupManager : Update an instance group manager // This request updates an instance group manager with the information provided instance group manager patch. func (vpc *VpcV1) UpdateInstanceGroupManager(updateInstanceGroupManagerOptions *UpdateInstanceGroupManagerOptions) (result InstanceGroupManagerIntf, response *core.DetailedResponse, err error) { - return vpc.UpdateInstanceGroupManagerWithContext(context.Background(), updateInstanceGroupManagerOptions) + result, response, err = vpc.UpdateInstanceGroupManagerWithContext(context.Background(), updateInstanceGroupManagerOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateInstanceGroupManagerWithContext is an alternate form of the UpdateInstanceGroupManager method which supports a Context parameter func (vpc *VpcV1) UpdateInstanceGroupManagerWithContext(ctx context.Context, updateInstanceGroupManagerOptions *UpdateInstanceGroupManagerOptions) (result InstanceGroupManagerIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateInstanceGroupManagerOptions, "updateInstanceGroupManagerOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateInstanceGroupManagerOptions, "updateInstanceGroupManagerOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -8248,6 +9400,7 @@ func (vpc *VpcV1) UpdateInstanceGroupManagerWithContext(ctx context.Context, upd builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -8267,22 +9420,27 @@ func (vpc *VpcV1) UpdateInstanceGroupManagerWithContext(ctx context.Context, upd _, err = builder.SetBodyContentJSON(updateInstanceGroupManagerOptions.InstanceGroupManagerPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_instance_group_manager", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManager) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -8294,17 +9452,21 @@ func (vpc *VpcV1) UpdateInstanceGroupManagerWithContext(ctx context.Context, upd // ListInstanceGroupManagerActions : List all actions for an instance group manager // This request lists all instance group actions for an instance group manager. func (vpc *VpcV1) ListInstanceGroupManagerActions(listInstanceGroupManagerActionsOptions *ListInstanceGroupManagerActionsOptions) (result *InstanceGroupManagerActionsCollection, response *core.DetailedResponse, err error) { - return vpc.ListInstanceGroupManagerActionsWithContext(context.Background(), listInstanceGroupManagerActionsOptions) + result, response, err = vpc.ListInstanceGroupManagerActionsWithContext(context.Background(), listInstanceGroupManagerActionsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListInstanceGroupManagerActionsWithContext is an alternate form of the ListInstanceGroupManagerActions method which supports a Context parameter func (vpc *VpcV1) ListInstanceGroupManagerActionsWithContext(ctx context.Context, listInstanceGroupManagerActionsOptions *ListInstanceGroupManagerActionsOptions) (result *InstanceGroupManagerActionsCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listInstanceGroupManagerActionsOptions, "listInstanceGroupManagerActionsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listInstanceGroupManagerActionsOptions, "listInstanceGroupManagerActionsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -8318,6 +9480,7 @@ func (vpc *VpcV1) ListInstanceGroupManagerActionsWithContext(ctx context.Context builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -8342,17 +9505,21 @@ func (vpc *VpcV1) ListInstanceGroupManagerActionsWithContext(ctx context.Context request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_instance_group_manager_actions", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerActionsCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -8364,17 +9531,21 @@ func (vpc *VpcV1) ListInstanceGroupManagerActionsWithContext(ctx context.Context // CreateInstanceGroupManagerAction : Create an instance group manager action // This request creates a new instance group manager action. func (vpc *VpcV1) CreateInstanceGroupManagerAction(createInstanceGroupManagerActionOptions *CreateInstanceGroupManagerActionOptions) (result InstanceGroupManagerActionIntf, response *core.DetailedResponse, err error) { - return vpc.CreateInstanceGroupManagerActionWithContext(context.Background(), createInstanceGroupManagerActionOptions) + result, response, err = vpc.CreateInstanceGroupManagerActionWithContext(context.Background(), createInstanceGroupManagerActionOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateInstanceGroupManagerActionWithContext is an alternate form of the CreateInstanceGroupManagerAction method which supports a Context parameter func (vpc *VpcV1) CreateInstanceGroupManagerActionWithContext(ctx context.Context, createInstanceGroupManagerActionOptions *CreateInstanceGroupManagerActionOptions) (result InstanceGroupManagerActionIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createInstanceGroupManagerActionOptions, "createInstanceGroupManagerActionOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createInstanceGroupManagerActionOptions, "createInstanceGroupManagerActionOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -8388,6 +9559,7 @@ func (vpc *VpcV1) CreateInstanceGroupManagerActionWithContext(ctx context.Contex builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -8407,22 +9579,27 @@ func (vpc *VpcV1) CreateInstanceGroupManagerActionWithContext(ctx context.Contex _, err = builder.SetBodyContentJSON(createInstanceGroupManagerActionOptions.InstanceGroupManagerActionPrototype) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_instance_group_manager_action", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerAction) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -8434,17 +9611,21 @@ func (vpc *VpcV1) CreateInstanceGroupManagerActionWithContext(ctx context.Contex // DeleteInstanceGroupManagerAction : Delete specified instance group manager action // This request deletes an instance group manager action. This operation cannot be reversed. func (vpc *VpcV1) DeleteInstanceGroupManagerAction(deleteInstanceGroupManagerActionOptions *DeleteInstanceGroupManagerActionOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteInstanceGroupManagerActionWithContext(context.Background(), deleteInstanceGroupManagerActionOptions) + response, err = vpc.DeleteInstanceGroupManagerActionWithContext(context.Background(), deleteInstanceGroupManagerActionOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteInstanceGroupManagerActionWithContext is an alternate form of the DeleteInstanceGroupManagerAction method which supports a Context parameter func (vpc *VpcV1) DeleteInstanceGroupManagerActionWithContext(ctx context.Context, deleteInstanceGroupManagerActionOptions *DeleteInstanceGroupManagerActionOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteInstanceGroupManagerActionOptions, "deleteInstanceGroupManagerActionOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteInstanceGroupManagerActionOptions, "deleteInstanceGroupManagerActionOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -8459,6 +9640,7 @@ func (vpc *VpcV1) DeleteInstanceGroupManagerActionWithContext(ctx context.Contex builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -8476,10 +9658,16 @@ func (vpc *VpcV1) DeleteInstanceGroupManagerActionWithContext(ctx context.Contex request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_instance_group_manager_action", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -8487,17 +9675,21 @@ func (vpc *VpcV1) DeleteInstanceGroupManagerActionWithContext(ctx context.Contex // GetInstanceGroupManagerAction : Retrieve specified instance group manager action // This request retrieves a single instance group manager action specified by identifier in the URL. func (vpc *VpcV1) GetInstanceGroupManagerAction(getInstanceGroupManagerActionOptions *GetInstanceGroupManagerActionOptions) (result InstanceGroupManagerActionIntf, response *core.DetailedResponse, err error) { - return vpc.GetInstanceGroupManagerActionWithContext(context.Background(), getInstanceGroupManagerActionOptions) + result, response, err = vpc.GetInstanceGroupManagerActionWithContext(context.Background(), getInstanceGroupManagerActionOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetInstanceGroupManagerActionWithContext is an alternate form of the GetInstanceGroupManagerAction method which supports a Context parameter func (vpc *VpcV1) GetInstanceGroupManagerActionWithContext(ctx context.Context, getInstanceGroupManagerActionOptions *GetInstanceGroupManagerActionOptions) (result InstanceGroupManagerActionIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getInstanceGroupManagerActionOptions, "getInstanceGroupManagerActionOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getInstanceGroupManagerActionOptions, "getInstanceGroupManagerActionOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -8512,6 +9704,7 @@ func (vpc *VpcV1) GetInstanceGroupManagerActionWithContext(ctx context.Context, builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -8530,17 +9723,21 @@ func (vpc *VpcV1) GetInstanceGroupManagerActionWithContext(ctx context.Context, request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_instance_group_manager_action", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerAction) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -8552,17 +9749,21 @@ func (vpc *VpcV1) GetInstanceGroupManagerActionWithContext(ctx context.Context, // UpdateInstanceGroupManagerAction : Update specified instance group manager action // This request updates an instance group manager action. func (vpc *VpcV1) UpdateInstanceGroupManagerAction(updateInstanceGroupManagerActionOptions *UpdateInstanceGroupManagerActionOptions) (result InstanceGroupManagerActionIntf, response *core.DetailedResponse, err error) { - return vpc.UpdateInstanceGroupManagerActionWithContext(context.Background(), updateInstanceGroupManagerActionOptions) + result, response, err = vpc.UpdateInstanceGroupManagerActionWithContext(context.Background(), updateInstanceGroupManagerActionOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateInstanceGroupManagerActionWithContext is an alternate form of the UpdateInstanceGroupManagerAction method which supports a Context parameter func (vpc *VpcV1) UpdateInstanceGroupManagerActionWithContext(ctx context.Context, updateInstanceGroupManagerActionOptions *UpdateInstanceGroupManagerActionOptions) (result InstanceGroupManagerActionIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateInstanceGroupManagerActionOptions, "updateInstanceGroupManagerActionOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateInstanceGroupManagerActionOptions, "updateInstanceGroupManagerActionOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -8577,6 +9778,7 @@ func (vpc *VpcV1) UpdateInstanceGroupManagerActionWithContext(ctx context.Contex builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -8596,22 +9798,27 @@ func (vpc *VpcV1) UpdateInstanceGroupManagerActionWithContext(ctx context.Contex _, err = builder.SetBodyContentJSON(updateInstanceGroupManagerActionOptions.InstanceGroupManagerActionPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_instance_group_manager_action", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerAction) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -8623,17 +9830,21 @@ func (vpc *VpcV1) UpdateInstanceGroupManagerActionWithContext(ctx context.Contex // ListInstanceGroupManagerPolicies : List all policies for an instance group manager // This request lists all policies for an instance group manager. func (vpc *VpcV1) ListInstanceGroupManagerPolicies(listInstanceGroupManagerPoliciesOptions *ListInstanceGroupManagerPoliciesOptions) (result *InstanceGroupManagerPolicyCollection, response *core.DetailedResponse, err error) { - return vpc.ListInstanceGroupManagerPoliciesWithContext(context.Background(), listInstanceGroupManagerPoliciesOptions) + result, response, err = vpc.ListInstanceGroupManagerPoliciesWithContext(context.Background(), listInstanceGroupManagerPoliciesOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListInstanceGroupManagerPoliciesWithContext is an alternate form of the ListInstanceGroupManagerPolicies method which supports a Context parameter func (vpc *VpcV1) ListInstanceGroupManagerPoliciesWithContext(ctx context.Context, listInstanceGroupManagerPoliciesOptions *ListInstanceGroupManagerPoliciesOptions) (result *InstanceGroupManagerPolicyCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listInstanceGroupManagerPoliciesOptions, "listInstanceGroupManagerPoliciesOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listInstanceGroupManagerPoliciesOptions, "listInstanceGroupManagerPoliciesOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -8647,6 +9858,7 @@ func (vpc *VpcV1) ListInstanceGroupManagerPoliciesWithContext(ctx context.Contex builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -8671,17 +9883,21 @@ func (vpc *VpcV1) ListInstanceGroupManagerPoliciesWithContext(ctx context.Contex request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_instance_group_manager_policies", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerPolicyCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -8693,17 +9909,21 @@ func (vpc *VpcV1) ListInstanceGroupManagerPoliciesWithContext(ctx context.Contex // CreateInstanceGroupManagerPolicy : Create a policy for an instance group manager // This request creates a new instance group manager policy. func (vpc *VpcV1) CreateInstanceGroupManagerPolicy(createInstanceGroupManagerPolicyOptions *CreateInstanceGroupManagerPolicyOptions) (result InstanceGroupManagerPolicyIntf, response *core.DetailedResponse, err error) { - return vpc.CreateInstanceGroupManagerPolicyWithContext(context.Background(), createInstanceGroupManagerPolicyOptions) + result, response, err = vpc.CreateInstanceGroupManagerPolicyWithContext(context.Background(), createInstanceGroupManagerPolicyOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateInstanceGroupManagerPolicyWithContext is an alternate form of the CreateInstanceGroupManagerPolicy method which supports a Context parameter func (vpc *VpcV1) CreateInstanceGroupManagerPolicyWithContext(ctx context.Context, createInstanceGroupManagerPolicyOptions *CreateInstanceGroupManagerPolicyOptions) (result InstanceGroupManagerPolicyIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createInstanceGroupManagerPolicyOptions, "createInstanceGroupManagerPolicyOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createInstanceGroupManagerPolicyOptions, "createInstanceGroupManagerPolicyOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -8717,6 +9937,7 @@ func (vpc *VpcV1) CreateInstanceGroupManagerPolicyWithContext(ctx context.Contex builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -8736,22 +9957,27 @@ func (vpc *VpcV1) CreateInstanceGroupManagerPolicyWithContext(ctx context.Contex _, err = builder.SetBodyContentJSON(createInstanceGroupManagerPolicyOptions.InstanceGroupManagerPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_instance_group_manager_policy", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerPolicy) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -8763,17 +9989,21 @@ func (vpc *VpcV1) CreateInstanceGroupManagerPolicyWithContext(ctx context.Contex // DeleteInstanceGroupManagerPolicy : Delete an instance group manager policy // This request deletes an instance group manager policy. This operation cannot be reversed. func (vpc *VpcV1) DeleteInstanceGroupManagerPolicy(deleteInstanceGroupManagerPolicyOptions *DeleteInstanceGroupManagerPolicyOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteInstanceGroupManagerPolicyWithContext(context.Background(), deleteInstanceGroupManagerPolicyOptions) + response, err = vpc.DeleteInstanceGroupManagerPolicyWithContext(context.Background(), deleteInstanceGroupManagerPolicyOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteInstanceGroupManagerPolicyWithContext is an alternate form of the DeleteInstanceGroupManagerPolicy method which supports a Context parameter func (vpc *VpcV1) DeleteInstanceGroupManagerPolicyWithContext(ctx context.Context, deleteInstanceGroupManagerPolicyOptions *DeleteInstanceGroupManagerPolicyOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteInstanceGroupManagerPolicyOptions, "deleteInstanceGroupManagerPolicyOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteInstanceGroupManagerPolicyOptions, "deleteInstanceGroupManagerPolicyOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -8788,6 +10018,7 @@ func (vpc *VpcV1) DeleteInstanceGroupManagerPolicyWithContext(ctx context.Contex builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -8805,10 +10036,16 @@ func (vpc *VpcV1) DeleteInstanceGroupManagerPolicyWithContext(ctx context.Contex request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_instance_group_manager_policy", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -8816,17 +10053,21 @@ func (vpc *VpcV1) DeleteInstanceGroupManagerPolicyWithContext(ctx context.Contex // GetInstanceGroupManagerPolicy : Retrieve an instance group manager policy // This request retrieves a single instance group manager policy specified by identifier in the URL. func (vpc *VpcV1) GetInstanceGroupManagerPolicy(getInstanceGroupManagerPolicyOptions *GetInstanceGroupManagerPolicyOptions) (result InstanceGroupManagerPolicyIntf, response *core.DetailedResponse, err error) { - return vpc.GetInstanceGroupManagerPolicyWithContext(context.Background(), getInstanceGroupManagerPolicyOptions) + result, response, err = vpc.GetInstanceGroupManagerPolicyWithContext(context.Background(), getInstanceGroupManagerPolicyOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetInstanceGroupManagerPolicyWithContext is an alternate form of the GetInstanceGroupManagerPolicy method which supports a Context parameter func (vpc *VpcV1) GetInstanceGroupManagerPolicyWithContext(ctx context.Context, getInstanceGroupManagerPolicyOptions *GetInstanceGroupManagerPolicyOptions) (result InstanceGroupManagerPolicyIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getInstanceGroupManagerPolicyOptions, "getInstanceGroupManagerPolicyOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getInstanceGroupManagerPolicyOptions, "getInstanceGroupManagerPolicyOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -8841,6 +10082,7 @@ func (vpc *VpcV1) GetInstanceGroupManagerPolicyWithContext(ctx context.Context, builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -8859,17 +10101,21 @@ func (vpc *VpcV1) GetInstanceGroupManagerPolicyWithContext(ctx context.Context, request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_instance_group_manager_policy", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerPolicy) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -8881,17 +10127,21 @@ func (vpc *VpcV1) GetInstanceGroupManagerPolicyWithContext(ctx context.Context, // UpdateInstanceGroupManagerPolicy : Update an instance group manager policy // This request updates an instance group manager policy. func (vpc *VpcV1) UpdateInstanceGroupManagerPolicy(updateInstanceGroupManagerPolicyOptions *UpdateInstanceGroupManagerPolicyOptions) (result InstanceGroupManagerPolicyIntf, response *core.DetailedResponse, err error) { - return vpc.UpdateInstanceGroupManagerPolicyWithContext(context.Background(), updateInstanceGroupManagerPolicyOptions) + result, response, err = vpc.UpdateInstanceGroupManagerPolicyWithContext(context.Background(), updateInstanceGroupManagerPolicyOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateInstanceGroupManagerPolicyWithContext is an alternate form of the UpdateInstanceGroupManagerPolicy method which supports a Context parameter func (vpc *VpcV1) UpdateInstanceGroupManagerPolicyWithContext(ctx context.Context, updateInstanceGroupManagerPolicyOptions *UpdateInstanceGroupManagerPolicyOptions) (result InstanceGroupManagerPolicyIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateInstanceGroupManagerPolicyOptions, "updateInstanceGroupManagerPolicyOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateInstanceGroupManagerPolicyOptions, "updateInstanceGroupManagerPolicyOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -8906,6 +10156,7 @@ func (vpc *VpcV1) UpdateInstanceGroupManagerPolicyWithContext(ctx context.Contex builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -8925,22 +10176,27 @@ func (vpc *VpcV1) UpdateInstanceGroupManagerPolicyWithContext(ctx context.Contex _, err = builder.SetBodyContentJSON(updateInstanceGroupManagerPolicyOptions.InstanceGroupManagerPolicyPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_instance_group_manager_policy", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerPolicy) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -8953,17 +10209,21 @@ func (vpc *VpcV1) UpdateInstanceGroupManagerPolicyWithContext(ctx context.Contex // This request deletes all memberships of an instance group. This operation cannot be reversed. reversed. Any // memberships that have `delete_instance_on_membership_delete` set to `true` will also have their instances deleted. func (vpc *VpcV1) DeleteInstanceGroupMemberships(deleteInstanceGroupMembershipsOptions *DeleteInstanceGroupMembershipsOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteInstanceGroupMembershipsWithContext(context.Background(), deleteInstanceGroupMembershipsOptions) + response, err = vpc.DeleteInstanceGroupMembershipsWithContext(context.Background(), deleteInstanceGroupMembershipsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteInstanceGroupMembershipsWithContext is an alternate form of the DeleteInstanceGroupMemberships method which supports a Context parameter func (vpc *VpcV1) DeleteInstanceGroupMembershipsWithContext(ctx context.Context, deleteInstanceGroupMembershipsOptions *DeleteInstanceGroupMembershipsOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteInstanceGroupMembershipsOptions, "deleteInstanceGroupMembershipsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteInstanceGroupMembershipsOptions, "deleteInstanceGroupMembershipsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -8976,6 +10236,7 @@ func (vpc *VpcV1) DeleteInstanceGroupMembershipsWithContext(ctx context.Context, builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/memberships`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -8993,10 +10254,16 @@ func (vpc *VpcV1) DeleteInstanceGroupMembershipsWithContext(ctx context.Context, request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_instance_group_memberships", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -9004,17 +10271,21 @@ func (vpc *VpcV1) DeleteInstanceGroupMembershipsWithContext(ctx context.Context, // ListInstanceGroupMemberships : List all memberships for an instance group // This request lists all instance group memberships for an instance group. func (vpc *VpcV1) ListInstanceGroupMemberships(listInstanceGroupMembershipsOptions *ListInstanceGroupMembershipsOptions) (result *InstanceGroupMembershipCollection, response *core.DetailedResponse, err error) { - return vpc.ListInstanceGroupMembershipsWithContext(context.Background(), listInstanceGroupMembershipsOptions) + result, response, err = vpc.ListInstanceGroupMembershipsWithContext(context.Background(), listInstanceGroupMembershipsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListInstanceGroupMembershipsWithContext is an alternate form of the ListInstanceGroupMemberships method which supports a Context parameter func (vpc *VpcV1) ListInstanceGroupMembershipsWithContext(ctx context.Context, listInstanceGroupMembershipsOptions *ListInstanceGroupMembershipsOptions) (result *InstanceGroupMembershipCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listInstanceGroupMembershipsOptions, "listInstanceGroupMembershipsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listInstanceGroupMembershipsOptions, "listInstanceGroupMembershipsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -9027,6 +10298,7 @@ func (vpc *VpcV1) ListInstanceGroupMembershipsWithContext(ctx context.Context, l builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/memberships`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -9051,17 +10323,21 @@ func (vpc *VpcV1) ListInstanceGroupMembershipsWithContext(ctx context.Context, l request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_instance_group_memberships", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupMembershipCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -9074,17 +10350,21 @@ func (vpc *VpcV1) ListInstanceGroupMembershipsWithContext(ctx context.Context, l // This request deletes a memberships of an instance group. This operation cannot be reversed. reversed. If the // membership has `delete_instance_on_membership_delete` set to `true`, the instance will also be deleted. func (vpc *VpcV1) DeleteInstanceGroupMembership(deleteInstanceGroupMembershipOptions *DeleteInstanceGroupMembershipOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteInstanceGroupMembershipWithContext(context.Background(), deleteInstanceGroupMembershipOptions) + response, err = vpc.DeleteInstanceGroupMembershipWithContext(context.Background(), deleteInstanceGroupMembershipOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteInstanceGroupMembershipWithContext is an alternate form of the DeleteInstanceGroupMembership method which supports a Context parameter func (vpc *VpcV1) DeleteInstanceGroupMembershipWithContext(ctx context.Context, deleteInstanceGroupMembershipOptions *DeleteInstanceGroupMembershipOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteInstanceGroupMembershipOptions, "deleteInstanceGroupMembershipOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteInstanceGroupMembershipOptions, "deleteInstanceGroupMembershipOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -9098,6 +10378,7 @@ func (vpc *VpcV1) DeleteInstanceGroupMembershipWithContext(ctx context.Context, builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/memberships/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -9115,10 +10396,16 @@ func (vpc *VpcV1) DeleteInstanceGroupMembershipWithContext(ctx context.Context, request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_instance_group_membership", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -9126,17 +10413,21 @@ func (vpc *VpcV1) DeleteInstanceGroupMembershipWithContext(ctx context.Context, // GetInstanceGroupMembership : Retrieve an instance group membership // This request retrieves a single instance group membership specified by identifier in the URL. func (vpc *VpcV1) GetInstanceGroupMembership(getInstanceGroupMembershipOptions *GetInstanceGroupMembershipOptions) (result *InstanceGroupMembership, response *core.DetailedResponse, err error) { - return vpc.GetInstanceGroupMembershipWithContext(context.Background(), getInstanceGroupMembershipOptions) + result, response, err = vpc.GetInstanceGroupMembershipWithContext(context.Background(), getInstanceGroupMembershipOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetInstanceGroupMembershipWithContext is an alternate form of the GetInstanceGroupMembership method which supports a Context parameter func (vpc *VpcV1) GetInstanceGroupMembershipWithContext(ctx context.Context, getInstanceGroupMembershipOptions *GetInstanceGroupMembershipOptions) (result *InstanceGroupMembership, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getInstanceGroupMembershipOptions, "getInstanceGroupMembershipOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getInstanceGroupMembershipOptions, "getInstanceGroupMembershipOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -9150,6 +10441,7 @@ func (vpc *VpcV1) GetInstanceGroupMembershipWithContext(ctx context.Context, get builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/memberships/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -9168,17 +10460,21 @@ func (vpc *VpcV1) GetInstanceGroupMembershipWithContext(ctx context.Context, get request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_instance_group_membership", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupMembership) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -9190,17 +10486,21 @@ func (vpc *VpcV1) GetInstanceGroupMembershipWithContext(ctx context.Context, get // UpdateInstanceGroupMembership : Update an instance group membership // This request updates an instance group membership with the information provided instance group membership patch. func (vpc *VpcV1) UpdateInstanceGroupMembership(updateInstanceGroupMembershipOptions *UpdateInstanceGroupMembershipOptions) (result *InstanceGroupMembership, response *core.DetailedResponse, err error) { - return vpc.UpdateInstanceGroupMembershipWithContext(context.Background(), updateInstanceGroupMembershipOptions) + result, response, err = vpc.UpdateInstanceGroupMembershipWithContext(context.Background(), updateInstanceGroupMembershipOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateInstanceGroupMembershipWithContext is an alternate form of the UpdateInstanceGroupMembership method which supports a Context parameter func (vpc *VpcV1) UpdateInstanceGroupMembershipWithContext(ctx context.Context, updateInstanceGroupMembershipOptions *UpdateInstanceGroupMembershipOptions) (result *InstanceGroupMembership, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateInstanceGroupMembershipOptions, "updateInstanceGroupMembershipOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateInstanceGroupMembershipOptions, "updateInstanceGroupMembershipOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -9214,6 +10514,7 @@ func (vpc *VpcV1) UpdateInstanceGroupMembershipWithContext(ctx context.Context, builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/memberships/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -9233,22 +10534,27 @@ func (vpc *VpcV1) UpdateInstanceGroupMembershipWithContext(ctx context.Context, _, err = builder.SetBodyContentJSON(updateInstanceGroupMembershipOptions.InstanceGroupMembershipPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_instance_group_membership", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupMembership) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -9264,13 +10570,16 @@ func (vpc *VpcV1) UpdateInstanceGroupMembershipWithContext(ctx context.Context, // The reservations will be sorted by their `created_at` property values, with newest reservations first. Reservations // with identical `created_at` property values will in turn be sorted by ascending `name` property values. func (vpc *VpcV1) ListReservations(listReservationsOptions *ListReservationsOptions) (result *ReservationCollection, response *core.DetailedResponse, err error) { - return vpc.ListReservationsWithContext(context.Background(), listReservationsOptions) + result, response, err = vpc.ListReservationsWithContext(context.Background(), listReservationsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListReservationsWithContext is an alternate form of the ListReservations method which supports a Context parameter func (vpc *VpcV1) ListReservationsWithContext(ctx context.Context, listReservationsOptions *ListReservationsOptions) (result *ReservationCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listReservationsOptions, "listReservationsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -9279,6 +10588,7 @@ func (vpc *VpcV1) ListReservationsWithContext(ctx context.Context, listReservati builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/reservations`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -9312,17 +10622,21 @@ func (vpc *VpcV1) ListReservationsWithContext(ctx context.Context, listReservati request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_reservations", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservationCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -9335,17 +10649,21 @@ func (vpc *VpcV1) ListReservationsWithContext(ctx context.Context, listReservati // This request creates a new reservation from a reservation prototype object. The prototype object is structured in the // same way as a retrieved reservation, and contains the information necessary to create the new reservation. func (vpc *VpcV1) CreateReservation(createReservationOptions *CreateReservationOptions) (result *Reservation, response *core.DetailedResponse, err error) { - return vpc.CreateReservationWithContext(context.Background(), createReservationOptions) + result, response, err = vpc.CreateReservationWithContext(context.Background(), createReservationOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateReservationWithContext is an alternate form of the CreateReservation method which supports a Context parameter func (vpc *VpcV1) CreateReservationWithContext(ctx context.Context, createReservationOptions *CreateReservationOptions) (result *Reservation, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createReservationOptions, "createReservationOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createReservationOptions, "createReservationOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -9354,6 +10672,7 @@ func (vpc *VpcV1) CreateReservationWithContext(ctx context.Context, createReserv builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/reservations`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -9395,22 +10714,27 @@ func (vpc *VpcV1) CreateReservationWithContext(ctx context.Context, createReserv } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_reservation", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservation) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -9423,17 +10747,21 @@ func (vpc *VpcV1) CreateReservationWithContext(ctx context.Context, createReserv // This request deletes a reservation. This operation cannot be reversed. Reservations with a `status` of `active` are // not allowed to be deleted. func (vpc *VpcV1) DeleteReservation(deleteReservationOptions *DeleteReservationOptions) (result *Reservation, response *core.DetailedResponse, err error) { - return vpc.DeleteReservationWithContext(context.Background(), deleteReservationOptions) + result, response, err = vpc.DeleteReservationWithContext(context.Background(), deleteReservationOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteReservationWithContext is an alternate form of the DeleteReservation method which supports a Context parameter func (vpc *VpcV1) DeleteReservationWithContext(ctx context.Context, deleteReservationOptions *DeleteReservationOptions) (result *Reservation, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteReservationOptions, "deleteReservationOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteReservationOptions, "deleteReservationOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -9446,6 +10774,7 @@ func (vpc *VpcV1) DeleteReservationWithContext(ctx context.Context, deleteReserv builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/reservations/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -9464,17 +10793,21 @@ func (vpc *VpcV1) DeleteReservationWithContext(ctx context.Context, deleteReserv request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "delete_reservation", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservation) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -9486,17 +10819,21 @@ func (vpc *VpcV1) DeleteReservationWithContext(ctx context.Context, deleteReserv // GetReservation : Retrieve a reservation // This request retrieves a single reservation specified by identifier in the URL. func (vpc *VpcV1) GetReservation(getReservationOptions *GetReservationOptions) (result *Reservation, response *core.DetailedResponse, err error) { - return vpc.GetReservationWithContext(context.Background(), getReservationOptions) + result, response, err = vpc.GetReservationWithContext(context.Background(), getReservationOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetReservationWithContext is an alternate form of the GetReservation method which supports a Context parameter func (vpc *VpcV1) GetReservationWithContext(ctx context.Context, getReservationOptions *GetReservationOptions) (result *Reservation, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getReservationOptions, "getReservationOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getReservationOptions, "getReservationOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -9509,6 +10846,7 @@ func (vpc *VpcV1) GetReservationWithContext(ctx context.Context, getReservationO builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/reservations/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -9527,17 +10865,21 @@ func (vpc *VpcV1) GetReservationWithContext(ctx context.Context, getReservationO request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_reservation", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservation) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -9550,17 +10892,21 @@ func (vpc *VpcV1) GetReservationWithContext(ctx context.Context, getReservationO // This request updates a reservation with the information provided in a reservation patch object. The patch object is // structured in the same way as a retrieved reservation and needs to contain only the information to be updated. func (vpc *VpcV1) UpdateReservation(updateReservationOptions *UpdateReservationOptions) (result *Reservation, response *core.DetailedResponse, err error) { - return vpc.UpdateReservationWithContext(context.Background(), updateReservationOptions) + result, response, err = vpc.UpdateReservationWithContext(context.Background(), updateReservationOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateReservationWithContext is an alternate form of the UpdateReservation method which supports a Context parameter func (vpc *VpcV1) UpdateReservationWithContext(ctx context.Context, updateReservationOptions *UpdateReservationOptions) (result *Reservation, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateReservationOptions, "updateReservationOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateReservationOptions, "updateReservationOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -9573,6 +10919,7 @@ func (vpc *VpcV1) UpdateReservationWithContext(ctx context.Context, updateReserv builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/reservations/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -9592,22 +10939,27 @@ func (vpc *VpcV1) UpdateReservationWithContext(ctx context.Context, updateReserv _, err = builder.SetBodyContentJSON(updateReservationOptions.ReservationPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_reservation", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservation) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -9619,17 +10971,21 @@ func (vpc *VpcV1) UpdateReservationWithContext(ctx context.Context, updateReserv // ActivateReservation : Activate a reservation // This request activates a reservation. For this request to succeed, the reservation status must be `inactive`. func (vpc *VpcV1) ActivateReservation(activateReservationOptions *ActivateReservationOptions) (response *core.DetailedResponse, err error) { - return vpc.ActivateReservationWithContext(context.Background(), activateReservationOptions) + response, err = vpc.ActivateReservationWithContext(context.Background(), activateReservationOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ActivateReservationWithContext is an alternate form of the ActivateReservation method which supports a Context parameter func (vpc *VpcV1) ActivateReservationWithContext(ctx context.Context, activateReservationOptions *ActivateReservationOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(activateReservationOptions, "activateReservationOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(activateReservationOptions, "activateReservationOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -9642,6 +10998,7 @@ func (vpc *VpcV1) ActivateReservationWithContext(ctx context.Context, activateRe builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/reservations/{id}/activate`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -9659,10 +11016,16 @@ func (vpc *VpcV1) ActivateReservationWithContext(ctx context.Context, activateRe request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "activate_reservation", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -9671,13 +11034,16 @@ func (vpc *VpcV1) ActivateReservationWithContext(ctx context.Context, activateRe // This request lists all dedicated host groups in the region. Host groups are a collection of dedicated hosts for // placement of instances. Each dedicated host must belong to one and only one group. Host groups do not span zones. func (vpc *VpcV1) ListDedicatedHostGroups(listDedicatedHostGroupsOptions *ListDedicatedHostGroupsOptions) (result *DedicatedHostGroupCollection, response *core.DetailedResponse, err error) { - return vpc.ListDedicatedHostGroupsWithContext(context.Background(), listDedicatedHostGroupsOptions) + result, response, err = vpc.ListDedicatedHostGroupsWithContext(context.Background(), listDedicatedHostGroupsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListDedicatedHostGroupsWithContext is an alternate form of the ListDedicatedHostGroups method which supports a Context parameter func (vpc *VpcV1) ListDedicatedHostGroupsWithContext(ctx context.Context, listDedicatedHostGroupsOptions *ListDedicatedHostGroupsOptions) (result *DedicatedHostGroupCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listDedicatedHostGroupsOptions, "listDedicatedHostGroupsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -9686,6 +11052,7 @@ func (vpc *VpcV1) ListDedicatedHostGroupsWithContext(ctx context.Context, listDe builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/dedicated_host/groups`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -9719,17 +11086,21 @@ func (vpc *VpcV1) ListDedicatedHostGroupsWithContext(ctx context.Context, listDe request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_dedicated_host_groups", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostGroupCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -9741,17 +11112,21 @@ func (vpc *VpcV1) ListDedicatedHostGroupsWithContext(ctx context.Context, listDe // CreateDedicatedHostGroup : Create a dedicated host group // This request creates a new dedicated host group. func (vpc *VpcV1) CreateDedicatedHostGroup(createDedicatedHostGroupOptions *CreateDedicatedHostGroupOptions) (result *DedicatedHostGroup, response *core.DetailedResponse, err error) { - return vpc.CreateDedicatedHostGroupWithContext(context.Background(), createDedicatedHostGroupOptions) + result, response, err = vpc.CreateDedicatedHostGroupWithContext(context.Background(), createDedicatedHostGroupOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateDedicatedHostGroupWithContext is an alternate form of the CreateDedicatedHostGroup method which supports a Context parameter func (vpc *VpcV1) CreateDedicatedHostGroupWithContext(ctx context.Context, createDedicatedHostGroupOptions *CreateDedicatedHostGroupOptions) (result *DedicatedHostGroup, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createDedicatedHostGroupOptions, "createDedicatedHostGroupOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createDedicatedHostGroupOptions, "createDedicatedHostGroupOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -9760,6 +11135,7 @@ func (vpc *VpcV1) CreateDedicatedHostGroupWithContext(ctx context.Context, creat builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/dedicated_host/groups`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -9795,22 +11171,27 @@ func (vpc *VpcV1) CreateDedicatedHostGroupWithContext(ctx context.Context, creat } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_dedicated_host_group", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostGroup) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -9822,17 +11203,21 @@ func (vpc *VpcV1) CreateDedicatedHostGroupWithContext(ctx context.Context, creat // DeleteDedicatedHostGroup : Delete a dedicated host group // This request deletes a dedicated host group. func (vpc *VpcV1) DeleteDedicatedHostGroup(deleteDedicatedHostGroupOptions *DeleteDedicatedHostGroupOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteDedicatedHostGroupWithContext(context.Background(), deleteDedicatedHostGroupOptions) + response, err = vpc.DeleteDedicatedHostGroupWithContext(context.Background(), deleteDedicatedHostGroupOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteDedicatedHostGroupWithContext is an alternate form of the DeleteDedicatedHostGroup method which supports a Context parameter func (vpc *VpcV1) DeleteDedicatedHostGroupWithContext(ctx context.Context, deleteDedicatedHostGroupOptions *DeleteDedicatedHostGroupOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteDedicatedHostGroupOptions, "deleteDedicatedHostGroupOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteDedicatedHostGroupOptions, "deleteDedicatedHostGroupOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -9845,6 +11230,7 @@ func (vpc *VpcV1) DeleteDedicatedHostGroupWithContext(ctx context.Context, delet builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/dedicated_host/groups/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -9862,10 +11248,16 @@ func (vpc *VpcV1) DeleteDedicatedHostGroupWithContext(ctx context.Context, delet request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_dedicated_host_group", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -9873,17 +11265,21 @@ func (vpc *VpcV1) DeleteDedicatedHostGroupWithContext(ctx context.Context, delet // GetDedicatedHostGroup : Retrieve a dedicated host group // This request retrieves a single dedicated host group specified by the identifier in the URL. func (vpc *VpcV1) GetDedicatedHostGroup(getDedicatedHostGroupOptions *GetDedicatedHostGroupOptions) (result *DedicatedHostGroup, response *core.DetailedResponse, err error) { - return vpc.GetDedicatedHostGroupWithContext(context.Background(), getDedicatedHostGroupOptions) + result, response, err = vpc.GetDedicatedHostGroupWithContext(context.Background(), getDedicatedHostGroupOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetDedicatedHostGroupWithContext is an alternate form of the GetDedicatedHostGroup method which supports a Context parameter func (vpc *VpcV1) GetDedicatedHostGroupWithContext(ctx context.Context, getDedicatedHostGroupOptions *GetDedicatedHostGroupOptions) (result *DedicatedHostGroup, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getDedicatedHostGroupOptions, "getDedicatedHostGroupOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getDedicatedHostGroupOptions, "getDedicatedHostGroupOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -9896,6 +11292,7 @@ func (vpc *VpcV1) GetDedicatedHostGroupWithContext(ctx context.Context, getDedic builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/dedicated_host/groups/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -9914,17 +11311,21 @@ func (vpc *VpcV1) GetDedicatedHostGroupWithContext(ctx context.Context, getDedic request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_dedicated_host_group", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostGroup) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -9938,17 +11339,21 @@ func (vpc *VpcV1) GetDedicatedHostGroupWithContext(ctx context.Context, getDedic // dedicated host group patch object is structured in the same way as a retrieved dedicated host group and contains only // the information to be updated. func (vpc *VpcV1) UpdateDedicatedHostGroup(updateDedicatedHostGroupOptions *UpdateDedicatedHostGroupOptions) (result *DedicatedHostGroup, response *core.DetailedResponse, err error) { - return vpc.UpdateDedicatedHostGroupWithContext(context.Background(), updateDedicatedHostGroupOptions) + result, response, err = vpc.UpdateDedicatedHostGroupWithContext(context.Background(), updateDedicatedHostGroupOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateDedicatedHostGroupWithContext is an alternate form of the UpdateDedicatedHostGroup method which supports a Context parameter func (vpc *VpcV1) UpdateDedicatedHostGroupWithContext(ctx context.Context, updateDedicatedHostGroupOptions *UpdateDedicatedHostGroupOptions) (result *DedicatedHostGroup, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateDedicatedHostGroupOptions, "updateDedicatedHostGroupOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateDedicatedHostGroupOptions, "updateDedicatedHostGroupOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -9961,6 +11366,7 @@ func (vpc *VpcV1) UpdateDedicatedHostGroupWithContext(ctx context.Context, updat builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/dedicated_host/groups/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -9980,22 +11386,27 @@ func (vpc *VpcV1) UpdateDedicatedHostGroupWithContext(ctx context.Context, updat _, err = builder.SetBodyContentJSON(updateDedicatedHostGroupOptions.DedicatedHostGroupPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_dedicated_host_group", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostGroup) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -10008,13 +11419,16 @@ func (vpc *VpcV1) UpdateDedicatedHostGroupWithContext(ctx context.Context, updat // This request lists provisionable [dedicated host profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-dh-profiles) in // the region. A dedicated host profile specifies the hardware characteristics for a dedicated host. func (vpc *VpcV1) ListDedicatedHostProfiles(listDedicatedHostProfilesOptions *ListDedicatedHostProfilesOptions) (result *DedicatedHostProfileCollection, response *core.DetailedResponse, err error) { - return vpc.ListDedicatedHostProfilesWithContext(context.Background(), listDedicatedHostProfilesOptions) + result, response, err = vpc.ListDedicatedHostProfilesWithContext(context.Background(), listDedicatedHostProfilesOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListDedicatedHostProfilesWithContext is an alternate form of the ListDedicatedHostProfiles method which supports a Context parameter func (vpc *VpcV1) ListDedicatedHostProfilesWithContext(ctx context.Context, listDedicatedHostProfilesOptions *ListDedicatedHostProfilesOptions) (result *DedicatedHostProfileCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listDedicatedHostProfilesOptions, "listDedicatedHostProfilesOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -10023,6 +11437,7 @@ func (vpc *VpcV1) ListDedicatedHostProfilesWithContext(ctx context.Context, list builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/dedicated_host/profiles`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -10047,17 +11462,21 @@ func (vpc *VpcV1) ListDedicatedHostProfilesWithContext(ctx context.Context, list request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_dedicated_host_profiles", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostProfileCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -10069,17 +11488,21 @@ func (vpc *VpcV1) ListDedicatedHostProfilesWithContext(ctx context.Context, list // GetDedicatedHostProfile : Retrieve a dedicated host profile // This request retrieves a single dedicated host profile specified by the name in the URL. func (vpc *VpcV1) GetDedicatedHostProfile(getDedicatedHostProfileOptions *GetDedicatedHostProfileOptions) (result *DedicatedHostProfile, response *core.DetailedResponse, err error) { - return vpc.GetDedicatedHostProfileWithContext(context.Background(), getDedicatedHostProfileOptions) + result, response, err = vpc.GetDedicatedHostProfileWithContext(context.Background(), getDedicatedHostProfileOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetDedicatedHostProfileWithContext is an alternate form of the GetDedicatedHostProfile method which supports a Context parameter func (vpc *VpcV1) GetDedicatedHostProfileWithContext(ctx context.Context, getDedicatedHostProfileOptions *GetDedicatedHostProfileOptions) (result *DedicatedHostProfile, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getDedicatedHostProfileOptions, "getDedicatedHostProfileOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getDedicatedHostProfileOptions, "getDedicatedHostProfileOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -10092,6 +11515,7 @@ func (vpc *VpcV1) GetDedicatedHostProfileWithContext(ctx context.Context, getDed builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/dedicated_host/profiles/{name}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -10110,17 +11534,21 @@ func (vpc *VpcV1) GetDedicatedHostProfileWithContext(ctx context.Context, getDed request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_dedicated_host_profile", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostProfile) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -10132,13 +11560,16 @@ func (vpc *VpcV1) GetDedicatedHostProfileWithContext(ctx context.Context, getDed // ListDedicatedHosts : List all dedicated hosts // This request lists all dedicated hosts in the region. func (vpc *VpcV1) ListDedicatedHosts(listDedicatedHostsOptions *ListDedicatedHostsOptions) (result *DedicatedHostCollection, response *core.DetailedResponse, err error) { - return vpc.ListDedicatedHostsWithContext(context.Background(), listDedicatedHostsOptions) + result, response, err = vpc.ListDedicatedHostsWithContext(context.Background(), listDedicatedHostsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListDedicatedHostsWithContext is an alternate form of the ListDedicatedHosts method which supports a Context parameter func (vpc *VpcV1) ListDedicatedHostsWithContext(ctx context.Context, listDedicatedHostsOptions *ListDedicatedHostsOptions) (result *DedicatedHostCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listDedicatedHostsOptions, "listDedicatedHostsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -10147,6 +11578,7 @@ func (vpc *VpcV1) ListDedicatedHostsWithContext(ctx context.Context, listDedicat builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/dedicated_hosts`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -10183,17 +11615,21 @@ func (vpc *VpcV1) ListDedicatedHostsWithContext(ctx context.Context, listDedicat request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_dedicated_hosts", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -10205,17 +11641,21 @@ func (vpc *VpcV1) ListDedicatedHostsWithContext(ctx context.Context, listDedicat // CreateDedicatedHost : Create a dedicated host // This request creates a new dedicated host. func (vpc *VpcV1) CreateDedicatedHost(createDedicatedHostOptions *CreateDedicatedHostOptions) (result *DedicatedHost, response *core.DetailedResponse, err error) { - return vpc.CreateDedicatedHostWithContext(context.Background(), createDedicatedHostOptions) + result, response, err = vpc.CreateDedicatedHostWithContext(context.Background(), createDedicatedHostOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateDedicatedHostWithContext is an alternate form of the CreateDedicatedHost method which supports a Context parameter func (vpc *VpcV1) CreateDedicatedHostWithContext(ctx context.Context, createDedicatedHostOptions *CreateDedicatedHostOptions) (result *DedicatedHost, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createDedicatedHostOptions, "createDedicatedHostOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createDedicatedHostOptions, "createDedicatedHostOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -10224,6 +11664,7 @@ func (vpc *VpcV1) CreateDedicatedHostWithContext(ctx context.Context, createDedi builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/dedicated_hosts`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -10243,22 +11684,27 @@ func (vpc *VpcV1) CreateDedicatedHostWithContext(ctx context.Context, createDedi _, err = builder.SetBodyContentJSON(createDedicatedHostOptions.DedicatedHostPrototype) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_dedicated_host", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHost) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -10272,17 +11718,21 @@ func (vpc *VpcV1) CreateDedicatedHostWithContext(ctx context.Context, createDedi // compute node. By default, the listed disks are sorted by their // `created_at` property values, with the newest disk first. func (vpc *VpcV1) ListDedicatedHostDisks(listDedicatedHostDisksOptions *ListDedicatedHostDisksOptions) (result *DedicatedHostDiskCollection, response *core.DetailedResponse, err error) { - return vpc.ListDedicatedHostDisksWithContext(context.Background(), listDedicatedHostDisksOptions) + result, response, err = vpc.ListDedicatedHostDisksWithContext(context.Background(), listDedicatedHostDisksOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListDedicatedHostDisksWithContext is an alternate form of the ListDedicatedHostDisks method which supports a Context parameter func (vpc *VpcV1) ListDedicatedHostDisksWithContext(ctx context.Context, listDedicatedHostDisksOptions *ListDedicatedHostDisksOptions) (result *DedicatedHostDiskCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listDedicatedHostDisksOptions, "listDedicatedHostDisksOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listDedicatedHostDisksOptions, "listDedicatedHostDisksOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -10295,6 +11745,7 @@ func (vpc *VpcV1) ListDedicatedHostDisksWithContext(ctx context.Context, listDed builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/dedicated_hosts/{dedicated_host_id}/disks`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -10313,17 +11764,21 @@ func (vpc *VpcV1) ListDedicatedHostDisksWithContext(ctx context.Context, listDed request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_dedicated_host_disks", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostDiskCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -10335,17 +11790,21 @@ func (vpc *VpcV1) ListDedicatedHostDisksWithContext(ctx context.Context, listDed // GetDedicatedHostDisk : Retrieve a dedicated host disk // This request retrieves a single dedicated host disk specified by the identifier in the URL. func (vpc *VpcV1) GetDedicatedHostDisk(getDedicatedHostDiskOptions *GetDedicatedHostDiskOptions) (result *DedicatedHostDisk, response *core.DetailedResponse, err error) { - return vpc.GetDedicatedHostDiskWithContext(context.Background(), getDedicatedHostDiskOptions) + result, response, err = vpc.GetDedicatedHostDiskWithContext(context.Background(), getDedicatedHostDiskOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetDedicatedHostDiskWithContext is an alternate form of the GetDedicatedHostDisk method which supports a Context parameter func (vpc *VpcV1) GetDedicatedHostDiskWithContext(ctx context.Context, getDedicatedHostDiskOptions *GetDedicatedHostDiskOptions) (result *DedicatedHostDisk, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getDedicatedHostDiskOptions, "getDedicatedHostDiskOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getDedicatedHostDiskOptions, "getDedicatedHostDiskOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -10359,6 +11818,7 @@ func (vpc *VpcV1) GetDedicatedHostDiskWithContext(ctx context.Context, getDedica builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/dedicated_hosts/{dedicated_host_id}/disks/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -10377,17 +11837,21 @@ func (vpc *VpcV1) GetDedicatedHostDiskWithContext(ctx context.Context, getDedica request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_dedicated_host_disk", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostDisk) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -10399,17 +11863,21 @@ func (vpc *VpcV1) GetDedicatedHostDiskWithContext(ctx context.Context, getDedica // UpdateDedicatedHostDisk : Update a dedicated host disk // This request updates the dedicated host disk with the information in a provided patch. func (vpc *VpcV1) UpdateDedicatedHostDisk(updateDedicatedHostDiskOptions *UpdateDedicatedHostDiskOptions) (result *DedicatedHostDisk, response *core.DetailedResponse, err error) { - return vpc.UpdateDedicatedHostDiskWithContext(context.Background(), updateDedicatedHostDiskOptions) + result, response, err = vpc.UpdateDedicatedHostDiskWithContext(context.Background(), updateDedicatedHostDiskOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateDedicatedHostDiskWithContext is an alternate form of the UpdateDedicatedHostDisk method which supports a Context parameter func (vpc *VpcV1) UpdateDedicatedHostDiskWithContext(ctx context.Context, updateDedicatedHostDiskOptions *UpdateDedicatedHostDiskOptions) (result *DedicatedHostDisk, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateDedicatedHostDiskOptions, "updateDedicatedHostDiskOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateDedicatedHostDiskOptions, "updateDedicatedHostDiskOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -10423,6 +11891,7 @@ func (vpc *VpcV1) UpdateDedicatedHostDiskWithContext(ctx context.Context, update builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/dedicated_hosts/{dedicated_host_id}/disks/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -10442,22 +11911,27 @@ func (vpc *VpcV1) UpdateDedicatedHostDiskWithContext(ctx context.Context, update _, err = builder.SetBodyContentJSON(updateDedicatedHostDiskOptions.DedicatedHostDiskPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_dedicated_host_disk", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostDisk) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -10469,17 +11943,21 @@ func (vpc *VpcV1) UpdateDedicatedHostDiskWithContext(ctx context.Context, update // DeleteDedicatedHost : Delete a dedicated host // This request deletes a dedicated host. func (vpc *VpcV1) DeleteDedicatedHost(deleteDedicatedHostOptions *DeleteDedicatedHostOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteDedicatedHostWithContext(context.Background(), deleteDedicatedHostOptions) + response, err = vpc.DeleteDedicatedHostWithContext(context.Background(), deleteDedicatedHostOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteDedicatedHostWithContext is an alternate form of the DeleteDedicatedHost method which supports a Context parameter func (vpc *VpcV1) DeleteDedicatedHostWithContext(ctx context.Context, deleteDedicatedHostOptions *DeleteDedicatedHostOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteDedicatedHostOptions, "deleteDedicatedHostOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteDedicatedHostOptions, "deleteDedicatedHostOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -10492,6 +11970,7 @@ func (vpc *VpcV1) DeleteDedicatedHostWithContext(ctx context.Context, deleteDedi builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/dedicated_hosts/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -10509,10 +11988,16 @@ func (vpc *VpcV1) DeleteDedicatedHostWithContext(ctx context.Context, deleteDedi request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_dedicated_host", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -10520,17 +12005,21 @@ func (vpc *VpcV1) DeleteDedicatedHostWithContext(ctx context.Context, deleteDedi // GetDedicatedHost : Retrieve a dedicated host // This request retrieves a single dedicated host specified by the identifiers in the URL. func (vpc *VpcV1) GetDedicatedHost(getDedicatedHostOptions *GetDedicatedHostOptions) (result *DedicatedHost, response *core.DetailedResponse, err error) { - return vpc.GetDedicatedHostWithContext(context.Background(), getDedicatedHostOptions) + result, response, err = vpc.GetDedicatedHostWithContext(context.Background(), getDedicatedHostOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetDedicatedHostWithContext is an alternate form of the GetDedicatedHost method which supports a Context parameter func (vpc *VpcV1) GetDedicatedHostWithContext(ctx context.Context, getDedicatedHostOptions *GetDedicatedHostOptions) (result *DedicatedHost, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getDedicatedHostOptions, "getDedicatedHostOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getDedicatedHostOptions, "getDedicatedHostOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -10543,6 +12032,7 @@ func (vpc *VpcV1) GetDedicatedHostWithContext(ctx context.Context, getDedicatedH builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/dedicated_hosts/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -10561,17 +12051,21 @@ func (vpc *VpcV1) GetDedicatedHostWithContext(ctx context.Context, getDedicatedH request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_dedicated_host", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHost) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -10585,17 +12079,21 @@ func (vpc *VpcV1) GetDedicatedHostWithContext(ctx context.Context, getDedicatedH // patch object is structured in the same way as a retrieved dedicated host and contains only the information to be // updated. func (vpc *VpcV1) UpdateDedicatedHost(updateDedicatedHostOptions *UpdateDedicatedHostOptions) (result *DedicatedHost, response *core.DetailedResponse, err error) { - return vpc.UpdateDedicatedHostWithContext(context.Background(), updateDedicatedHostOptions) + result, response, err = vpc.UpdateDedicatedHostWithContext(context.Background(), updateDedicatedHostOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateDedicatedHostWithContext is an alternate form of the UpdateDedicatedHost method which supports a Context parameter func (vpc *VpcV1) UpdateDedicatedHostWithContext(ctx context.Context, updateDedicatedHostOptions *UpdateDedicatedHostOptions) (result *DedicatedHost, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateDedicatedHostOptions, "updateDedicatedHostOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateDedicatedHostOptions, "updateDedicatedHostOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -10608,6 +12106,7 @@ func (vpc *VpcV1) UpdateDedicatedHostWithContext(ctx context.Context, updateDedi builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/dedicated_hosts/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -10627,22 +12126,27 @@ func (vpc *VpcV1) UpdateDedicatedHostWithContext(ctx context.Context, updateDedi _, err = builder.SetBodyContentJSON(updateDedicatedHostOptions.DedicatedHostPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_dedicated_host", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHost) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -10654,13 +12158,16 @@ func (vpc *VpcV1) UpdateDedicatedHostWithContext(ctx context.Context, updateDedi // ListPlacementGroups : List all placement groups // This request lists all placement groups in the region. func (vpc *VpcV1) ListPlacementGroups(listPlacementGroupsOptions *ListPlacementGroupsOptions) (result *PlacementGroupCollection, response *core.DetailedResponse, err error) { - return vpc.ListPlacementGroupsWithContext(context.Background(), listPlacementGroupsOptions) + result, response, err = vpc.ListPlacementGroupsWithContext(context.Background(), listPlacementGroupsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListPlacementGroupsWithContext is an alternate form of the ListPlacementGroups method which supports a Context parameter func (vpc *VpcV1) ListPlacementGroupsWithContext(ctx context.Context, listPlacementGroupsOptions *ListPlacementGroupsOptions) (result *PlacementGroupCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listPlacementGroupsOptions, "listPlacementGroupsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -10669,6 +12176,7 @@ func (vpc *VpcV1) ListPlacementGroupsWithContext(ctx context.Context, listPlacem builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/placement_groups`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -10693,17 +12201,21 @@ func (vpc *VpcV1) ListPlacementGroupsWithContext(ctx context.Context, listPlacem request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_placement_groups", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPlacementGroupCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -10715,17 +12227,21 @@ func (vpc *VpcV1) ListPlacementGroupsWithContext(ctx context.Context, listPlacem // CreatePlacementGroup : Create a placement group // This request creates a new placement group. func (vpc *VpcV1) CreatePlacementGroup(createPlacementGroupOptions *CreatePlacementGroupOptions) (result *PlacementGroup, response *core.DetailedResponse, err error) { - return vpc.CreatePlacementGroupWithContext(context.Background(), createPlacementGroupOptions) + result, response, err = vpc.CreatePlacementGroupWithContext(context.Background(), createPlacementGroupOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreatePlacementGroupWithContext is an alternate form of the CreatePlacementGroup method which supports a Context parameter func (vpc *VpcV1) CreatePlacementGroupWithContext(ctx context.Context, createPlacementGroupOptions *CreatePlacementGroupOptions) (result *PlacementGroup, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createPlacementGroupOptions, "createPlacementGroupOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createPlacementGroupOptions, "createPlacementGroupOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -10734,6 +12250,7 @@ func (vpc *VpcV1) CreatePlacementGroupWithContext(ctx context.Context, createPla builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/placement_groups`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -10763,22 +12280,27 @@ func (vpc *VpcV1) CreatePlacementGroupWithContext(ctx context.Context, createPla } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_placement_group", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPlacementGroup) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -10791,17 +12313,21 @@ func (vpc *VpcV1) CreatePlacementGroupWithContext(ctx context.Context, createPla // This request deletes a placement group. This operation cannot be reversed. For this request to succeed, the placement // group must not be associated with an instance. func (vpc *VpcV1) DeletePlacementGroup(deletePlacementGroupOptions *DeletePlacementGroupOptions) (response *core.DetailedResponse, err error) { - return vpc.DeletePlacementGroupWithContext(context.Background(), deletePlacementGroupOptions) + response, err = vpc.DeletePlacementGroupWithContext(context.Background(), deletePlacementGroupOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeletePlacementGroupWithContext is an alternate form of the DeletePlacementGroup method which supports a Context parameter func (vpc *VpcV1) DeletePlacementGroupWithContext(ctx context.Context, deletePlacementGroupOptions *DeletePlacementGroupOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deletePlacementGroupOptions, "deletePlacementGroupOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deletePlacementGroupOptions, "deletePlacementGroupOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -10814,6 +12340,7 @@ func (vpc *VpcV1) DeletePlacementGroupWithContext(ctx context.Context, deletePla builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/placement_groups/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -10831,10 +12358,16 @@ func (vpc *VpcV1) DeletePlacementGroupWithContext(ctx context.Context, deletePla request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_placement_group", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -10842,17 +12375,21 @@ func (vpc *VpcV1) DeletePlacementGroupWithContext(ctx context.Context, deletePla // GetPlacementGroup : Retrieve a placement group // This request retrieves a single placement group specified by identifier in the URL. func (vpc *VpcV1) GetPlacementGroup(getPlacementGroupOptions *GetPlacementGroupOptions) (result *PlacementGroup, response *core.DetailedResponse, err error) { - return vpc.GetPlacementGroupWithContext(context.Background(), getPlacementGroupOptions) + result, response, err = vpc.GetPlacementGroupWithContext(context.Background(), getPlacementGroupOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetPlacementGroupWithContext is an alternate form of the GetPlacementGroup method which supports a Context parameter func (vpc *VpcV1) GetPlacementGroupWithContext(ctx context.Context, getPlacementGroupOptions *GetPlacementGroupOptions) (result *PlacementGroup, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getPlacementGroupOptions, "getPlacementGroupOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getPlacementGroupOptions, "getPlacementGroupOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -10865,6 +12402,7 @@ func (vpc *VpcV1) GetPlacementGroupWithContext(ctx context.Context, getPlacement builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/placement_groups/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -10883,17 +12421,21 @@ func (vpc *VpcV1) GetPlacementGroupWithContext(ctx context.Context, getPlacement request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_placement_group", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPlacementGroup) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -10906,17 +12448,21 @@ func (vpc *VpcV1) GetPlacementGroupWithContext(ctx context.Context, getPlacement // This request updates a placement group with the information provided placement group patch. The placement group patch // object is structured in the same way as a retrieved placement group and contains only the information to be updated. func (vpc *VpcV1) UpdatePlacementGroup(updatePlacementGroupOptions *UpdatePlacementGroupOptions) (result *PlacementGroup, response *core.DetailedResponse, err error) { - return vpc.UpdatePlacementGroupWithContext(context.Background(), updatePlacementGroupOptions) + result, response, err = vpc.UpdatePlacementGroupWithContext(context.Background(), updatePlacementGroupOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdatePlacementGroupWithContext is an alternate form of the UpdatePlacementGroup method which supports a Context parameter func (vpc *VpcV1) UpdatePlacementGroupWithContext(ctx context.Context, updatePlacementGroupOptions *UpdatePlacementGroupOptions) (result *PlacementGroup, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updatePlacementGroupOptions, "updatePlacementGroupOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updatePlacementGroupOptions, "updatePlacementGroupOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -10929,6 +12475,7 @@ func (vpc *VpcV1) UpdatePlacementGroupWithContext(ctx context.Context, updatePla builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/placement_groups/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -10948,22 +12495,27 @@ func (vpc *VpcV1) UpdatePlacementGroupWithContext(ctx context.Context, updatePla _, err = builder.SetBodyContentJSON(updatePlacementGroupOptions.PlacementGroupPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_placement_group", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPlacementGroup) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -10977,13 +12529,16 @@ func (vpc *VpcV1) UpdatePlacementGroupWithContext(ctx context.Context, updatePla // profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-bare-metal-servers-profile) available in the region. A bare metal // server profile specifies the performance characteristics and pricing model for a bare metal server. func (vpc *VpcV1) ListBareMetalServerProfiles(listBareMetalServerProfilesOptions *ListBareMetalServerProfilesOptions) (result *BareMetalServerProfileCollection, response *core.DetailedResponse, err error) { - return vpc.ListBareMetalServerProfilesWithContext(context.Background(), listBareMetalServerProfilesOptions) + result, response, err = vpc.ListBareMetalServerProfilesWithContext(context.Background(), listBareMetalServerProfilesOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListBareMetalServerProfilesWithContext is an alternate form of the ListBareMetalServerProfiles method which supports a Context parameter func (vpc *VpcV1) ListBareMetalServerProfilesWithContext(ctx context.Context, listBareMetalServerProfilesOptions *ListBareMetalServerProfilesOptions) (result *BareMetalServerProfileCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listBareMetalServerProfilesOptions, "listBareMetalServerProfilesOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -10992,6 +12547,7 @@ func (vpc *VpcV1) ListBareMetalServerProfilesWithContext(ctx context.Context, li builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_server/profiles`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -11016,17 +12572,21 @@ func (vpc *VpcV1) ListBareMetalServerProfilesWithContext(ctx context.Context, li request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_bare_metal_server_profiles", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServerProfileCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -11038,17 +12598,21 @@ func (vpc *VpcV1) ListBareMetalServerProfilesWithContext(ctx context.Context, li // GetBareMetalServerProfile : Retrieve a bare metal server profile // This request retrieves a single bare metal server profile specified by the name in the URL. func (vpc *VpcV1) GetBareMetalServerProfile(getBareMetalServerProfileOptions *GetBareMetalServerProfileOptions) (result *BareMetalServerProfile, response *core.DetailedResponse, err error) { - return vpc.GetBareMetalServerProfileWithContext(context.Background(), getBareMetalServerProfileOptions) + result, response, err = vpc.GetBareMetalServerProfileWithContext(context.Background(), getBareMetalServerProfileOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetBareMetalServerProfileWithContext is an alternate form of the GetBareMetalServerProfile method which supports a Context parameter func (vpc *VpcV1) GetBareMetalServerProfileWithContext(ctx context.Context, getBareMetalServerProfileOptions *GetBareMetalServerProfileOptions) (result *BareMetalServerProfile, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getBareMetalServerProfileOptions, "getBareMetalServerProfileOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getBareMetalServerProfileOptions, "getBareMetalServerProfileOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -11061,6 +12625,7 @@ func (vpc *VpcV1) GetBareMetalServerProfileWithContext(ctx context.Context, getB builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_server/profiles/{name}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -11079,17 +12644,21 @@ func (vpc *VpcV1) GetBareMetalServerProfileWithContext(ctx context.Context, getB request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_bare_metal_server_profile", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServerProfile) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -11101,13 +12670,16 @@ func (vpc *VpcV1) GetBareMetalServerProfileWithContext(ctx context.Context, getB // ListBareMetalServers : List all bare metal servers // This request lists all bare metal servers in the region. func (vpc *VpcV1) ListBareMetalServers(listBareMetalServersOptions *ListBareMetalServersOptions) (result *BareMetalServerCollection, response *core.DetailedResponse, err error) { - return vpc.ListBareMetalServersWithContext(context.Background(), listBareMetalServersOptions) + result, response, err = vpc.ListBareMetalServersWithContext(context.Background(), listBareMetalServersOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListBareMetalServersWithContext is an alternate form of the ListBareMetalServers method which supports a Context parameter func (vpc *VpcV1) ListBareMetalServersWithContext(ctx context.Context, listBareMetalServersOptions *ListBareMetalServersOptions) (result *BareMetalServerCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listBareMetalServersOptions, "listBareMetalServersOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -11116,6 +12688,7 @@ func (vpc *VpcV1) ListBareMetalServersWithContext(ctx context.Context, listBareM builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -11155,17 +12728,21 @@ func (vpc *VpcV1) ListBareMetalServersWithContext(ctx context.Context, listBareM request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_bare_metal_servers", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServerCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -11179,17 +12756,21 @@ func (vpc *VpcV1) ListBareMetalServersWithContext(ctx context.Context, listBareM // same way as a retrieved bare metal server, and contains the information necessary to provision the new bare metal // server. The bare metal server is automatically started. func (vpc *VpcV1) CreateBareMetalServer(createBareMetalServerOptions *CreateBareMetalServerOptions) (result *BareMetalServer, response *core.DetailedResponse, err error) { - return vpc.CreateBareMetalServerWithContext(context.Background(), createBareMetalServerOptions) + result, response, err = vpc.CreateBareMetalServerWithContext(context.Background(), createBareMetalServerOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateBareMetalServerWithContext is an alternate form of the CreateBareMetalServer method which supports a Context parameter func (vpc *VpcV1) CreateBareMetalServerWithContext(ctx context.Context, createBareMetalServerOptions *CreateBareMetalServerOptions) (result *BareMetalServer, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createBareMetalServerOptions, "createBareMetalServerOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createBareMetalServerOptions, "createBareMetalServerOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -11198,6 +12779,7 @@ func (vpc *VpcV1) CreateBareMetalServerWithContext(ctx context.Context, createBa builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -11217,22 +12799,27 @@ func (vpc *VpcV1) CreateBareMetalServerWithContext(ctx context.Context, createBa _, err = builder.SetBodyContentJSON(createBareMetalServerOptions.BareMetalServerPrototype) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_bare_metal_server", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServer) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -11247,17 +12834,21 @@ func (vpc *VpcV1) CreateBareMetalServerWithContext(ctx context.Context, createBa // WebSocket request. The access token is only valid for a short period of time, and a maximum of one token is valid // for a given bare metal server at a time. func (vpc *VpcV1) CreateBareMetalServerConsoleAccessToken(createBareMetalServerConsoleAccessTokenOptions *CreateBareMetalServerConsoleAccessTokenOptions) (result *BareMetalServerConsoleAccessToken, response *core.DetailedResponse, err error) { - return vpc.CreateBareMetalServerConsoleAccessTokenWithContext(context.Background(), createBareMetalServerConsoleAccessTokenOptions) + result, response, err = vpc.CreateBareMetalServerConsoleAccessTokenWithContext(context.Background(), createBareMetalServerConsoleAccessTokenOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateBareMetalServerConsoleAccessTokenWithContext is an alternate form of the CreateBareMetalServerConsoleAccessToken method which supports a Context parameter func (vpc *VpcV1) CreateBareMetalServerConsoleAccessTokenWithContext(ctx context.Context, createBareMetalServerConsoleAccessTokenOptions *CreateBareMetalServerConsoleAccessTokenOptions) (result *BareMetalServerConsoleAccessToken, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createBareMetalServerConsoleAccessTokenOptions, "createBareMetalServerConsoleAccessTokenOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createBareMetalServerConsoleAccessTokenOptions, "createBareMetalServerConsoleAccessTokenOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -11270,6 +12861,7 @@ func (vpc *VpcV1) CreateBareMetalServerConsoleAccessTokenWithContext(ctx context builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/console_access_token`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -11296,22 +12888,27 @@ func (vpc *VpcV1) CreateBareMetalServerConsoleAccessTokenWithContext(ctx context } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_bare_metal_server_console_access_token", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServerConsoleAccessToken) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -11325,17 +12922,21 @@ func (vpc *VpcV1) CreateBareMetalServerConsoleAccessTokenWithContext(ctx context // physical server. By default, the listed disks are sorted by their `created_at` property values, with the newest disk // first. func (vpc *VpcV1) ListBareMetalServerDisks(listBareMetalServerDisksOptions *ListBareMetalServerDisksOptions) (result *BareMetalServerDiskCollection, response *core.DetailedResponse, err error) { - return vpc.ListBareMetalServerDisksWithContext(context.Background(), listBareMetalServerDisksOptions) + result, response, err = vpc.ListBareMetalServerDisksWithContext(context.Background(), listBareMetalServerDisksOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListBareMetalServerDisksWithContext is an alternate form of the ListBareMetalServerDisks method which supports a Context parameter func (vpc *VpcV1) ListBareMetalServerDisksWithContext(ctx context.Context, listBareMetalServerDisksOptions *ListBareMetalServerDisksOptions) (result *BareMetalServerDiskCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listBareMetalServerDisksOptions, "listBareMetalServerDisksOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listBareMetalServerDisksOptions, "listBareMetalServerDisksOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -11348,6 +12949,7 @@ func (vpc *VpcV1) ListBareMetalServerDisksWithContext(ctx context.Context, listB builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/disks`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -11366,17 +12968,21 @@ func (vpc *VpcV1) ListBareMetalServerDisksWithContext(ctx context.Context, listB request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_bare_metal_server_disks", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServerDiskCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -11388,17 +12994,21 @@ func (vpc *VpcV1) ListBareMetalServerDisksWithContext(ctx context.Context, listB // GetBareMetalServerDisk : Retrieve a bare metal server disk // This request retrieves a single disk specified by the identifier in the URL. func (vpc *VpcV1) GetBareMetalServerDisk(getBareMetalServerDiskOptions *GetBareMetalServerDiskOptions) (result *BareMetalServerDisk, response *core.DetailedResponse, err error) { - return vpc.GetBareMetalServerDiskWithContext(context.Background(), getBareMetalServerDiskOptions) + result, response, err = vpc.GetBareMetalServerDiskWithContext(context.Background(), getBareMetalServerDiskOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetBareMetalServerDiskWithContext is an alternate form of the GetBareMetalServerDisk method which supports a Context parameter func (vpc *VpcV1) GetBareMetalServerDiskWithContext(ctx context.Context, getBareMetalServerDiskOptions *GetBareMetalServerDiskOptions) (result *BareMetalServerDisk, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getBareMetalServerDiskOptions, "getBareMetalServerDiskOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getBareMetalServerDiskOptions, "getBareMetalServerDiskOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -11412,6 +13022,7 @@ func (vpc *VpcV1) GetBareMetalServerDiskWithContext(ctx context.Context, getBare builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/disks/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -11430,17 +13041,21 @@ func (vpc *VpcV1) GetBareMetalServerDiskWithContext(ctx context.Context, getBare request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_bare_metal_server_disk", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServerDisk) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -11452,17 +13067,21 @@ func (vpc *VpcV1) GetBareMetalServerDiskWithContext(ctx context.Context, getBare // UpdateBareMetalServerDisk : Update a bare metal server disk // This request updates the bare metal server disk with the information in a provided patch. func (vpc *VpcV1) UpdateBareMetalServerDisk(updateBareMetalServerDiskOptions *UpdateBareMetalServerDiskOptions) (result *BareMetalServerDisk, response *core.DetailedResponse, err error) { - return vpc.UpdateBareMetalServerDiskWithContext(context.Background(), updateBareMetalServerDiskOptions) + result, response, err = vpc.UpdateBareMetalServerDiskWithContext(context.Background(), updateBareMetalServerDiskOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateBareMetalServerDiskWithContext is an alternate form of the UpdateBareMetalServerDisk method which supports a Context parameter func (vpc *VpcV1) UpdateBareMetalServerDiskWithContext(ctx context.Context, updateBareMetalServerDiskOptions *UpdateBareMetalServerDiskOptions) (result *BareMetalServerDisk, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateBareMetalServerDiskOptions, "updateBareMetalServerDiskOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateBareMetalServerDiskOptions, "updateBareMetalServerDiskOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -11476,6 +13095,7 @@ func (vpc *VpcV1) UpdateBareMetalServerDiskWithContext(ctx context.Context, upda builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/disks/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -11495,22 +13115,27 @@ func (vpc *VpcV1) UpdateBareMetalServerDiskWithContext(ctx context.Context, upda _, err = builder.SetBodyContentJSON(updateBareMetalServerDiskOptions.BareMetalServerDiskPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_bare_metal_server_disk", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServerDisk) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -11529,17 +13154,21 @@ func (vpc *VpcV1) UpdateBareMetalServerDiskWithContext(ctx context.Context, upda // Network attachments with identical `created_at` property values will in turn be sorted by ascending `name` property // values. func (vpc *VpcV1) ListBareMetalServerNetworkAttachments(listBareMetalServerNetworkAttachmentsOptions *ListBareMetalServerNetworkAttachmentsOptions) (result *BareMetalServerNetworkAttachmentCollection, response *core.DetailedResponse, err error) { - return vpc.ListBareMetalServerNetworkAttachmentsWithContext(context.Background(), listBareMetalServerNetworkAttachmentsOptions) + result, response, err = vpc.ListBareMetalServerNetworkAttachmentsWithContext(context.Background(), listBareMetalServerNetworkAttachmentsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListBareMetalServerNetworkAttachmentsWithContext is an alternate form of the ListBareMetalServerNetworkAttachments method which supports a Context parameter func (vpc *VpcV1) ListBareMetalServerNetworkAttachmentsWithContext(ctx context.Context, listBareMetalServerNetworkAttachmentsOptions *ListBareMetalServerNetworkAttachmentsOptions) (result *BareMetalServerNetworkAttachmentCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listBareMetalServerNetworkAttachmentsOptions, "listBareMetalServerNetworkAttachmentsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listBareMetalServerNetworkAttachmentsOptions, "listBareMetalServerNetworkAttachmentsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -11552,6 +13181,7 @@ func (vpc *VpcV1) ListBareMetalServerNetworkAttachmentsWithContext(ctx context.C builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/network_attachments`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -11576,17 +13206,21 @@ func (vpc *VpcV1) ListBareMetalServerNetworkAttachmentsWithContext(ctx context.C request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_bare_metal_server_network_attachments", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServerNetworkAttachmentCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -11600,17 +13234,21 @@ func (vpc *VpcV1) ListBareMetalServerNetworkAttachmentsWithContext(ctx context.C // object. The prototype object is structured in the same way as a retrieved bare metal server network attachment, and // contains the information necessary to create the new bare metal server network attachment. func (vpc *VpcV1) CreateBareMetalServerNetworkAttachment(createBareMetalServerNetworkAttachmentOptions *CreateBareMetalServerNetworkAttachmentOptions) (result BareMetalServerNetworkAttachmentIntf, response *core.DetailedResponse, err error) { - return vpc.CreateBareMetalServerNetworkAttachmentWithContext(context.Background(), createBareMetalServerNetworkAttachmentOptions) + result, response, err = vpc.CreateBareMetalServerNetworkAttachmentWithContext(context.Background(), createBareMetalServerNetworkAttachmentOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateBareMetalServerNetworkAttachmentWithContext is an alternate form of the CreateBareMetalServerNetworkAttachment method which supports a Context parameter func (vpc *VpcV1) CreateBareMetalServerNetworkAttachmentWithContext(ctx context.Context, createBareMetalServerNetworkAttachmentOptions *CreateBareMetalServerNetworkAttachmentOptions) (result BareMetalServerNetworkAttachmentIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createBareMetalServerNetworkAttachmentOptions, "createBareMetalServerNetworkAttachmentOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createBareMetalServerNetworkAttachmentOptions, "createBareMetalServerNetworkAttachmentOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -11623,6 +13261,7 @@ func (vpc *VpcV1) CreateBareMetalServerNetworkAttachmentWithContext(ctx context. builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/network_attachments`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -11642,22 +13281,27 @@ func (vpc *VpcV1) CreateBareMetalServerNetworkAttachmentWithContext(ctx context. _, err = builder.SetBodyContentJSON(createBareMetalServerNetworkAttachmentOptions.BareMetalServerNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_bare_metal_server_network_attachment", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServerNetworkAttachment) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -11672,17 +13316,21 @@ func (vpc *VpcV1) CreateBareMetalServerNetworkAttachmentWithContext(ctx context. // // The bare metal server's primary network attachment cannot be deleted. func (vpc *VpcV1) DeleteBareMetalServerNetworkAttachment(deleteBareMetalServerNetworkAttachmentOptions *DeleteBareMetalServerNetworkAttachmentOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteBareMetalServerNetworkAttachmentWithContext(context.Background(), deleteBareMetalServerNetworkAttachmentOptions) + response, err = vpc.DeleteBareMetalServerNetworkAttachmentWithContext(context.Background(), deleteBareMetalServerNetworkAttachmentOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteBareMetalServerNetworkAttachmentWithContext is an alternate form of the DeleteBareMetalServerNetworkAttachment method which supports a Context parameter func (vpc *VpcV1) DeleteBareMetalServerNetworkAttachmentWithContext(ctx context.Context, deleteBareMetalServerNetworkAttachmentOptions *DeleteBareMetalServerNetworkAttachmentOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteBareMetalServerNetworkAttachmentOptions, "deleteBareMetalServerNetworkAttachmentOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteBareMetalServerNetworkAttachmentOptions, "deleteBareMetalServerNetworkAttachmentOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -11696,6 +13344,7 @@ func (vpc *VpcV1) DeleteBareMetalServerNetworkAttachmentWithContext(ctx context. builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/network_attachments/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -11713,10 +13362,16 @@ func (vpc *VpcV1) DeleteBareMetalServerNetworkAttachmentWithContext(ctx context. request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_bare_metal_server_network_attachment", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -11724,17 +13379,21 @@ func (vpc *VpcV1) DeleteBareMetalServerNetworkAttachmentWithContext(ctx context. // GetBareMetalServerNetworkAttachment : Retrieve a bare metal server network attachment // This request retrieves a single bare metal server network attachment specified by the identifier in the URL. func (vpc *VpcV1) GetBareMetalServerNetworkAttachment(getBareMetalServerNetworkAttachmentOptions *GetBareMetalServerNetworkAttachmentOptions) (result BareMetalServerNetworkAttachmentIntf, response *core.DetailedResponse, err error) { - return vpc.GetBareMetalServerNetworkAttachmentWithContext(context.Background(), getBareMetalServerNetworkAttachmentOptions) + result, response, err = vpc.GetBareMetalServerNetworkAttachmentWithContext(context.Background(), getBareMetalServerNetworkAttachmentOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetBareMetalServerNetworkAttachmentWithContext is an alternate form of the GetBareMetalServerNetworkAttachment method which supports a Context parameter func (vpc *VpcV1) GetBareMetalServerNetworkAttachmentWithContext(ctx context.Context, getBareMetalServerNetworkAttachmentOptions *GetBareMetalServerNetworkAttachmentOptions) (result BareMetalServerNetworkAttachmentIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getBareMetalServerNetworkAttachmentOptions, "getBareMetalServerNetworkAttachmentOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getBareMetalServerNetworkAttachmentOptions, "getBareMetalServerNetworkAttachmentOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -11748,6 +13407,7 @@ func (vpc *VpcV1) GetBareMetalServerNetworkAttachmentWithContext(ctx context.Con builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/network_attachments/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -11766,17 +13426,21 @@ func (vpc *VpcV1) GetBareMetalServerNetworkAttachmentWithContext(ctx context.Con request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_bare_metal_server_network_attachment", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServerNetworkAttachment) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -11790,17 +13454,21 @@ func (vpc *VpcV1) GetBareMetalServerNetworkAttachmentWithContext(ctx context.Con // network attachment patch object. The bare metal server network attachment patch object is structured in the same way // as a retrieved bare metal server network attachment and contains only the information to be updated. func (vpc *VpcV1) UpdateBareMetalServerNetworkAttachment(updateBareMetalServerNetworkAttachmentOptions *UpdateBareMetalServerNetworkAttachmentOptions) (result BareMetalServerNetworkAttachmentIntf, response *core.DetailedResponse, err error) { - return vpc.UpdateBareMetalServerNetworkAttachmentWithContext(context.Background(), updateBareMetalServerNetworkAttachmentOptions) + result, response, err = vpc.UpdateBareMetalServerNetworkAttachmentWithContext(context.Background(), updateBareMetalServerNetworkAttachmentOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateBareMetalServerNetworkAttachmentWithContext is an alternate form of the UpdateBareMetalServerNetworkAttachment method which supports a Context parameter func (vpc *VpcV1) UpdateBareMetalServerNetworkAttachmentWithContext(ctx context.Context, updateBareMetalServerNetworkAttachmentOptions *UpdateBareMetalServerNetworkAttachmentOptions) (result BareMetalServerNetworkAttachmentIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateBareMetalServerNetworkAttachmentOptions, "updateBareMetalServerNetworkAttachmentOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateBareMetalServerNetworkAttachmentOptions, "updateBareMetalServerNetworkAttachmentOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -11814,6 +13482,7 @@ func (vpc *VpcV1) UpdateBareMetalServerNetworkAttachmentWithContext(ctx context. builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/network_attachments/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -11833,22 +13502,27 @@ func (vpc *VpcV1) UpdateBareMetalServerNetworkAttachmentWithContext(ctx context. _, err = builder.SetBodyContentJSON(updateBareMetalServerNetworkAttachmentOptions.BareMetalServerNetworkAttachmentPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_bare_metal_server_network_attachment", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServerNetworkAttachment) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -11867,17 +13541,21 @@ func (vpc *VpcV1) UpdateBareMetalServerNetworkAttachmentWithContext(ctx context. // representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients) of its corresponding network // attachment and its attached virtual network interface. func (vpc *VpcV1) ListBareMetalServerNetworkInterfaces(listBareMetalServerNetworkInterfacesOptions *ListBareMetalServerNetworkInterfacesOptions) (result *BareMetalServerNetworkInterfaceCollection, response *core.DetailedResponse, err error) { - return vpc.ListBareMetalServerNetworkInterfacesWithContext(context.Background(), listBareMetalServerNetworkInterfacesOptions) + result, response, err = vpc.ListBareMetalServerNetworkInterfacesWithContext(context.Background(), listBareMetalServerNetworkInterfacesOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListBareMetalServerNetworkInterfacesWithContext is an alternate form of the ListBareMetalServerNetworkInterfaces method which supports a Context parameter func (vpc *VpcV1) ListBareMetalServerNetworkInterfacesWithContext(ctx context.Context, listBareMetalServerNetworkInterfacesOptions *ListBareMetalServerNetworkInterfacesOptions) (result *BareMetalServerNetworkInterfaceCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listBareMetalServerNetworkInterfacesOptions, "listBareMetalServerNetworkInterfacesOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listBareMetalServerNetworkInterfacesOptions, "listBareMetalServerNetworkInterfacesOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -11890,6 +13568,7 @@ func (vpc *VpcV1) ListBareMetalServerNetworkInterfacesWithContext(ctx context.Co builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/network_interfaces`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -11914,17 +13593,21 @@ func (vpc *VpcV1) ListBareMetalServerNetworkInterfacesWithContext(ctx context.Co request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_bare_metal_server_network_interfaces", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServerNetworkInterfaceCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -11944,17 +13627,21 @@ func (vpc *VpcV1) ListBareMetalServerNetworkInterfacesWithContext(ctx context.Co // representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients) of its corresponding network // attachment and its attached virtual network interface, and new network interfaces are not allowed to be created. func (vpc *VpcV1) CreateBareMetalServerNetworkInterface(createBareMetalServerNetworkInterfaceOptions *CreateBareMetalServerNetworkInterfaceOptions) (result BareMetalServerNetworkInterfaceIntf, response *core.DetailedResponse, err error) { - return vpc.CreateBareMetalServerNetworkInterfaceWithContext(context.Background(), createBareMetalServerNetworkInterfaceOptions) + result, response, err = vpc.CreateBareMetalServerNetworkInterfaceWithContext(context.Background(), createBareMetalServerNetworkInterfaceOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateBareMetalServerNetworkInterfaceWithContext is an alternate form of the CreateBareMetalServerNetworkInterface method which supports a Context parameter func (vpc *VpcV1) CreateBareMetalServerNetworkInterfaceWithContext(ctx context.Context, createBareMetalServerNetworkInterfaceOptions *CreateBareMetalServerNetworkInterfaceOptions) (result BareMetalServerNetworkInterfaceIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createBareMetalServerNetworkInterfaceOptions, "createBareMetalServerNetworkInterfaceOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createBareMetalServerNetworkInterfaceOptions, "createBareMetalServerNetworkInterfaceOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -11967,6 +13654,7 @@ func (vpc *VpcV1) CreateBareMetalServerNetworkInterfaceWithContext(ctx context.C builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/network_interfaces`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -11986,22 +13674,27 @@ func (vpc *VpcV1) CreateBareMetalServerNetworkInterfaceWithContext(ctx context.C _, err = builder.SetBodyContentJSON(createBareMetalServerNetworkInterfaceOptions.BareMetalServerNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_bare_metal_server_network_interface", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServerNetworkInterface) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -12019,17 +13712,21 @@ func (vpc *VpcV1) CreateBareMetalServerNetworkInterfaceWithContext(ctx context.C // representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients) of its corresponding network // attachment and its attached virtual network interface, and is not allowed to be deleted. func (vpc *VpcV1) DeleteBareMetalServerNetworkInterface(deleteBareMetalServerNetworkInterfaceOptions *DeleteBareMetalServerNetworkInterfaceOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteBareMetalServerNetworkInterfaceWithContext(context.Background(), deleteBareMetalServerNetworkInterfaceOptions) + response, err = vpc.DeleteBareMetalServerNetworkInterfaceWithContext(context.Background(), deleteBareMetalServerNetworkInterfaceOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteBareMetalServerNetworkInterfaceWithContext is an alternate form of the DeleteBareMetalServerNetworkInterface method which supports a Context parameter func (vpc *VpcV1) DeleteBareMetalServerNetworkInterfaceWithContext(ctx context.Context, deleteBareMetalServerNetworkInterfaceOptions *DeleteBareMetalServerNetworkInterfaceOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteBareMetalServerNetworkInterfaceOptions, "deleteBareMetalServerNetworkInterfaceOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteBareMetalServerNetworkInterfaceOptions, "deleteBareMetalServerNetworkInterfaceOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -12043,6 +13740,7 @@ func (vpc *VpcV1) DeleteBareMetalServerNetworkInterfaceWithContext(ctx context.C builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -12060,10 +13758,16 @@ func (vpc *VpcV1) DeleteBareMetalServerNetworkInterfaceWithContext(ctx context.C request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_bare_metal_server_network_interface", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -12075,17 +13779,21 @@ func (vpc *VpcV1) DeleteBareMetalServerNetworkInterfaceWithContext(ctx context.C // representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients) of its corresponding network // attachment and its attached virtual network interface. func (vpc *VpcV1) GetBareMetalServerNetworkInterface(getBareMetalServerNetworkInterfaceOptions *GetBareMetalServerNetworkInterfaceOptions) (result BareMetalServerNetworkInterfaceIntf, response *core.DetailedResponse, err error) { - return vpc.GetBareMetalServerNetworkInterfaceWithContext(context.Background(), getBareMetalServerNetworkInterfaceOptions) + result, response, err = vpc.GetBareMetalServerNetworkInterfaceWithContext(context.Background(), getBareMetalServerNetworkInterfaceOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetBareMetalServerNetworkInterfaceWithContext is an alternate form of the GetBareMetalServerNetworkInterface method which supports a Context parameter func (vpc *VpcV1) GetBareMetalServerNetworkInterfaceWithContext(ctx context.Context, getBareMetalServerNetworkInterfaceOptions *GetBareMetalServerNetworkInterfaceOptions) (result BareMetalServerNetworkInterfaceIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getBareMetalServerNetworkInterfaceOptions, "getBareMetalServerNetworkInterfaceOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getBareMetalServerNetworkInterfaceOptions, "getBareMetalServerNetworkInterfaceOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -12099,6 +13807,7 @@ func (vpc *VpcV1) GetBareMetalServerNetworkInterfaceWithContext(ctx context.Cont builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -12117,17 +13826,21 @@ func (vpc *VpcV1) GetBareMetalServerNetworkInterfaceWithContext(ctx context.Cont request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_bare_metal_server_network_interface", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServerNetworkInterface) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -12145,17 +13858,21 @@ func (vpc *VpcV1) GetBareMetalServerNetworkInterfaceWithContext(ctx context.Cont // representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients) of its corresponding network // attachment and its attached virtual network interface, and is not allowed to be updated. func (vpc *VpcV1) UpdateBareMetalServerNetworkInterface(updateBareMetalServerNetworkInterfaceOptions *UpdateBareMetalServerNetworkInterfaceOptions) (result BareMetalServerNetworkInterfaceIntf, response *core.DetailedResponse, err error) { - return vpc.UpdateBareMetalServerNetworkInterfaceWithContext(context.Background(), updateBareMetalServerNetworkInterfaceOptions) + result, response, err = vpc.UpdateBareMetalServerNetworkInterfaceWithContext(context.Background(), updateBareMetalServerNetworkInterfaceOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateBareMetalServerNetworkInterfaceWithContext is an alternate form of the UpdateBareMetalServerNetworkInterface method which supports a Context parameter func (vpc *VpcV1) UpdateBareMetalServerNetworkInterfaceWithContext(ctx context.Context, updateBareMetalServerNetworkInterfaceOptions *UpdateBareMetalServerNetworkInterfaceOptions) (result BareMetalServerNetworkInterfaceIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateBareMetalServerNetworkInterfaceOptions, "updateBareMetalServerNetworkInterfaceOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateBareMetalServerNetworkInterfaceOptions, "updateBareMetalServerNetworkInterfaceOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -12169,6 +13886,7 @@ func (vpc *VpcV1) UpdateBareMetalServerNetworkInterfaceWithContext(ctx context.C builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -12188,22 +13906,27 @@ func (vpc *VpcV1) UpdateBareMetalServerNetworkInterfaceWithContext(ctx context.C _, err = builder.SetBodyContentJSON(updateBareMetalServerNetworkInterfaceOptions.BareMetalServerNetworkInterfacePatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_bare_metal_server_network_interface", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServerNetworkInterface) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -12215,17 +13938,21 @@ func (vpc *VpcV1) UpdateBareMetalServerNetworkInterfaceWithContext(ctx context.C // ListBareMetalServerNetworkInterfaceFloatingIps : List all floating IPs associated with a bare metal server network interface // This request lists all floating IPs associated with a bare metal server network interface. func (vpc *VpcV1) ListBareMetalServerNetworkInterfaceFloatingIps(listBareMetalServerNetworkInterfaceFloatingIpsOptions *ListBareMetalServerNetworkInterfaceFloatingIpsOptions) (result *FloatingIPUnpaginatedCollection, response *core.DetailedResponse, err error) { - return vpc.ListBareMetalServerNetworkInterfaceFloatingIpsWithContext(context.Background(), listBareMetalServerNetworkInterfaceFloatingIpsOptions) + result, response, err = vpc.ListBareMetalServerNetworkInterfaceFloatingIpsWithContext(context.Background(), listBareMetalServerNetworkInterfaceFloatingIpsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListBareMetalServerNetworkInterfaceFloatingIpsWithContext is an alternate form of the ListBareMetalServerNetworkInterfaceFloatingIps method which supports a Context parameter func (vpc *VpcV1) ListBareMetalServerNetworkInterfaceFloatingIpsWithContext(ctx context.Context, listBareMetalServerNetworkInterfaceFloatingIpsOptions *ListBareMetalServerNetworkInterfaceFloatingIpsOptions) (result *FloatingIPUnpaginatedCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listBareMetalServerNetworkInterfaceFloatingIpsOptions, "listBareMetalServerNetworkInterfaceFloatingIpsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listBareMetalServerNetworkInterfaceFloatingIpsOptions, "listBareMetalServerNetworkInterfaceFloatingIpsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -12239,6 +13966,7 @@ func (vpc *VpcV1) ListBareMetalServerNetworkInterfaceFloatingIpsWithContext(ctx builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/floating_ips`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -12257,17 +13985,21 @@ func (vpc *VpcV1) ListBareMetalServerNetworkInterfaceFloatingIpsWithContext(ctx request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_bare_metal_server_network_interface_floating_ips", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIPUnpaginatedCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -12279,17 +14011,21 @@ func (vpc *VpcV1) ListBareMetalServerNetworkInterfaceFloatingIpsWithContext(ctx // RemoveBareMetalServerNetworkInterfaceFloatingIP : Disassociate a floating IP from a bare metal server network interface // This request disassociates the specified floating IP from the specified bare metal server network interface. func (vpc *VpcV1) RemoveBareMetalServerNetworkInterfaceFloatingIP(removeBareMetalServerNetworkInterfaceFloatingIPOptions *RemoveBareMetalServerNetworkInterfaceFloatingIPOptions) (response *core.DetailedResponse, err error) { - return vpc.RemoveBareMetalServerNetworkInterfaceFloatingIPWithContext(context.Background(), removeBareMetalServerNetworkInterfaceFloatingIPOptions) + response, err = vpc.RemoveBareMetalServerNetworkInterfaceFloatingIPWithContext(context.Background(), removeBareMetalServerNetworkInterfaceFloatingIPOptions) + err = core.RepurposeSDKProblem(err, "") + return } // RemoveBareMetalServerNetworkInterfaceFloatingIPWithContext is an alternate form of the RemoveBareMetalServerNetworkInterfaceFloatingIP method which supports a Context parameter func (vpc *VpcV1) RemoveBareMetalServerNetworkInterfaceFloatingIPWithContext(ctx context.Context, removeBareMetalServerNetworkInterfaceFloatingIPOptions *RemoveBareMetalServerNetworkInterfaceFloatingIPOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(removeBareMetalServerNetworkInterfaceFloatingIPOptions, "removeBareMetalServerNetworkInterfaceFloatingIPOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(removeBareMetalServerNetworkInterfaceFloatingIPOptions, "removeBareMetalServerNetworkInterfaceFloatingIPOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -12304,6 +14040,7 @@ func (vpc *VpcV1) RemoveBareMetalServerNetworkInterfaceFloatingIPWithContext(ctx builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/floating_ips/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -12321,10 +14058,16 @@ func (vpc *VpcV1) RemoveBareMetalServerNetworkInterfaceFloatingIPWithContext(ctx request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "remove_bare_metal_server_network_interface_floating_ip", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -12333,17 +14076,21 @@ func (vpc *VpcV1) RemoveBareMetalServerNetworkInterfaceFloatingIPWithContext(ctx // This request retrieves a specified floating IP if it is associated with the bare metal server network interface // specified in the URL. func (vpc *VpcV1) GetBareMetalServerNetworkInterfaceFloatingIP(getBareMetalServerNetworkInterfaceFloatingIPOptions *GetBareMetalServerNetworkInterfaceFloatingIPOptions) (result *FloatingIP, response *core.DetailedResponse, err error) { - return vpc.GetBareMetalServerNetworkInterfaceFloatingIPWithContext(context.Background(), getBareMetalServerNetworkInterfaceFloatingIPOptions) + result, response, err = vpc.GetBareMetalServerNetworkInterfaceFloatingIPWithContext(context.Background(), getBareMetalServerNetworkInterfaceFloatingIPOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetBareMetalServerNetworkInterfaceFloatingIPWithContext is an alternate form of the GetBareMetalServerNetworkInterfaceFloatingIP method which supports a Context parameter func (vpc *VpcV1) GetBareMetalServerNetworkInterfaceFloatingIPWithContext(ctx context.Context, getBareMetalServerNetworkInterfaceFloatingIPOptions *GetBareMetalServerNetworkInterfaceFloatingIPOptions) (result *FloatingIP, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getBareMetalServerNetworkInterfaceFloatingIPOptions, "getBareMetalServerNetworkInterfaceFloatingIPOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getBareMetalServerNetworkInterfaceFloatingIPOptions, "getBareMetalServerNetworkInterfaceFloatingIPOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -12358,6 +14105,7 @@ func (vpc *VpcV1) GetBareMetalServerNetworkInterfaceFloatingIPWithContext(ctx co builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/floating_ips/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -12376,17 +14124,21 @@ func (vpc *VpcV1) GetBareMetalServerNetworkInterfaceFloatingIPWithContext(ctx co request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_bare_metal_server_network_interface_floating_ip", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIP) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -12406,17 +14158,21 @@ func (vpc *VpcV1) GetBareMetalServerNetworkInterfaceFloatingIPWithContext(ctx co // // A request body is not required, and if provided, is ignored. func (vpc *VpcV1) AddBareMetalServerNetworkInterfaceFloatingIP(addBareMetalServerNetworkInterfaceFloatingIPOptions *AddBareMetalServerNetworkInterfaceFloatingIPOptions) (result *FloatingIP, response *core.DetailedResponse, err error) { - return vpc.AddBareMetalServerNetworkInterfaceFloatingIPWithContext(context.Background(), addBareMetalServerNetworkInterfaceFloatingIPOptions) + result, response, err = vpc.AddBareMetalServerNetworkInterfaceFloatingIPWithContext(context.Background(), addBareMetalServerNetworkInterfaceFloatingIPOptions) + err = core.RepurposeSDKProblem(err, "") + return } // AddBareMetalServerNetworkInterfaceFloatingIPWithContext is an alternate form of the AddBareMetalServerNetworkInterfaceFloatingIP method which supports a Context parameter func (vpc *VpcV1) AddBareMetalServerNetworkInterfaceFloatingIPWithContext(ctx context.Context, addBareMetalServerNetworkInterfaceFloatingIPOptions *AddBareMetalServerNetworkInterfaceFloatingIPOptions) (result *FloatingIP, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(addBareMetalServerNetworkInterfaceFloatingIPOptions, "addBareMetalServerNetworkInterfaceFloatingIPOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(addBareMetalServerNetworkInterfaceFloatingIPOptions, "addBareMetalServerNetworkInterfaceFloatingIPOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -12431,6 +14187,7 @@ func (vpc *VpcV1) AddBareMetalServerNetworkInterfaceFloatingIPWithContext(ctx co builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/floating_ips/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -12449,17 +14206,21 @@ func (vpc *VpcV1) AddBareMetalServerNetworkInterfaceFloatingIPWithContext(ctx co request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "add_bare_metal_server_network_interface_floating_ip", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIP) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -12472,7 +14233,9 @@ func (vpc *VpcV1) AddBareMetalServerNetworkInterfaceFloatingIPWithContext(ctx co // This request lists the primary reserved IP for a bare metal server network interface. // Deprecated: this method is deprecated and may be removed in a future release. func (vpc *VpcV1) ListBareMetalServerNetworkInterfaceIps(listBareMetalServerNetworkInterfaceIpsOptions *ListBareMetalServerNetworkInterfaceIpsOptions) (result *ReservedIPCollectionBareMetalServerNetworkInterfaceContext, response *core.DetailedResponse, err error) { - return vpc.ListBareMetalServerNetworkInterfaceIpsWithContext(context.Background(), listBareMetalServerNetworkInterfaceIpsOptions) + result, response, err = vpc.ListBareMetalServerNetworkInterfaceIpsWithContext(context.Background(), listBareMetalServerNetworkInterfaceIpsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListBareMetalServerNetworkInterfaceIpsWithContext is an alternate form of the ListBareMetalServerNetworkInterfaceIps method which supports a Context parameter @@ -12481,10 +14244,12 @@ func (vpc *VpcV1) ListBareMetalServerNetworkInterfaceIpsWithContext(ctx context. core.GetLogger().Warn("A deprecated operation has been invoked: ListBareMetalServerNetworkInterfaceIps") err = core.ValidateNotNil(listBareMetalServerNetworkInterfaceIpsOptions, "listBareMetalServerNetworkInterfaceIpsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listBareMetalServerNetworkInterfaceIpsOptions, "listBareMetalServerNetworkInterfaceIpsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -12498,6 +14263,7 @@ func (vpc *VpcV1) ListBareMetalServerNetworkInterfaceIpsWithContext(ctx context. builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/ips`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -12516,17 +14282,21 @@ func (vpc *VpcV1) ListBareMetalServerNetworkInterfaceIpsWithContext(ctx context. request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_bare_metal_server_network_interface_ips", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIPCollectionBareMetalServerNetworkInterfaceContext) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -12539,7 +14309,9 @@ func (vpc *VpcV1) ListBareMetalServerNetworkInterfaceIpsWithContext(ctx context. // This request retrieves the primary reserved IP for a bare metal server network interface. // Deprecated: this method is deprecated and may be removed in a future release. func (vpc *VpcV1) GetBareMetalServerNetworkInterfaceIP(getBareMetalServerNetworkInterfaceIPOptions *GetBareMetalServerNetworkInterfaceIPOptions) (result *ReservedIP, response *core.DetailedResponse, err error) { - return vpc.GetBareMetalServerNetworkInterfaceIPWithContext(context.Background(), getBareMetalServerNetworkInterfaceIPOptions) + result, response, err = vpc.GetBareMetalServerNetworkInterfaceIPWithContext(context.Background(), getBareMetalServerNetworkInterfaceIPOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetBareMetalServerNetworkInterfaceIPWithContext is an alternate form of the GetBareMetalServerNetworkInterfaceIP method which supports a Context parameter @@ -12548,10 +14320,12 @@ func (vpc *VpcV1) GetBareMetalServerNetworkInterfaceIPWithContext(ctx context.Co core.GetLogger().Warn("A deprecated operation has been invoked: GetBareMetalServerNetworkInterfaceIP") err = core.ValidateNotNil(getBareMetalServerNetworkInterfaceIPOptions, "getBareMetalServerNetworkInterfaceIPOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getBareMetalServerNetworkInterfaceIPOptions, "getBareMetalServerNetworkInterfaceIPOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -12566,6 +14340,7 @@ func (vpc *VpcV1) GetBareMetalServerNetworkInterfaceIPWithContext(ctx context.Co builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/ips/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -12584,17 +14359,21 @@ func (vpc *VpcV1) GetBareMetalServerNetworkInterfaceIPWithContext(ctx context.Co request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_bare_metal_server_network_interface_ip", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIP) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -12607,17 +14386,21 @@ func (vpc *VpcV1) GetBareMetalServerNetworkInterfaceIPWithContext(ctx context.Co // This request deletes a bare metal server. This operation cannot be reversed. Any floating IPs associated with the // bare metal server network interfaces are implicitly disassociated. func (vpc *VpcV1) DeleteBareMetalServer(deleteBareMetalServerOptions *DeleteBareMetalServerOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteBareMetalServerWithContext(context.Background(), deleteBareMetalServerOptions) + response, err = vpc.DeleteBareMetalServerWithContext(context.Background(), deleteBareMetalServerOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteBareMetalServerWithContext is an alternate form of the DeleteBareMetalServer method which supports a Context parameter func (vpc *VpcV1) DeleteBareMetalServerWithContext(ctx context.Context, deleteBareMetalServerOptions *DeleteBareMetalServerOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteBareMetalServerOptions, "deleteBareMetalServerOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteBareMetalServerOptions, "deleteBareMetalServerOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -12630,6 +14413,7 @@ func (vpc *VpcV1) DeleteBareMetalServerWithContext(ctx context.Context, deleteBa builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -12647,10 +14431,16 @@ func (vpc *VpcV1) DeleteBareMetalServerWithContext(ctx context.Context, deleteBa request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_bare_metal_server", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -12658,17 +14448,21 @@ func (vpc *VpcV1) DeleteBareMetalServerWithContext(ctx context.Context, deleteBa // GetBareMetalServer : Retrieve a bare metal server // This request retrieves a single bare metal server specified by the identifier in the URL. func (vpc *VpcV1) GetBareMetalServer(getBareMetalServerOptions *GetBareMetalServerOptions) (result *BareMetalServer, response *core.DetailedResponse, err error) { - return vpc.GetBareMetalServerWithContext(context.Background(), getBareMetalServerOptions) + result, response, err = vpc.GetBareMetalServerWithContext(context.Background(), getBareMetalServerOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetBareMetalServerWithContext is an alternate form of the GetBareMetalServer method which supports a Context parameter func (vpc *VpcV1) GetBareMetalServerWithContext(ctx context.Context, getBareMetalServerOptions *GetBareMetalServerOptions) (result *BareMetalServer, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getBareMetalServerOptions, "getBareMetalServerOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getBareMetalServerOptions, "getBareMetalServerOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -12681,6 +14475,7 @@ func (vpc *VpcV1) GetBareMetalServerWithContext(ctx context.Context, getBareMeta builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -12699,17 +14494,21 @@ func (vpc *VpcV1) GetBareMetalServerWithContext(ctx context.Context, getBareMeta request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_bare_metal_server", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServer) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -12722,17 +14521,21 @@ func (vpc *VpcV1) GetBareMetalServerWithContext(ctx context.Context, getBareMeta // This request updates a bare metal server with the information in a provided patch. The bare metal server patch object // is structured in the same way as a retrieved bare metal server and contains only the information to be updated. func (vpc *VpcV1) UpdateBareMetalServer(updateBareMetalServerOptions *UpdateBareMetalServerOptions) (result *BareMetalServer, response *core.DetailedResponse, err error) { - return vpc.UpdateBareMetalServerWithContext(context.Background(), updateBareMetalServerOptions) + result, response, err = vpc.UpdateBareMetalServerWithContext(context.Background(), updateBareMetalServerOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateBareMetalServerWithContext is an alternate form of the UpdateBareMetalServer method which supports a Context parameter func (vpc *VpcV1) UpdateBareMetalServerWithContext(ctx context.Context, updateBareMetalServerOptions *UpdateBareMetalServerOptions) (result *BareMetalServer, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateBareMetalServerOptions, "updateBareMetalServerOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateBareMetalServerOptions, "updateBareMetalServerOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -12745,6 +14548,7 @@ func (vpc *VpcV1) UpdateBareMetalServerWithContext(ctx context.Context, updateBa builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -12764,22 +14568,27 @@ func (vpc *VpcV1) UpdateBareMetalServerWithContext(ctx context.Context, updateBa _, err = builder.SetBodyContentJSON(updateBareMetalServerOptions.BareMetalServerPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_bare_metal_server", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServer) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -12793,17 +14602,21 @@ func (vpc *VpcV1) UpdateBareMetalServerWithContext(ctx context.Context, updateBa // any configured usernames and passwords. These can subsequently be changed on the server and therefore may not be // current. func (vpc *VpcV1) GetBareMetalServerInitialization(getBareMetalServerInitializationOptions *GetBareMetalServerInitializationOptions) (result *BareMetalServerInitialization, response *core.DetailedResponse, err error) { - return vpc.GetBareMetalServerInitializationWithContext(context.Background(), getBareMetalServerInitializationOptions) + result, response, err = vpc.GetBareMetalServerInitializationWithContext(context.Background(), getBareMetalServerInitializationOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetBareMetalServerInitializationWithContext is an alternate form of the GetBareMetalServerInitialization method which supports a Context parameter func (vpc *VpcV1) GetBareMetalServerInitializationWithContext(ctx context.Context, getBareMetalServerInitializationOptions *GetBareMetalServerInitializationOptions) (result *BareMetalServerInitialization, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getBareMetalServerInitializationOptions, "getBareMetalServerInitializationOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getBareMetalServerInitializationOptions, "getBareMetalServerInitializationOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -12816,6 +14629,7 @@ func (vpc *VpcV1) GetBareMetalServerInitializationWithContext(ctx context.Contex builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{id}/initialization`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -12834,17 +14648,21 @@ func (vpc *VpcV1) GetBareMetalServerInitializationWithContext(ctx context.Contex request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_bare_metal_server_initialization", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServerInitialization) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -12856,17 +14674,21 @@ func (vpc *VpcV1) GetBareMetalServerInitializationWithContext(ctx context.Contex // RestartBareMetalServer : Restart a bare metal server // This request restarts a bare metal server. It will run immediately regardless of the state of the server. func (vpc *VpcV1) RestartBareMetalServer(restartBareMetalServerOptions *RestartBareMetalServerOptions) (response *core.DetailedResponse, err error) { - return vpc.RestartBareMetalServerWithContext(context.Background(), restartBareMetalServerOptions) + response, err = vpc.RestartBareMetalServerWithContext(context.Background(), restartBareMetalServerOptions) + err = core.RepurposeSDKProblem(err, "") + return } // RestartBareMetalServerWithContext is an alternate form of the RestartBareMetalServer method which supports a Context parameter func (vpc *VpcV1) RestartBareMetalServerWithContext(ctx context.Context, restartBareMetalServerOptions *RestartBareMetalServerOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(restartBareMetalServerOptions, "restartBareMetalServerOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(restartBareMetalServerOptions, "restartBareMetalServerOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -12879,6 +14701,7 @@ func (vpc *VpcV1) RestartBareMetalServerWithContext(ctx context.Context, restart builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{id}/restart`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -12896,10 +14719,16 @@ func (vpc *VpcV1) RestartBareMetalServerWithContext(ctx context.Context, restart request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "restart_bare_metal_server", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -12907,17 +14736,21 @@ func (vpc *VpcV1) RestartBareMetalServerWithContext(ctx context.Context, restart // StartBareMetalServer : Start a bare metal server // This request starts a bare metal server. It will run immediately provided the server is stopped. func (vpc *VpcV1) StartBareMetalServer(startBareMetalServerOptions *StartBareMetalServerOptions) (response *core.DetailedResponse, err error) { - return vpc.StartBareMetalServerWithContext(context.Background(), startBareMetalServerOptions) + response, err = vpc.StartBareMetalServerWithContext(context.Background(), startBareMetalServerOptions) + err = core.RepurposeSDKProblem(err, "") + return } // StartBareMetalServerWithContext is an alternate form of the StartBareMetalServer method which supports a Context parameter func (vpc *VpcV1) StartBareMetalServerWithContext(ctx context.Context, startBareMetalServerOptions *StartBareMetalServerOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(startBareMetalServerOptions, "startBareMetalServerOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(startBareMetalServerOptions, "startBareMetalServerOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -12930,6 +14763,7 @@ func (vpc *VpcV1) StartBareMetalServerWithContext(ctx context.Context, startBare builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{id}/start`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -12947,10 +14781,16 @@ func (vpc *VpcV1) StartBareMetalServerWithContext(ctx context.Context, startBare request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "start_bare_metal_server", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -12959,17 +14799,21 @@ func (vpc *VpcV1) StartBareMetalServerWithContext(ctx context.Context, startBare // This request stops a bare metal server. It will run immediately provided the server is running. Note: A soft stop may // not complete as it relies on the operating system to perform the operation. func (vpc *VpcV1) StopBareMetalServer(stopBareMetalServerOptions *StopBareMetalServerOptions) (response *core.DetailedResponse, err error) { - return vpc.StopBareMetalServerWithContext(context.Background(), stopBareMetalServerOptions) + response, err = vpc.StopBareMetalServerWithContext(context.Background(), stopBareMetalServerOptions) + err = core.RepurposeSDKProblem(err, "") + return } // StopBareMetalServerWithContext is an alternate form of the StopBareMetalServer method which supports a Context parameter func (vpc *VpcV1) StopBareMetalServerWithContext(ctx context.Context, stopBareMetalServerOptions *StopBareMetalServerOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(stopBareMetalServerOptions, "stopBareMetalServerOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(stopBareMetalServerOptions, "stopBareMetalServerOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -12982,6 +14826,7 @@ func (vpc *VpcV1) StopBareMetalServerWithContext(ctx context.Context, stopBareMe builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{id}/stop`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -13004,15 +14849,22 @@ func (vpc *VpcV1) StopBareMetalServerWithContext(ctx context.Context, stopBareMe } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "stop_bare_metal_server", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -13021,13 +14873,16 @@ func (vpc *VpcV1) StopBareMetalServerWithContext(ctx context.Context, stopBareMe // This request lists all [volume profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-block-storage-profiles) available // in the region. A volume profile specifies the performance characteristics and pricing model for a volume. func (vpc *VpcV1) ListVolumeProfiles(listVolumeProfilesOptions *ListVolumeProfilesOptions) (result *VolumeProfileCollection, response *core.DetailedResponse, err error) { - return vpc.ListVolumeProfilesWithContext(context.Background(), listVolumeProfilesOptions) + result, response, err = vpc.ListVolumeProfilesWithContext(context.Background(), listVolumeProfilesOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListVolumeProfilesWithContext is an alternate form of the ListVolumeProfiles method which supports a Context parameter func (vpc *VpcV1) ListVolumeProfilesWithContext(ctx context.Context, listVolumeProfilesOptions *ListVolumeProfilesOptions) (result *VolumeProfileCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listVolumeProfilesOptions, "listVolumeProfilesOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -13036,6 +14891,7 @@ func (vpc *VpcV1) ListVolumeProfilesWithContext(ctx context.Context, listVolumeP builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/volume/profiles`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -13060,17 +14916,21 @@ func (vpc *VpcV1) ListVolumeProfilesWithContext(ctx context.Context, listVolumeP request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_volume_profiles", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolumeProfileCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -13082,17 +14942,21 @@ func (vpc *VpcV1) ListVolumeProfilesWithContext(ctx context.Context, listVolumeP // GetVolumeProfile : Retrieve a volume profile // This request retrieves a single volume profile specified by the name in the URL. func (vpc *VpcV1) GetVolumeProfile(getVolumeProfileOptions *GetVolumeProfileOptions) (result *VolumeProfile, response *core.DetailedResponse, err error) { - return vpc.GetVolumeProfileWithContext(context.Background(), getVolumeProfileOptions) + result, response, err = vpc.GetVolumeProfileWithContext(context.Background(), getVolumeProfileOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetVolumeProfileWithContext is an alternate form of the GetVolumeProfile method which supports a Context parameter func (vpc *VpcV1) GetVolumeProfileWithContext(ctx context.Context, getVolumeProfileOptions *GetVolumeProfileOptions) (result *VolumeProfile, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getVolumeProfileOptions, "getVolumeProfileOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getVolumeProfileOptions, "getVolumeProfileOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -13105,6 +14969,7 @@ func (vpc *VpcV1) GetVolumeProfileWithContext(ctx context.Context, getVolumeProf builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/volume/profiles/{name}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -13123,17 +14988,21 @@ func (vpc *VpcV1) GetVolumeProfileWithContext(ctx context.Context, getVolumeProf request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_volume_profile", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolumeProfile) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -13146,13 +15015,16 @@ func (vpc *VpcV1) GetVolumeProfileWithContext(ctx context.Context, getVolumeProf // This request lists all volumes in the region. Volumes are network-connected block storage devices that may be // attached to one or more instances in the same region. func (vpc *VpcV1) ListVolumes(listVolumesOptions *ListVolumesOptions) (result *VolumeCollection, response *core.DetailedResponse, err error) { - return vpc.ListVolumesWithContext(context.Background(), listVolumesOptions) + result, response, err = vpc.ListVolumesWithContext(context.Background(), listVolumesOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListVolumesWithContext is an alternate form of the ListVolumes method which supports a Context parameter func (vpc *VpcV1) ListVolumesWithContext(ctx context.Context, listVolumesOptions *ListVolumesOptions) (result *VolumeCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listVolumesOptions, "listVolumesOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -13161,6 +15033,7 @@ func (vpc *VpcV1) ListVolumesWithContext(ctx context.Context, listVolumesOptions builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/volumes`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -13206,17 +15079,21 @@ func (vpc *VpcV1) ListVolumesWithContext(ctx context.Context, listVolumesOptions request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_volumes", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolumeCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -13229,17 +15106,21 @@ func (vpc *VpcV1) ListVolumesWithContext(ctx context.Context, listVolumesOptions // This request creates a new volume from a volume prototype object. The prototype object is structured in the same way // as a retrieved volume, and contains the information necessary to create the new volume. func (vpc *VpcV1) CreateVolume(createVolumeOptions *CreateVolumeOptions) (result *Volume, response *core.DetailedResponse, err error) { - return vpc.CreateVolumeWithContext(context.Background(), createVolumeOptions) + result, response, err = vpc.CreateVolumeWithContext(context.Background(), createVolumeOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateVolumeWithContext is an alternate form of the CreateVolume method which supports a Context parameter func (vpc *VpcV1) CreateVolumeWithContext(ctx context.Context, createVolumeOptions *CreateVolumeOptions) (result *Volume, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createVolumeOptions, "createVolumeOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createVolumeOptions, "createVolumeOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -13248,6 +15129,7 @@ func (vpc *VpcV1) CreateVolumeWithContext(ctx context.Context, createVolumeOptio builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/volumes`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -13267,22 +15149,27 @@ func (vpc *VpcV1) CreateVolumeWithContext(ctx context.Context, createVolumeOptio _, err = builder.SetBodyContentJSON(createVolumeOptions.VolumePrototype) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_volume", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolume) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -13295,17 +15182,21 @@ func (vpc *VpcV1) CreateVolumeWithContext(ctx context.Context, createVolumeOptio // This request deletes a volume. This operation cannot be reversed. For this request to succeed, the volume must not be // attached to any instances. func (vpc *VpcV1) DeleteVolume(deleteVolumeOptions *DeleteVolumeOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteVolumeWithContext(context.Background(), deleteVolumeOptions) + response, err = vpc.DeleteVolumeWithContext(context.Background(), deleteVolumeOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteVolumeWithContext is an alternate form of the DeleteVolume method which supports a Context parameter func (vpc *VpcV1) DeleteVolumeWithContext(ctx context.Context, deleteVolumeOptions *DeleteVolumeOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteVolumeOptions, "deleteVolumeOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteVolumeOptions, "deleteVolumeOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -13318,6 +15209,7 @@ func (vpc *VpcV1) DeleteVolumeWithContext(ctx context.Context, deleteVolumeOptio builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/volumes/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -13338,10 +15230,16 @@ func (vpc *VpcV1) DeleteVolumeWithContext(ctx context.Context, deleteVolumeOptio request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_volume", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -13349,17 +15247,21 @@ func (vpc *VpcV1) DeleteVolumeWithContext(ctx context.Context, deleteVolumeOptio // GetVolume : Retrieve a volume // This request retrieves a single volume specified by the identifier in the URL. func (vpc *VpcV1) GetVolume(getVolumeOptions *GetVolumeOptions) (result *Volume, response *core.DetailedResponse, err error) { - return vpc.GetVolumeWithContext(context.Background(), getVolumeOptions) + result, response, err = vpc.GetVolumeWithContext(context.Background(), getVolumeOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetVolumeWithContext is an alternate form of the GetVolume method which supports a Context parameter func (vpc *VpcV1) GetVolumeWithContext(ctx context.Context, getVolumeOptions *GetVolumeOptions) (result *Volume, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getVolumeOptions, "getVolumeOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getVolumeOptions, "getVolumeOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -13372,6 +15274,7 @@ func (vpc *VpcV1) GetVolumeWithContext(ctx context.Context, getVolumeOptions *Ge builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/volumes/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -13390,17 +15293,21 @@ func (vpc *VpcV1) GetVolumeWithContext(ctx context.Context, getVolumeOptions *Ge request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_volume", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolume) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -13413,17 +15320,21 @@ func (vpc *VpcV1) GetVolumeWithContext(ctx context.Context, getVolumeOptions *Ge // This request updates a volume with the information in a provided volume patch. The volume patch object is structured // in the same way as a retrieved volume and contains only the information to be updated. func (vpc *VpcV1) UpdateVolume(updateVolumeOptions *UpdateVolumeOptions) (result *Volume, response *core.DetailedResponse, err error) { - return vpc.UpdateVolumeWithContext(context.Background(), updateVolumeOptions) + result, response, err = vpc.UpdateVolumeWithContext(context.Background(), updateVolumeOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateVolumeWithContext is an alternate form of the UpdateVolume method which supports a Context parameter func (vpc *VpcV1) UpdateVolumeWithContext(ctx context.Context, updateVolumeOptions *UpdateVolumeOptions) (result *Volume, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateVolumeOptions, "updateVolumeOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateVolumeOptions, "updateVolumeOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -13436,6 +15347,7 @@ func (vpc *VpcV1) UpdateVolumeWithContext(ctx context.Context, updateVolumeOptio builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/volumes/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -13458,22 +15370,27 @@ func (vpc *VpcV1) UpdateVolumeWithContext(ctx context.Context, updateVolumeOptio _, err = builder.SetBodyContentJSON(updateVolumeOptions.VolumePatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_volume", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolume) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -13486,13 +15403,16 @@ func (vpc *VpcV1) UpdateVolumeWithContext(ctx context.Context, updateVolumeOptio // This request lists all snapshot consistency groups in the region. A snapshot consistency group is a collection of // individual snapshots taken at the same time. func (vpc *VpcV1) ListSnapshotConsistencyGroups(listSnapshotConsistencyGroupsOptions *ListSnapshotConsistencyGroupsOptions) (result *SnapshotConsistencyGroupCollection, response *core.DetailedResponse, err error) { - return vpc.ListSnapshotConsistencyGroupsWithContext(context.Background(), listSnapshotConsistencyGroupsOptions) + result, response, err = vpc.ListSnapshotConsistencyGroupsWithContext(context.Background(), listSnapshotConsistencyGroupsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListSnapshotConsistencyGroupsWithContext is an alternate form of the ListSnapshotConsistencyGroups method which supports a Context parameter func (vpc *VpcV1) ListSnapshotConsistencyGroupsWithContext(ctx context.Context, listSnapshotConsistencyGroupsOptions *ListSnapshotConsistencyGroupsOptions) (result *SnapshotConsistencyGroupCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listSnapshotConsistencyGroupsOptions, "listSnapshotConsistencyGroupsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -13501,6 +15421,7 @@ func (vpc *VpcV1) ListSnapshotConsistencyGroupsWithContext(ctx context.Context, builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/snapshot_consistency_groups`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -13537,17 +15458,21 @@ func (vpc *VpcV1) ListSnapshotConsistencyGroupsWithContext(ctx context.Context, request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_snapshot_consistency_groups", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSnapshotConsistencyGroupCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -13561,17 +15486,21 @@ func (vpc *VpcV1) ListSnapshotConsistencyGroupsWithContext(ctx context.Context, // is structured in the same way as a retrieved consistency group, and contains the information necessary to provision // the new snapshot consistency group. func (vpc *VpcV1) CreateSnapshotConsistencyGroup(createSnapshotConsistencyGroupOptions *CreateSnapshotConsistencyGroupOptions) (result *SnapshotConsistencyGroup, response *core.DetailedResponse, err error) { - return vpc.CreateSnapshotConsistencyGroupWithContext(context.Background(), createSnapshotConsistencyGroupOptions) + result, response, err = vpc.CreateSnapshotConsistencyGroupWithContext(context.Background(), createSnapshotConsistencyGroupOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateSnapshotConsistencyGroupWithContext is an alternate form of the CreateSnapshotConsistencyGroup method which supports a Context parameter func (vpc *VpcV1) CreateSnapshotConsistencyGroupWithContext(ctx context.Context, createSnapshotConsistencyGroupOptions *CreateSnapshotConsistencyGroupOptions) (result *SnapshotConsistencyGroup, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createSnapshotConsistencyGroupOptions, "createSnapshotConsistencyGroupOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createSnapshotConsistencyGroupOptions, "createSnapshotConsistencyGroupOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -13580,6 +15509,7 @@ func (vpc *VpcV1) CreateSnapshotConsistencyGroupWithContext(ctx context.Context, builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/snapshot_consistency_groups`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -13599,22 +15529,27 @@ func (vpc *VpcV1) CreateSnapshotConsistencyGroupWithContext(ctx context.Context, _, err = builder.SetBodyContentJSON(createSnapshotConsistencyGroupOptions.SnapshotConsistencyGroupPrototype) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_snapshot_consistency_group", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSnapshotConsistencyGroup) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -13627,17 +15562,21 @@ func (vpc *VpcV1) CreateSnapshotConsistencyGroupWithContext(ctx context.Context, // This request deletes snapshot consistency group. This operation cannot be reversed. If the // `delete_snapshots_on_delete` property is `true`, all snapshots in the consistency group will also be deleted. func (vpc *VpcV1) DeleteSnapshotConsistencyGroup(deleteSnapshotConsistencyGroupOptions *DeleteSnapshotConsistencyGroupOptions) (result *SnapshotConsistencyGroup, response *core.DetailedResponse, err error) { - return vpc.DeleteSnapshotConsistencyGroupWithContext(context.Background(), deleteSnapshotConsistencyGroupOptions) + result, response, err = vpc.DeleteSnapshotConsistencyGroupWithContext(context.Background(), deleteSnapshotConsistencyGroupOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteSnapshotConsistencyGroupWithContext is an alternate form of the DeleteSnapshotConsistencyGroup method which supports a Context parameter func (vpc *VpcV1) DeleteSnapshotConsistencyGroupWithContext(ctx context.Context, deleteSnapshotConsistencyGroupOptions *DeleteSnapshotConsistencyGroupOptions) (result *SnapshotConsistencyGroup, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteSnapshotConsistencyGroupOptions, "deleteSnapshotConsistencyGroupOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteSnapshotConsistencyGroupOptions, "deleteSnapshotConsistencyGroupOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -13650,6 +15589,7 @@ func (vpc *VpcV1) DeleteSnapshotConsistencyGroupWithContext(ctx context.Context, builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/snapshot_consistency_groups/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -13668,17 +15608,21 @@ func (vpc *VpcV1) DeleteSnapshotConsistencyGroupWithContext(ctx context.Context, request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "delete_snapshot_consistency_group", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSnapshotConsistencyGroup) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -13690,17 +15634,21 @@ func (vpc *VpcV1) DeleteSnapshotConsistencyGroupWithContext(ctx context.Context, // GetSnapshotConsistencyGroup : Retrieve a snapshot consistency group // This request retrieves a single snapshot consistency group specified by the identifier in the URL. func (vpc *VpcV1) GetSnapshotConsistencyGroup(getSnapshotConsistencyGroupOptions *GetSnapshotConsistencyGroupOptions) (result *SnapshotConsistencyGroup, response *core.DetailedResponse, err error) { - return vpc.GetSnapshotConsistencyGroupWithContext(context.Background(), getSnapshotConsistencyGroupOptions) + result, response, err = vpc.GetSnapshotConsistencyGroupWithContext(context.Background(), getSnapshotConsistencyGroupOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetSnapshotConsistencyGroupWithContext is an alternate form of the GetSnapshotConsistencyGroup method which supports a Context parameter func (vpc *VpcV1) GetSnapshotConsistencyGroupWithContext(ctx context.Context, getSnapshotConsistencyGroupOptions *GetSnapshotConsistencyGroupOptions) (result *SnapshotConsistencyGroup, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getSnapshotConsistencyGroupOptions, "getSnapshotConsistencyGroupOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getSnapshotConsistencyGroupOptions, "getSnapshotConsistencyGroupOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -13713,6 +15661,7 @@ func (vpc *VpcV1) GetSnapshotConsistencyGroupWithContext(ctx context.Context, ge builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/snapshot_consistency_groups/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -13731,17 +15680,21 @@ func (vpc *VpcV1) GetSnapshotConsistencyGroupWithContext(ctx context.Context, ge request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_snapshot_consistency_group", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSnapshotConsistencyGroup) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -13755,17 +15708,21 @@ func (vpc *VpcV1) GetSnapshotConsistencyGroupWithContext(ctx context.Context, ge // patch. The snapshot consistency group patch object is structured in the same way as a retrieved snapshot consistency // group and contains only the information to be updated. func (vpc *VpcV1) UpdateSnapshotConsistencyGroup(updateSnapshotConsistencyGroupOptions *UpdateSnapshotConsistencyGroupOptions) (result *SnapshotConsistencyGroup, response *core.DetailedResponse, err error) { - return vpc.UpdateSnapshotConsistencyGroupWithContext(context.Background(), updateSnapshotConsistencyGroupOptions) + result, response, err = vpc.UpdateSnapshotConsistencyGroupWithContext(context.Background(), updateSnapshotConsistencyGroupOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateSnapshotConsistencyGroupWithContext is an alternate form of the UpdateSnapshotConsistencyGroup method which supports a Context parameter func (vpc *VpcV1) UpdateSnapshotConsistencyGroupWithContext(ctx context.Context, updateSnapshotConsistencyGroupOptions *UpdateSnapshotConsistencyGroupOptions) (result *SnapshotConsistencyGroup, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateSnapshotConsistencyGroupOptions, "updateSnapshotConsistencyGroupOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateSnapshotConsistencyGroupOptions, "updateSnapshotConsistencyGroupOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -13778,6 +15735,7 @@ func (vpc *VpcV1) UpdateSnapshotConsistencyGroupWithContext(ctx context.Context, builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/snapshot_consistency_groups/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -13800,22 +15758,27 @@ func (vpc *VpcV1) UpdateSnapshotConsistencyGroupWithContext(ctx context.Context, _, err = builder.SetBodyContentJSON(updateSnapshotConsistencyGroupOptions.SnapshotConsistencyGroupPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_snapshot_consistency_group", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSnapshotConsistencyGroup) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -13827,17 +15790,21 @@ func (vpc *VpcV1) UpdateSnapshotConsistencyGroupWithContext(ctx context.Context, // DeleteSnapshots : Delete a filtered collection of snapshots // This request deletes all snapshots created from a specific source volume. func (vpc *VpcV1) DeleteSnapshots(deleteSnapshotsOptions *DeleteSnapshotsOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteSnapshotsWithContext(context.Background(), deleteSnapshotsOptions) + response, err = vpc.DeleteSnapshotsWithContext(context.Background(), deleteSnapshotsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteSnapshotsWithContext is an alternate form of the DeleteSnapshots method which supports a Context parameter func (vpc *VpcV1) DeleteSnapshotsWithContext(ctx context.Context, deleteSnapshotsOptions *DeleteSnapshotsOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteSnapshotsOptions, "deleteSnapshotsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteSnapshotsOptions, "deleteSnapshotsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -13846,6 +15813,7 @@ func (vpc *VpcV1) DeleteSnapshotsWithContext(ctx context.Context, deleteSnapshot builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/snapshots`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -13864,10 +15832,16 @@ func (vpc *VpcV1) DeleteSnapshotsWithContext(ctx context.Context, deleteSnapshot request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_snapshots", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -13876,13 +15850,16 @@ func (vpc *VpcV1) DeleteSnapshotsWithContext(ctx context.Context, deleteSnapshot // This request lists all snapshots in the region. A snapshot preserves the data of a volume at the time the snapshot is // created. func (vpc *VpcV1) ListSnapshots(listSnapshotsOptions *ListSnapshotsOptions) (result *SnapshotCollection, response *core.DetailedResponse, err error) { - return vpc.ListSnapshotsWithContext(context.Background(), listSnapshotsOptions) + result, response, err = vpc.ListSnapshotsWithContext(context.Background(), listSnapshotsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListSnapshotsWithContext is an alternate form of the ListSnapshots method which supports a Context parameter func (vpc *VpcV1) ListSnapshotsWithContext(ctx context.Context, listSnapshotsOptions *ListSnapshotsOptions) (result *SnapshotCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listSnapshotsOptions, "listSnapshotsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -13891,6 +15868,7 @@ func (vpc *VpcV1) ListSnapshotsWithContext(ctx context.Context, listSnapshotsOpt builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/snapshots`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -13975,17 +15953,21 @@ func (vpc *VpcV1) ListSnapshotsWithContext(ctx context.Context, listSnapshotsOpt request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_snapshots", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSnapshotCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -13998,17 +15980,21 @@ func (vpc *VpcV1) ListSnapshotsWithContext(ctx context.Context, listSnapshotsOpt // This request creates a new snapshot from a snapshot prototype object. The prototype object is structured in the same // way as a retrieved snapshot, and contains the information necessary to provision the new snapshot. func (vpc *VpcV1) CreateSnapshot(createSnapshotOptions *CreateSnapshotOptions) (result *Snapshot, response *core.DetailedResponse, err error) { - return vpc.CreateSnapshotWithContext(context.Background(), createSnapshotOptions) + result, response, err = vpc.CreateSnapshotWithContext(context.Background(), createSnapshotOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateSnapshotWithContext is an alternate form of the CreateSnapshot method which supports a Context parameter func (vpc *VpcV1) CreateSnapshotWithContext(ctx context.Context, createSnapshotOptions *CreateSnapshotOptions) (result *Snapshot, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createSnapshotOptions, "createSnapshotOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createSnapshotOptions, "createSnapshotOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -14017,6 +16003,7 @@ func (vpc *VpcV1) CreateSnapshotWithContext(ctx context.Context, createSnapshotO builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/snapshots`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -14036,22 +16023,27 @@ func (vpc *VpcV1) CreateSnapshotWithContext(ctx context.Context, createSnapshotO _, err = builder.SetBodyContentJSON(createSnapshotOptions.SnapshotPrototype) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_snapshot", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSnapshot) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -14063,17 +16055,21 @@ func (vpc *VpcV1) CreateSnapshotWithContext(ctx context.Context, createSnapshotO // DeleteSnapshot : Delete a snapshot // This request deletes a snapshot. This operation cannot be reversed. func (vpc *VpcV1) DeleteSnapshot(deleteSnapshotOptions *DeleteSnapshotOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteSnapshotWithContext(context.Background(), deleteSnapshotOptions) + response, err = vpc.DeleteSnapshotWithContext(context.Background(), deleteSnapshotOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteSnapshotWithContext is an alternate form of the DeleteSnapshot method which supports a Context parameter func (vpc *VpcV1) DeleteSnapshotWithContext(ctx context.Context, deleteSnapshotOptions *DeleteSnapshotOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteSnapshotOptions, "deleteSnapshotOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteSnapshotOptions, "deleteSnapshotOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -14086,6 +16082,7 @@ func (vpc *VpcV1) DeleteSnapshotWithContext(ctx context.Context, deleteSnapshotO builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/snapshots/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -14106,10 +16103,16 @@ func (vpc *VpcV1) DeleteSnapshotWithContext(ctx context.Context, deleteSnapshotO request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_snapshot", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -14117,17 +16120,21 @@ func (vpc *VpcV1) DeleteSnapshotWithContext(ctx context.Context, deleteSnapshotO // GetSnapshot : Retrieve a snapshot // This request retrieves a single snapshot specified by the identifier in the URL. func (vpc *VpcV1) GetSnapshot(getSnapshotOptions *GetSnapshotOptions) (result *Snapshot, response *core.DetailedResponse, err error) { - return vpc.GetSnapshotWithContext(context.Background(), getSnapshotOptions) + result, response, err = vpc.GetSnapshotWithContext(context.Background(), getSnapshotOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetSnapshotWithContext is an alternate form of the GetSnapshot method which supports a Context parameter func (vpc *VpcV1) GetSnapshotWithContext(ctx context.Context, getSnapshotOptions *GetSnapshotOptions) (result *Snapshot, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getSnapshotOptions, "getSnapshotOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getSnapshotOptions, "getSnapshotOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -14140,6 +16147,7 @@ func (vpc *VpcV1) GetSnapshotWithContext(ctx context.Context, getSnapshotOptions builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/snapshots/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -14158,17 +16166,21 @@ func (vpc *VpcV1) GetSnapshotWithContext(ctx context.Context, getSnapshotOptions request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_snapshot", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSnapshot) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -14181,17 +16193,21 @@ func (vpc *VpcV1) GetSnapshotWithContext(ctx context.Context, getSnapshotOptions // This request updates a snapshot with the information in a provided snapshot patch. The snapshot consistency group // patch object is structured in the same way as a retrieved snapshot and contains only the information to be updated. func (vpc *VpcV1) UpdateSnapshot(updateSnapshotOptions *UpdateSnapshotOptions) (result *Snapshot, response *core.DetailedResponse, err error) { - return vpc.UpdateSnapshotWithContext(context.Background(), updateSnapshotOptions) + result, response, err = vpc.UpdateSnapshotWithContext(context.Background(), updateSnapshotOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateSnapshotWithContext is an alternate form of the UpdateSnapshot method which supports a Context parameter func (vpc *VpcV1) UpdateSnapshotWithContext(ctx context.Context, updateSnapshotOptions *UpdateSnapshotOptions) (result *Snapshot, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateSnapshotOptions, "updateSnapshotOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateSnapshotOptions, "updateSnapshotOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -14204,6 +16220,7 @@ func (vpc *VpcV1) UpdateSnapshotWithContext(ctx context.Context, updateSnapshotO builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/snapshots/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -14226,22 +16243,27 @@ func (vpc *VpcV1) UpdateSnapshotWithContext(ctx context.Context, updateSnapshotO _, err = builder.SetBodyContentJSON(updateSnapshotOptions.SnapshotPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_snapshot", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSnapshot) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -14253,17 +16275,21 @@ func (vpc *VpcV1) UpdateSnapshotWithContext(ctx context.Context, updateSnapshotO // ListSnapshotClones : List all clones for a snapshot // This request lists all clones for a snapshot. Use a clone to quickly restore a snapshot within the clone's zone. func (vpc *VpcV1) ListSnapshotClones(listSnapshotClonesOptions *ListSnapshotClonesOptions) (result *SnapshotCloneCollection, response *core.DetailedResponse, err error) { - return vpc.ListSnapshotClonesWithContext(context.Background(), listSnapshotClonesOptions) + result, response, err = vpc.ListSnapshotClonesWithContext(context.Background(), listSnapshotClonesOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListSnapshotClonesWithContext is an alternate form of the ListSnapshotClones method which supports a Context parameter func (vpc *VpcV1) ListSnapshotClonesWithContext(ctx context.Context, listSnapshotClonesOptions *ListSnapshotClonesOptions) (result *SnapshotCloneCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listSnapshotClonesOptions, "listSnapshotClonesOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listSnapshotClonesOptions, "listSnapshotClonesOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -14276,6 +16302,7 @@ func (vpc *VpcV1) ListSnapshotClonesWithContext(ctx context.Context, listSnapsho builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/snapshots/{id}/clones`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -14294,17 +16321,21 @@ func (vpc *VpcV1) ListSnapshotClonesWithContext(ctx context.Context, listSnapsho request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_snapshot_clones", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSnapshotCloneCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -14317,17 +16348,21 @@ func (vpc *VpcV1) ListSnapshotClonesWithContext(ctx context.Context, listSnapsho // This request deletes a snapshot clone. This operation cannot be reversed, but an equivalent clone may be recreated // from the snapshot. func (vpc *VpcV1) DeleteSnapshotClone(deleteSnapshotCloneOptions *DeleteSnapshotCloneOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteSnapshotCloneWithContext(context.Background(), deleteSnapshotCloneOptions) + response, err = vpc.DeleteSnapshotCloneWithContext(context.Background(), deleteSnapshotCloneOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteSnapshotCloneWithContext is an alternate form of the DeleteSnapshotClone method which supports a Context parameter func (vpc *VpcV1) DeleteSnapshotCloneWithContext(ctx context.Context, deleteSnapshotCloneOptions *DeleteSnapshotCloneOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteSnapshotCloneOptions, "deleteSnapshotCloneOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteSnapshotCloneOptions, "deleteSnapshotCloneOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -14341,6 +16376,7 @@ func (vpc *VpcV1) DeleteSnapshotCloneWithContext(ctx context.Context, deleteSnap builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/snapshots/{id}/clones/{zone_name}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -14358,10 +16394,16 @@ func (vpc *VpcV1) DeleteSnapshotCloneWithContext(ctx context.Context, deleteSnap request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_snapshot_clone", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -14369,17 +16411,21 @@ func (vpc *VpcV1) DeleteSnapshotCloneWithContext(ctx context.Context, deleteSnap // GetSnapshotClone : Retrieve a snapshot clone // This request retrieves a single clone specified by the snapshot identifier and zone name in the URL. func (vpc *VpcV1) GetSnapshotClone(getSnapshotCloneOptions *GetSnapshotCloneOptions) (result *SnapshotClone, response *core.DetailedResponse, err error) { - return vpc.GetSnapshotCloneWithContext(context.Background(), getSnapshotCloneOptions) + result, response, err = vpc.GetSnapshotCloneWithContext(context.Background(), getSnapshotCloneOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetSnapshotCloneWithContext is an alternate form of the GetSnapshotClone method which supports a Context parameter func (vpc *VpcV1) GetSnapshotCloneWithContext(ctx context.Context, getSnapshotCloneOptions *GetSnapshotCloneOptions) (result *SnapshotClone, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getSnapshotCloneOptions, "getSnapshotCloneOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getSnapshotCloneOptions, "getSnapshotCloneOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -14393,6 +16439,7 @@ func (vpc *VpcV1) GetSnapshotCloneWithContext(ctx context.Context, getSnapshotCl builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/snapshots/{id}/clones/{zone_name}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -14411,17 +16458,21 @@ func (vpc *VpcV1) GetSnapshotCloneWithContext(ctx context.Context, getSnapshotCl request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_snapshot_clone", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSnapshotClone) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -14434,17 +16485,21 @@ func (vpc *VpcV1) GetSnapshotCloneWithContext(ctx context.Context, getSnapshotCl // This request creates a new clone for a snapshot in the specified zone. A request body is not required, and if // provided, is ignored. If the snapshot already has a clone in the zone, it is returned. func (vpc *VpcV1) CreateSnapshotClone(createSnapshotCloneOptions *CreateSnapshotCloneOptions) (result *SnapshotClone, response *core.DetailedResponse, err error) { - return vpc.CreateSnapshotCloneWithContext(context.Background(), createSnapshotCloneOptions) + result, response, err = vpc.CreateSnapshotCloneWithContext(context.Background(), createSnapshotCloneOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateSnapshotCloneWithContext is an alternate form of the CreateSnapshotClone method which supports a Context parameter func (vpc *VpcV1) CreateSnapshotCloneWithContext(ctx context.Context, createSnapshotCloneOptions *CreateSnapshotCloneOptions) (result *SnapshotClone, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createSnapshotCloneOptions, "createSnapshotCloneOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createSnapshotCloneOptions, "createSnapshotCloneOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -14458,6 +16513,7 @@ func (vpc *VpcV1) CreateSnapshotCloneWithContext(ctx context.Context, createSnap builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/snapshots/{id}/clones/{zone_name}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -14476,17 +16532,21 @@ func (vpc *VpcV1) CreateSnapshotCloneWithContext(ctx context.Context, createSnap request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_snapshot_clone", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSnapshotClone) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -14500,13 +16560,16 @@ func (vpc *VpcV1) CreateSnapshotCloneWithContext(ctx context.Context, createSnap // available in the region. A file share profile specifies the performance characteristics and pricing model for a file // share. func (vpc *VpcV1) ListShareProfiles(listShareProfilesOptions *ListShareProfilesOptions) (result *ShareProfileCollection, response *core.DetailedResponse, err error) { - return vpc.ListShareProfilesWithContext(context.Background(), listShareProfilesOptions) + result, response, err = vpc.ListShareProfilesWithContext(context.Background(), listShareProfilesOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListShareProfilesWithContext is an alternate form of the ListShareProfiles method which supports a Context parameter func (vpc *VpcV1) ListShareProfilesWithContext(ctx context.Context, listShareProfilesOptions *ListShareProfilesOptions) (result *ShareProfileCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listShareProfilesOptions, "listShareProfilesOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -14515,6 +16578,7 @@ func (vpc *VpcV1) ListShareProfilesWithContext(ctx context.Context, listSharePro builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/share/profiles`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -14542,17 +16606,21 @@ func (vpc *VpcV1) ListShareProfilesWithContext(ctx context.Context, listSharePro request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_share_profiles", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalShareProfileCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -14564,17 +16632,21 @@ func (vpc *VpcV1) ListShareProfilesWithContext(ctx context.Context, listSharePro // GetShareProfile : Retrieve a file share profile // This request retrieves a single file share profile specified by the name in the URL. func (vpc *VpcV1) GetShareProfile(getShareProfileOptions *GetShareProfileOptions) (result *ShareProfile, response *core.DetailedResponse, err error) { - return vpc.GetShareProfileWithContext(context.Background(), getShareProfileOptions) + result, response, err = vpc.GetShareProfileWithContext(context.Background(), getShareProfileOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetShareProfileWithContext is an alternate form of the GetShareProfile method which supports a Context parameter func (vpc *VpcV1) GetShareProfileWithContext(ctx context.Context, getShareProfileOptions *GetShareProfileOptions) (result *ShareProfile, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getShareProfileOptions, "getShareProfileOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getShareProfileOptions, "getShareProfileOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -14587,6 +16659,7 @@ func (vpc *VpcV1) GetShareProfileWithContext(ctx context.Context, getShareProfil builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/share/profiles/{name}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -14605,17 +16678,21 @@ func (vpc *VpcV1) GetShareProfileWithContext(ctx context.Context, getShareProfil request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_share_profile", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalShareProfile) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -14627,13 +16704,16 @@ func (vpc *VpcV1) GetShareProfileWithContext(ctx context.Context, getShareProfil // ListShares : List all file shares // This request lists all file shares in the region. func (vpc *VpcV1) ListShares(listSharesOptions *ListSharesOptions) (result *ShareCollection, response *core.DetailedResponse, err error) { - return vpc.ListSharesWithContext(context.Background(), listSharesOptions) + result, response, err = vpc.ListSharesWithContext(context.Background(), listSharesOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListSharesWithContext is an alternate form of the ListShares method which supports a Context parameter func (vpc *VpcV1) ListSharesWithContext(ctx context.Context, listSharesOptions *ListSharesOptions) (result *ShareCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listSharesOptions, "listSharesOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -14642,6 +16722,7 @@ func (vpc *VpcV1) ListSharesWithContext(ctx context.Context, listSharesOptions * builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/shares`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -14678,17 +16759,21 @@ func (vpc *VpcV1) ListSharesWithContext(ctx context.Context, listSharesOptions * request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_shares", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalShareCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -14704,17 +16789,21 @@ func (vpc *VpcV1) ListSharesWithContext(ctx context.Context, listSharesOptions * // The prototype object is structured in the same way as a retrieved share, and contains the information necessary to // provision the new file shares. func (vpc *VpcV1) CreateShare(createShareOptions *CreateShareOptions) (result *Share, response *core.DetailedResponse, err error) { - return vpc.CreateShareWithContext(context.Background(), createShareOptions) + result, response, err = vpc.CreateShareWithContext(context.Background(), createShareOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateShareWithContext is an alternate form of the CreateShare method which supports a Context parameter func (vpc *VpcV1) CreateShareWithContext(ctx context.Context, createShareOptions *CreateShareOptions) (result *Share, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createShareOptions, "createShareOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createShareOptions, "createShareOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -14723,6 +16812,7 @@ func (vpc *VpcV1) CreateShareWithContext(ctx context.Context, createShareOptions builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/shares`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -14742,22 +16832,27 @@ func (vpc *VpcV1) CreateShareWithContext(ctx context.Context, createShareOptions _, err = builder.SetBodyContentJSON(createShareOptions.SharePrototype) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_share", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalShare) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -14775,17 +16870,21 @@ func (vpc *VpcV1) CreateShareWithContext(ctx context.Context, createShareOptions // If the request is accepted, the share `lifecycle_state` will be set to `deleting`. Once deletion processing // completes, it will no longer be retrievable. func (vpc *VpcV1) DeleteShare(deleteShareOptions *DeleteShareOptions) (result *Share, response *core.DetailedResponse, err error) { - return vpc.DeleteShareWithContext(context.Background(), deleteShareOptions) + result, response, err = vpc.DeleteShareWithContext(context.Background(), deleteShareOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteShareWithContext is an alternate form of the DeleteShare method which supports a Context parameter func (vpc *VpcV1) DeleteShareWithContext(ctx context.Context, deleteShareOptions *DeleteShareOptions) (result *Share, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteShareOptions, "deleteShareOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteShareOptions, "deleteShareOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -14798,6 +16897,7 @@ func (vpc *VpcV1) DeleteShareWithContext(ctx context.Context, deleteShareOptions builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/shares/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -14819,17 +16919,21 @@ func (vpc *VpcV1) DeleteShareWithContext(ctx context.Context, deleteShareOptions request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "delete_share", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalShare) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -14841,17 +16945,21 @@ func (vpc *VpcV1) DeleteShareWithContext(ctx context.Context, deleteShareOptions // GetShare : Retrieve a file share // This request retrieves a single file share specified by the identifier in the URL. func (vpc *VpcV1) GetShare(getShareOptions *GetShareOptions) (result *Share, response *core.DetailedResponse, err error) { - return vpc.GetShareWithContext(context.Background(), getShareOptions) + result, response, err = vpc.GetShareWithContext(context.Background(), getShareOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetShareWithContext is an alternate form of the GetShare method which supports a Context parameter func (vpc *VpcV1) GetShareWithContext(ctx context.Context, getShareOptions *GetShareOptions) (result *Share, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getShareOptions, "getShareOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getShareOptions, "getShareOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -14864,6 +16972,7 @@ func (vpc *VpcV1) GetShareWithContext(ctx context.Context, getShareOptions *GetS builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/shares/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -14882,17 +16991,21 @@ func (vpc *VpcV1) GetShareWithContext(ctx context.Context, getShareOptions *GetS request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_share", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalShare) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -14905,17 +17018,21 @@ func (vpc *VpcV1) GetShareWithContext(ctx context.Context, getShareOptions *GetS // This request updates a share with the information in a provided share patch. The share patch object is structured in // the same way as a retrieved share and contains only the information to be updated. func (vpc *VpcV1) UpdateShare(updateShareOptions *UpdateShareOptions) (result *Share, response *core.DetailedResponse, err error) { - return vpc.UpdateShareWithContext(context.Background(), updateShareOptions) + result, response, err = vpc.UpdateShareWithContext(context.Background(), updateShareOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateShareWithContext is an alternate form of the UpdateShare method which supports a Context parameter func (vpc *VpcV1) UpdateShareWithContext(ctx context.Context, updateShareOptions *UpdateShareOptions) (result *Share, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateShareOptions, "updateShareOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateShareOptions, "updateShareOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -14928,6 +17045,7 @@ func (vpc *VpcV1) UpdateShareWithContext(ctx context.Context, updateShareOptions builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/shares/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -14950,22 +17068,27 @@ func (vpc *VpcV1) UpdateShareWithContext(ctx context.Context, updateShareOptions _, err = builder.SetBodyContentJSON(updateShareOptions.SharePatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_share", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalShare) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -14982,17 +17105,21 @@ func (vpc *VpcV1) UpdateShareWithContext(ctx context.Context, updateShareOptions // If `fallback_policy` is specified as `split`, and the request is accepted but the failover operation cannot be // performed, a split will be triggered. func (vpc *VpcV1) FailoverShare(failoverShareOptions *FailoverShareOptions) (response *core.DetailedResponse, err error) { - return vpc.FailoverShareWithContext(context.Background(), failoverShareOptions) + response, err = vpc.FailoverShareWithContext(context.Background(), failoverShareOptions) + err = core.RepurposeSDKProblem(err, "") + return } // FailoverShareWithContext is an alternate form of the FailoverShare method which supports a Context parameter func (vpc *VpcV1) FailoverShareWithContext(ctx context.Context, failoverShareOptions *FailoverShareOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(failoverShareOptions, "failoverShareOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(failoverShareOptions, "failoverShareOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -15005,6 +17132,7 @@ func (vpc *VpcV1) FailoverShareWithContext(ctx context.Context, failoverShareOpt builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/shares/{share_id}/failover`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -15030,15 +17158,22 @@ func (vpc *VpcV1) FailoverShareWithContext(ctx context.Context, failoverShareOpt } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "failover_share", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -15050,17 +17185,21 @@ func (vpc *VpcV1) FailoverShareWithContext(ctx context.Context, failoverShareOpt // // The share mount targets will be sorted by their `created_at` property values, with newest targets first. func (vpc *VpcV1) ListShareMountTargets(listShareMountTargetsOptions *ListShareMountTargetsOptions) (result *ShareMountTargetCollection, response *core.DetailedResponse, err error) { - return vpc.ListShareMountTargetsWithContext(context.Background(), listShareMountTargetsOptions) + result, response, err = vpc.ListShareMountTargetsWithContext(context.Background(), listShareMountTargetsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListShareMountTargetsWithContext is an alternate form of the ListShareMountTargets method which supports a Context parameter func (vpc *VpcV1) ListShareMountTargetsWithContext(ctx context.Context, listShareMountTargetsOptions *ListShareMountTargetsOptions) (result *ShareMountTargetCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listShareMountTargetsOptions, "listShareMountTargetsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listShareMountTargetsOptions, "listShareMountTargetsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -15073,6 +17212,7 @@ func (vpc *VpcV1) ListShareMountTargetsWithContext(ctx context.Context, listShar builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/shares/{share_id}/mount_targets`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -15100,17 +17240,21 @@ func (vpc *VpcV1) ListShareMountTargetsWithContext(ctx context.Context, listShar request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_share_mount_targets", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalShareMountTargetCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -15125,17 +17269,21 @@ func (vpc *VpcV1) ListShareMountTargetsWithContext(ctx context.Context, listShar // The prototype object is structured in the same way as a retrieved share mount target, and contains the information // necessary to provision the new file share mount target. func (vpc *VpcV1) CreateShareMountTarget(createShareMountTargetOptions *CreateShareMountTargetOptions) (result *ShareMountTarget, response *core.DetailedResponse, err error) { - return vpc.CreateShareMountTargetWithContext(context.Background(), createShareMountTargetOptions) + result, response, err = vpc.CreateShareMountTargetWithContext(context.Background(), createShareMountTargetOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateShareMountTargetWithContext is an alternate form of the CreateShareMountTarget method which supports a Context parameter func (vpc *VpcV1) CreateShareMountTargetWithContext(ctx context.Context, createShareMountTargetOptions *CreateShareMountTargetOptions) (result *ShareMountTarget, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createShareMountTargetOptions, "createShareMountTargetOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createShareMountTargetOptions, "createShareMountTargetOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -15148,6 +17296,7 @@ func (vpc *VpcV1) CreateShareMountTargetWithContext(ctx context.Context, createS builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/shares/{share_id}/mount_targets`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -15167,22 +17316,27 @@ func (vpc *VpcV1) CreateShareMountTargetWithContext(ctx context.Context, createS _, err = builder.SetBodyContentJSON(createShareMountTargetOptions.ShareMountTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_share_mount_target", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalShareMountTarget) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -15197,17 +17351,21 @@ func (vpc *VpcV1) CreateShareMountTargetWithContext(ctx context.Context, createS // If the request is accepted, the share mount target `lifecycle_state` will be set to // `deleting`. Once deletion processing completes, it will no longer be retrievable. func (vpc *VpcV1) DeleteShareMountTarget(deleteShareMountTargetOptions *DeleteShareMountTargetOptions) (result *ShareMountTarget, response *core.DetailedResponse, err error) { - return vpc.DeleteShareMountTargetWithContext(context.Background(), deleteShareMountTargetOptions) + result, response, err = vpc.DeleteShareMountTargetWithContext(context.Background(), deleteShareMountTargetOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteShareMountTargetWithContext is an alternate form of the DeleteShareMountTarget method which supports a Context parameter func (vpc *VpcV1) DeleteShareMountTargetWithContext(ctx context.Context, deleteShareMountTargetOptions *DeleteShareMountTargetOptions) (result *ShareMountTarget, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteShareMountTargetOptions, "deleteShareMountTargetOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteShareMountTargetOptions, "deleteShareMountTargetOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -15221,6 +17379,7 @@ func (vpc *VpcV1) DeleteShareMountTargetWithContext(ctx context.Context, deleteS builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/shares/{share_id}/mount_targets/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -15239,17 +17398,21 @@ func (vpc *VpcV1) DeleteShareMountTargetWithContext(ctx context.Context, deleteS request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "delete_share_mount_target", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalShareMountTarget) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -15261,17 +17424,21 @@ func (vpc *VpcV1) DeleteShareMountTargetWithContext(ctx context.Context, deleteS // GetShareMountTarget : Retrieve a share mount target // This request retrieves a single share mount target specified by the identifier in the URL. func (vpc *VpcV1) GetShareMountTarget(getShareMountTargetOptions *GetShareMountTargetOptions) (result *ShareMountTarget, response *core.DetailedResponse, err error) { - return vpc.GetShareMountTargetWithContext(context.Background(), getShareMountTargetOptions) + result, response, err = vpc.GetShareMountTargetWithContext(context.Background(), getShareMountTargetOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetShareMountTargetWithContext is an alternate form of the GetShareMountTarget method which supports a Context parameter func (vpc *VpcV1) GetShareMountTargetWithContext(ctx context.Context, getShareMountTargetOptions *GetShareMountTargetOptions) (result *ShareMountTarget, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getShareMountTargetOptions, "getShareMountTargetOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getShareMountTargetOptions, "getShareMountTargetOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -15285,6 +17452,7 @@ func (vpc *VpcV1) GetShareMountTargetWithContext(ctx context.Context, getShareMo builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/shares/{share_id}/mount_targets/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -15303,17 +17471,21 @@ func (vpc *VpcV1) GetShareMountTargetWithContext(ctx context.Context, getShareMo request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_share_mount_target", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalShareMountTarget) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -15327,17 +17499,21 @@ func (vpc *VpcV1) GetShareMountTargetWithContext(ctx context.Context, getShareMo // share mount target patch object is structured in the same way as a retrieved share mount target and needs to contain // only the information to be updated. func (vpc *VpcV1) UpdateShareMountTarget(updateShareMountTargetOptions *UpdateShareMountTargetOptions) (result *ShareMountTarget, response *core.DetailedResponse, err error) { - return vpc.UpdateShareMountTargetWithContext(context.Background(), updateShareMountTargetOptions) + result, response, err = vpc.UpdateShareMountTargetWithContext(context.Background(), updateShareMountTargetOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateShareMountTargetWithContext is an alternate form of the UpdateShareMountTarget method which supports a Context parameter func (vpc *VpcV1) UpdateShareMountTargetWithContext(ctx context.Context, updateShareMountTargetOptions *UpdateShareMountTargetOptions) (result *ShareMountTarget, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateShareMountTargetOptions, "updateShareMountTargetOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateShareMountTargetOptions, "updateShareMountTargetOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -15351,6 +17527,7 @@ func (vpc *VpcV1) UpdateShareMountTargetWithContext(ctx context.Context, updateS builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/shares/{share_id}/mount_targets/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -15370,22 +17547,27 @@ func (vpc *VpcV1) UpdateShareMountTargetWithContext(ctx context.Context, updateS _, err = builder.SetBodyContentJSON(updateShareMountTargetOptions.ShareMountTargetPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_share_mount_target", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalShareMountTarget) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -15401,17 +17583,21 @@ func (vpc *VpcV1) UpdateShareMountTargetWithContext(ctx context.Context, updateS // // This operation cannot be reversed. func (vpc *VpcV1) DeleteShareSource(deleteShareSourceOptions *DeleteShareSourceOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteShareSourceWithContext(context.Background(), deleteShareSourceOptions) + response, err = vpc.DeleteShareSourceWithContext(context.Background(), deleteShareSourceOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteShareSourceWithContext is an alternate form of the DeleteShareSource method which supports a Context parameter func (vpc *VpcV1) DeleteShareSourceWithContext(ctx context.Context, deleteShareSourceOptions *DeleteShareSourceOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteShareSourceOptions, "deleteShareSourceOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteShareSourceOptions, "deleteShareSourceOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -15424,6 +17610,7 @@ func (vpc *VpcV1) DeleteShareSourceWithContext(ctx context.Context, deleteShareS builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/shares/{share_id}/source`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -15441,10 +17628,16 @@ func (vpc *VpcV1) DeleteShareSourceWithContext(ctx context.Context, deleteShareS request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_share_source", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -15453,17 +17646,21 @@ func (vpc *VpcV1) DeleteShareSourceWithContext(ctx context.Context, deleteShareS // This request retrieves the source file share associated with the replica file share specified by the identifier in // the URL. func (vpc *VpcV1) GetShareSource(getShareSourceOptions *GetShareSourceOptions) (result *ShareReference, response *core.DetailedResponse, err error) { - return vpc.GetShareSourceWithContext(context.Background(), getShareSourceOptions) + result, response, err = vpc.GetShareSourceWithContext(context.Background(), getShareSourceOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetShareSourceWithContext is an alternate form of the GetShareSource method which supports a Context parameter func (vpc *VpcV1) GetShareSourceWithContext(ctx context.Context, getShareSourceOptions *GetShareSourceOptions) (result *ShareReference, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getShareSourceOptions, "getShareSourceOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getShareSourceOptions, "getShareSourceOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -15476,6 +17673,7 @@ func (vpc *VpcV1) GetShareSourceWithContext(ctx context.Context, getShareSourceO builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/shares/{share_id}/source`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -15494,17 +17692,21 @@ func (vpc *VpcV1) GetShareSourceWithContext(ctx context.Context, getShareSourceO request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_share_source", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalShareReference) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -15517,13 +17719,16 @@ func (vpc *VpcV1) GetShareSourceWithContext(ctx context.Context, getShareSourceO // This request lists all backup policies in the region. Backup policies control which sources are selected for backup // and include a set of backup policy plans that provide the backup schedules and deletion triggers. func (vpc *VpcV1) ListBackupPolicies(listBackupPoliciesOptions *ListBackupPoliciesOptions) (result *BackupPolicyCollection, response *core.DetailedResponse, err error) { - return vpc.ListBackupPoliciesWithContext(context.Background(), listBackupPoliciesOptions) + result, response, err = vpc.ListBackupPoliciesWithContext(context.Background(), listBackupPoliciesOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListBackupPoliciesWithContext is an alternate form of the ListBackupPolicies method which supports a Context parameter func (vpc *VpcV1) ListBackupPoliciesWithContext(ctx context.Context, listBackupPoliciesOptions *ListBackupPoliciesOptions) (result *BackupPolicyCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listBackupPoliciesOptions, "listBackupPoliciesOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -15532,6 +17737,7 @@ func (vpc *VpcV1) ListBackupPoliciesWithContext(ctx context.Context, listBackupP builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/backup_policies`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -15565,17 +17771,21 @@ func (vpc *VpcV1) ListBackupPoliciesWithContext(ctx context.Context, listBackupP request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_backup_policies", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBackupPolicyCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -15588,17 +17798,21 @@ func (vpc *VpcV1) ListBackupPoliciesWithContext(ctx context.Context, listBackupP // This request creates a new backup policy from a backup policy prototype object. The prototype object is structured in // the same way as a retrieved backup policy, and contains the information necessary to create the new backup policy. func (vpc *VpcV1) CreateBackupPolicy(createBackupPolicyOptions *CreateBackupPolicyOptions) (result BackupPolicyIntf, response *core.DetailedResponse, err error) { - return vpc.CreateBackupPolicyWithContext(context.Background(), createBackupPolicyOptions) + result, response, err = vpc.CreateBackupPolicyWithContext(context.Background(), createBackupPolicyOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateBackupPolicyWithContext is an alternate form of the CreateBackupPolicy method which supports a Context parameter func (vpc *VpcV1) CreateBackupPolicyWithContext(ctx context.Context, createBackupPolicyOptions *CreateBackupPolicyOptions) (result BackupPolicyIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createBackupPolicyOptions, "createBackupPolicyOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createBackupPolicyOptions, "createBackupPolicyOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -15607,6 +17821,7 @@ func (vpc *VpcV1) CreateBackupPolicyWithContext(ctx context.Context, createBacku builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/backup_policies`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -15626,22 +17841,27 @@ func (vpc *VpcV1) CreateBackupPolicyWithContext(ctx context.Context, createBacku _, err = builder.SetBodyContentJSON(createBackupPolicyOptions.BackupPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_backup_policy", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBackupPolicy) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -15654,17 +17874,21 @@ func (vpc *VpcV1) CreateBackupPolicyWithContext(ctx context.Context, createBacku // This request retrieves all jobs for a backup policy. A backup job represents the execution of a backup policy plan // for a resource matching the policy's criteria. func (vpc *VpcV1) ListBackupPolicyJobs(listBackupPolicyJobsOptions *ListBackupPolicyJobsOptions) (result *BackupPolicyJobCollection, response *core.DetailedResponse, err error) { - return vpc.ListBackupPolicyJobsWithContext(context.Background(), listBackupPolicyJobsOptions) + result, response, err = vpc.ListBackupPolicyJobsWithContext(context.Background(), listBackupPolicyJobsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListBackupPolicyJobsWithContext is an alternate form of the ListBackupPolicyJobs method which supports a Context parameter func (vpc *VpcV1) ListBackupPolicyJobsWithContext(ctx context.Context, listBackupPolicyJobsOptions *ListBackupPolicyJobsOptions) (result *BackupPolicyJobCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listBackupPolicyJobsOptions, "listBackupPolicyJobsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listBackupPolicyJobsOptions, "listBackupPolicyJobsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -15677,6 +17901,7 @@ func (vpc *VpcV1) ListBackupPolicyJobsWithContext(ctx context.Context, listBacku builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/backup_policies/{backup_policy_id}/jobs`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -15719,17 +17944,21 @@ func (vpc *VpcV1) ListBackupPolicyJobsWithContext(ctx context.Context, listBacku request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_backup_policy_jobs", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBackupPolicyJobCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -15741,17 +17970,21 @@ func (vpc *VpcV1) ListBackupPolicyJobsWithContext(ctx context.Context, listBacku // GetBackupPolicyJob : Retrieve a backup policy job // This request retrieves a single backup policy job specified by the identifier in the URL. func (vpc *VpcV1) GetBackupPolicyJob(getBackupPolicyJobOptions *GetBackupPolicyJobOptions) (result *BackupPolicyJob, response *core.DetailedResponse, err error) { - return vpc.GetBackupPolicyJobWithContext(context.Background(), getBackupPolicyJobOptions) + result, response, err = vpc.GetBackupPolicyJobWithContext(context.Background(), getBackupPolicyJobOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetBackupPolicyJobWithContext is an alternate form of the GetBackupPolicyJob method which supports a Context parameter func (vpc *VpcV1) GetBackupPolicyJobWithContext(ctx context.Context, getBackupPolicyJobOptions *GetBackupPolicyJobOptions) (result *BackupPolicyJob, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getBackupPolicyJobOptions, "getBackupPolicyJobOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getBackupPolicyJobOptions, "getBackupPolicyJobOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -15765,6 +17998,7 @@ func (vpc *VpcV1) GetBackupPolicyJobWithContext(ctx context.Context, getBackupPo builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/backup_policies/{backup_policy_id}/jobs/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -15783,17 +18017,21 @@ func (vpc *VpcV1) GetBackupPolicyJobWithContext(ctx context.Context, getBackupPo request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_backup_policy_job", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBackupPolicyJob) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -15805,17 +18043,21 @@ func (vpc *VpcV1) GetBackupPolicyJobWithContext(ctx context.Context, getBackupPo // ListBackupPolicyPlans : List all plans for a backup policy // This request retrieves all plans for a backup policy. Backup plans provide the backup schedule and deletion triggers. func (vpc *VpcV1) ListBackupPolicyPlans(listBackupPolicyPlansOptions *ListBackupPolicyPlansOptions) (result *BackupPolicyPlanCollection, response *core.DetailedResponse, err error) { - return vpc.ListBackupPolicyPlansWithContext(context.Background(), listBackupPolicyPlansOptions) + result, response, err = vpc.ListBackupPolicyPlansWithContext(context.Background(), listBackupPolicyPlansOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListBackupPolicyPlansWithContext is an alternate form of the ListBackupPolicyPlans method which supports a Context parameter func (vpc *VpcV1) ListBackupPolicyPlansWithContext(ctx context.Context, listBackupPolicyPlansOptions *ListBackupPolicyPlansOptions) (result *BackupPolicyPlanCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listBackupPolicyPlansOptions, "listBackupPolicyPlansOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listBackupPolicyPlansOptions, "listBackupPolicyPlansOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -15828,6 +18070,7 @@ func (vpc *VpcV1) ListBackupPolicyPlansWithContext(ctx context.Context, listBack builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/backup_policies/{backup_policy_id}/plans`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -15849,17 +18092,21 @@ func (vpc *VpcV1) ListBackupPolicyPlansWithContext(ctx context.Context, listBack request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_backup_policy_plans", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBackupPolicyPlanCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -15878,17 +18125,21 @@ func (vpc *VpcV1) ListBackupPolicyPlansWithContext(ctx context.Context, listBack // Backups created by this plan will use the plan's name truncated to 46 characters, followed by a unique 16-character // suffix. func (vpc *VpcV1) CreateBackupPolicyPlan(createBackupPolicyPlanOptions *CreateBackupPolicyPlanOptions) (result *BackupPolicyPlan, response *core.DetailedResponse, err error) { - return vpc.CreateBackupPolicyPlanWithContext(context.Background(), createBackupPolicyPlanOptions) + result, response, err = vpc.CreateBackupPolicyPlanWithContext(context.Background(), createBackupPolicyPlanOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateBackupPolicyPlanWithContext is an alternate form of the CreateBackupPolicyPlan method which supports a Context parameter func (vpc *VpcV1) CreateBackupPolicyPlanWithContext(ctx context.Context, createBackupPolicyPlanOptions *CreateBackupPolicyPlanOptions) (result *BackupPolicyPlan, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createBackupPolicyPlanOptions, "createBackupPolicyPlanOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createBackupPolicyPlanOptions, "createBackupPolicyPlanOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -15901,6 +18152,7 @@ func (vpc *VpcV1) CreateBackupPolicyPlanWithContext(ctx context.Context, createB builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/backup_policies/{backup_policy_id}/plans`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -15945,22 +18197,27 @@ func (vpc *VpcV1) CreateBackupPolicyPlanWithContext(ctx context.Context, createB } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_backup_policy_plan", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBackupPolicyPlan) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -15977,17 +18234,21 @@ func (vpc *VpcV1) CreateBackupPolicyPlanWithContext(ctx context.Context, createB // If the request is accepted, the backup policy plan `status` will be set to `deleting`. Once deletion processing // completes, the backup policy plan will no longer be retrievable. func (vpc *VpcV1) DeleteBackupPolicyPlan(deleteBackupPolicyPlanOptions *DeleteBackupPolicyPlanOptions) (result *BackupPolicyPlan, response *core.DetailedResponse, err error) { - return vpc.DeleteBackupPolicyPlanWithContext(context.Background(), deleteBackupPolicyPlanOptions) + result, response, err = vpc.DeleteBackupPolicyPlanWithContext(context.Background(), deleteBackupPolicyPlanOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteBackupPolicyPlanWithContext is an alternate form of the DeleteBackupPolicyPlan method which supports a Context parameter func (vpc *VpcV1) DeleteBackupPolicyPlanWithContext(ctx context.Context, deleteBackupPolicyPlanOptions *DeleteBackupPolicyPlanOptions) (result *BackupPolicyPlan, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteBackupPolicyPlanOptions, "deleteBackupPolicyPlanOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteBackupPolicyPlanOptions, "deleteBackupPolicyPlanOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -16001,6 +18262,7 @@ func (vpc *VpcV1) DeleteBackupPolicyPlanWithContext(ctx context.Context, deleteB builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/backup_policies/{backup_policy_id}/plans/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -16022,17 +18284,21 @@ func (vpc *VpcV1) DeleteBackupPolicyPlanWithContext(ctx context.Context, deleteB request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "delete_backup_policy_plan", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBackupPolicyPlan) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -16044,17 +18310,21 @@ func (vpc *VpcV1) DeleteBackupPolicyPlanWithContext(ctx context.Context, deleteB // GetBackupPolicyPlan : Retrieve a backup policy plan // This request retrieves a single backup policy plan specified by the identifier in the URL. func (vpc *VpcV1) GetBackupPolicyPlan(getBackupPolicyPlanOptions *GetBackupPolicyPlanOptions) (result *BackupPolicyPlan, response *core.DetailedResponse, err error) { - return vpc.GetBackupPolicyPlanWithContext(context.Background(), getBackupPolicyPlanOptions) + result, response, err = vpc.GetBackupPolicyPlanWithContext(context.Background(), getBackupPolicyPlanOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetBackupPolicyPlanWithContext is an alternate form of the GetBackupPolicyPlan method which supports a Context parameter func (vpc *VpcV1) GetBackupPolicyPlanWithContext(ctx context.Context, getBackupPolicyPlanOptions *GetBackupPolicyPlanOptions) (result *BackupPolicyPlan, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getBackupPolicyPlanOptions, "getBackupPolicyPlanOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getBackupPolicyPlanOptions, "getBackupPolicyPlanOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -16068,6 +18338,7 @@ func (vpc *VpcV1) GetBackupPolicyPlanWithContext(ctx context.Context, getBackupP builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/backup_policies/{backup_policy_id}/plans/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -16086,17 +18357,21 @@ func (vpc *VpcV1) GetBackupPolicyPlanWithContext(ctx context.Context, getBackupP request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_backup_policy_plan", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBackupPolicyPlan) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -16109,17 +18384,21 @@ func (vpc *VpcV1) GetBackupPolicyPlanWithContext(ctx context.Context, getBackupP // This request updates a backup policy plan with the information in a provided plan patch. The plan patch object is // structured in the same way as a retrieved backup policy plan and can contains only the information to be updated. func (vpc *VpcV1) UpdateBackupPolicyPlan(updateBackupPolicyPlanOptions *UpdateBackupPolicyPlanOptions) (result *BackupPolicyPlan, response *core.DetailedResponse, err error) { - return vpc.UpdateBackupPolicyPlanWithContext(context.Background(), updateBackupPolicyPlanOptions) + result, response, err = vpc.UpdateBackupPolicyPlanWithContext(context.Background(), updateBackupPolicyPlanOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateBackupPolicyPlanWithContext is an alternate form of the UpdateBackupPolicyPlan method which supports a Context parameter func (vpc *VpcV1) UpdateBackupPolicyPlanWithContext(ctx context.Context, updateBackupPolicyPlanOptions *UpdateBackupPolicyPlanOptions) (result *BackupPolicyPlan, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateBackupPolicyPlanOptions, "updateBackupPolicyPlanOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateBackupPolicyPlanOptions, "updateBackupPolicyPlanOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -16133,6 +18412,7 @@ func (vpc *VpcV1) UpdateBackupPolicyPlanWithContext(ctx context.Context, updateB builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/backup_policies/{backup_policy_id}/plans/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -16155,22 +18435,27 @@ func (vpc *VpcV1) UpdateBackupPolicyPlanWithContext(ctx context.Context, updateB _, err = builder.SetBodyContentJSON(updateBackupPolicyPlanOptions.BackupPolicyPlanPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_backup_policy_plan", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBackupPolicyPlan) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -16185,17 +18470,21 @@ func (vpc *VpcV1) UpdateBackupPolicyPlanWithContext(ctx context.Context, updateB // If the request is accepted, the backup policy `status` will be set to `deleting`. Once deletion processing completes, // the backup policy will no longer be retrievable. func (vpc *VpcV1) DeleteBackupPolicy(deleteBackupPolicyOptions *DeleteBackupPolicyOptions) (result BackupPolicyIntf, response *core.DetailedResponse, err error) { - return vpc.DeleteBackupPolicyWithContext(context.Background(), deleteBackupPolicyOptions) + result, response, err = vpc.DeleteBackupPolicyWithContext(context.Background(), deleteBackupPolicyOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteBackupPolicyWithContext is an alternate form of the DeleteBackupPolicy method which supports a Context parameter func (vpc *VpcV1) DeleteBackupPolicyWithContext(ctx context.Context, deleteBackupPolicyOptions *DeleteBackupPolicyOptions) (result BackupPolicyIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteBackupPolicyOptions, "deleteBackupPolicyOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteBackupPolicyOptions, "deleteBackupPolicyOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -16208,6 +18497,7 @@ func (vpc *VpcV1) DeleteBackupPolicyWithContext(ctx context.Context, deleteBacku builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/backup_policies/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -16229,17 +18519,21 @@ func (vpc *VpcV1) DeleteBackupPolicyWithContext(ctx context.Context, deleteBacku request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "delete_backup_policy", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBackupPolicy) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -16251,17 +18545,21 @@ func (vpc *VpcV1) DeleteBackupPolicyWithContext(ctx context.Context, deleteBacku // GetBackupPolicy : Retrieve a backup policy // This request retrieves a single backup policy specified by the identifier in the URL. func (vpc *VpcV1) GetBackupPolicy(getBackupPolicyOptions *GetBackupPolicyOptions) (result BackupPolicyIntf, response *core.DetailedResponse, err error) { - return vpc.GetBackupPolicyWithContext(context.Background(), getBackupPolicyOptions) + result, response, err = vpc.GetBackupPolicyWithContext(context.Background(), getBackupPolicyOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetBackupPolicyWithContext is an alternate form of the GetBackupPolicy method which supports a Context parameter func (vpc *VpcV1) GetBackupPolicyWithContext(ctx context.Context, getBackupPolicyOptions *GetBackupPolicyOptions) (result BackupPolicyIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getBackupPolicyOptions, "getBackupPolicyOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getBackupPolicyOptions, "getBackupPolicyOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -16274,6 +18572,7 @@ func (vpc *VpcV1) GetBackupPolicyWithContext(ctx context.Context, getBackupPolic builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/backup_policies/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -16292,17 +18591,21 @@ func (vpc *VpcV1) GetBackupPolicyWithContext(ctx context.Context, getBackupPolic request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_backup_policy", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBackupPolicy) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -16315,17 +18618,21 @@ func (vpc *VpcV1) GetBackupPolicyWithContext(ctx context.Context, getBackupPolic // This request updates a backup policy with the information in a provided backup policy patch. The backup policy patch // object is structured in the same way as a retrieved backup policy and contains only the information to be updated. func (vpc *VpcV1) UpdateBackupPolicy(updateBackupPolicyOptions *UpdateBackupPolicyOptions) (result BackupPolicyIntf, response *core.DetailedResponse, err error) { - return vpc.UpdateBackupPolicyWithContext(context.Background(), updateBackupPolicyOptions) + result, response, err = vpc.UpdateBackupPolicyWithContext(context.Background(), updateBackupPolicyOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateBackupPolicyWithContext is an alternate form of the UpdateBackupPolicy method which supports a Context parameter func (vpc *VpcV1) UpdateBackupPolicyWithContext(ctx context.Context, updateBackupPolicyOptions *UpdateBackupPolicyOptions) (result BackupPolicyIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateBackupPolicyOptions, "updateBackupPolicyOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateBackupPolicyOptions, "updateBackupPolicyOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -16338,6 +18645,7 @@ func (vpc *VpcV1) UpdateBackupPolicyWithContext(ctx context.Context, updateBacku builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/backup_policies/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -16360,22 +18668,27 @@ func (vpc *VpcV1) UpdateBackupPolicyWithContext(ctx context.Context, updateBacku _, err = builder.SetBodyContentJSON(updateBackupPolicyOptions.BackupPolicyPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_backup_policy", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBackupPolicy) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -16391,13 +18704,16 @@ func (vpc *VpcV1) UpdateBackupPolicyWithContext(ctx context.Context, updateBacku // available. Resources deployed within a single region also benefit from the low latency afforded by geographic // proximity. func (vpc *VpcV1) ListRegions(listRegionsOptions *ListRegionsOptions) (result *RegionCollection, response *core.DetailedResponse, err error) { - return vpc.ListRegionsWithContext(context.Background(), listRegionsOptions) + result, response, err = vpc.ListRegionsWithContext(context.Background(), listRegionsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListRegionsWithContext is an alternate form of the ListRegions method which supports a Context parameter func (vpc *VpcV1) ListRegionsWithContext(ctx context.Context, listRegionsOptions *ListRegionsOptions) (result *RegionCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listRegionsOptions, "listRegionsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -16406,6 +18722,7 @@ func (vpc *VpcV1) ListRegionsWithContext(ctx context.Context, listRegionsOptions builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/regions`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -16424,17 +18741,21 @@ func (vpc *VpcV1) ListRegionsWithContext(ctx context.Context, listRegionsOptions request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_regions", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRegionCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -16446,17 +18767,21 @@ func (vpc *VpcV1) ListRegionsWithContext(ctx context.Context, listRegionsOptions // GetRegion : Retrieve a region // This request retrieves a single region specified by the name in the URL. func (vpc *VpcV1) GetRegion(getRegionOptions *GetRegionOptions) (result *Region, response *core.DetailedResponse, err error) { - return vpc.GetRegionWithContext(context.Background(), getRegionOptions) + result, response, err = vpc.GetRegionWithContext(context.Background(), getRegionOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetRegionWithContext is an alternate form of the GetRegion method which supports a Context parameter func (vpc *VpcV1) GetRegionWithContext(ctx context.Context, getRegionOptions *GetRegionOptions) (result *Region, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getRegionOptions, "getRegionOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getRegionOptions, "getRegionOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -16469,6 +18794,7 @@ func (vpc *VpcV1) GetRegionWithContext(ctx context.Context, getRegionOptions *Ge builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/regions/{name}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -16487,17 +18813,21 @@ func (vpc *VpcV1) GetRegionWithContext(ctx context.Context, getRegionOptions *Ge request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_region", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRegion) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -16510,17 +18840,21 @@ func (vpc *VpcV1) GetRegionWithContext(ctx context.Context, getRegionOptions *Ge // This request lists all zones in a region. Zones represent logically-isolated data centers with high-bandwidth and // low-latency interconnects to other zones in the same region. Faults in a zone do not affect other zones. func (vpc *VpcV1) ListRegionZones(listRegionZonesOptions *ListRegionZonesOptions) (result *ZoneCollection, response *core.DetailedResponse, err error) { - return vpc.ListRegionZonesWithContext(context.Background(), listRegionZonesOptions) + result, response, err = vpc.ListRegionZonesWithContext(context.Background(), listRegionZonesOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListRegionZonesWithContext is an alternate form of the ListRegionZones method which supports a Context parameter func (vpc *VpcV1) ListRegionZonesWithContext(ctx context.Context, listRegionZonesOptions *ListRegionZonesOptions) (result *ZoneCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listRegionZonesOptions, "listRegionZonesOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listRegionZonesOptions, "listRegionZonesOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -16533,6 +18867,7 @@ func (vpc *VpcV1) ListRegionZonesWithContext(ctx context.Context, listRegionZone builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/regions/{region_name}/zones`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -16551,17 +18886,21 @@ func (vpc *VpcV1) ListRegionZonesWithContext(ctx context.Context, listRegionZone request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_region_zones", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalZoneCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -16573,17 +18912,21 @@ func (vpc *VpcV1) ListRegionZonesWithContext(ctx context.Context, listRegionZone // GetRegionZone : Retrieve a zone // This request retrieves a single zone specified by the region and zone names in the URL. func (vpc *VpcV1) GetRegionZone(getRegionZoneOptions *GetRegionZoneOptions) (result *Zone, response *core.DetailedResponse, err error) { - return vpc.GetRegionZoneWithContext(context.Background(), getRegionZoneOptions) + result, response, err = vpc.GetRegionZoneWithContext(context.Background(), getRegionZoneOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetRegionZoneWithContext is an alternate form of the GetRegionZone method which supports a Context parameter func (vpc *VpcV1) GetRegionZoneWithContext(ctx context.Context, getRegionZoneOptions *GetRegionZoneOptions) (result *Zone, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getRegionZoneOptions, "getRegionZoneOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getRegionZoneOptions, "getRegionZoneOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -16597,6 +18940,7 @@ func (vpc *VpcV1) GetRegionZoneWithContext(ctx context.Context, getRegionZoneOpt builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/regions/{region_name}/zones/{name}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -16615,17 +18959,21 @@ func (vpc *VpcV1) GetRegionZoneWithContext(ctx context.Context, getRegionZoneOpt request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_region_zone", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalZone) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -16642,13 +18990,16 @@ func (vpc *VpcV1) GetRegionZoneWithContext(ctx context.Context, getRegionZoneOpt // interfaces first. Virtual network interfaces with identical // `created_at` property values will in turn be sorted by ascending `name` property values. func (vpc *VpcV1) ListVirtualNetworkInterfaces(listVirtualNetworkInterfacesOptions *ListVirtualNetworkInterfacesOptions) (result *VirtualNetworkInterfaceCollection, response *core.DetailedResponse, err error) { - return vpc.ListVirtualNetworkInterfacesWithContext(context.Background(), listVirtualNetworkInterfacesOptions) + result, response, err = vpc.ListVirtualNetworkInterfacesWithContext(context.Background(), listVirtualNetworkInterfacesOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListVirtualNetworkInterfacesWithContext is an alternate form of the ListVirtualNetworkInterfaces method which supports a Context parameter func (vpc *VpcV1) ListVirtualNetworkInterfacesWithContext(ctx context.Context, listVirtualNetworkInterfacesOptions *ListVirtualNetworkInterfacesOptions) (result *VirtualNetworkInterfaceCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listVirtualNetworkInterfacesOptions, "listVirtualNetworkInterfacesOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -16657,6 +19008,7 @@ func (vpc *VpcV1) ListVirtualNetworkInterfacesWithContext(ctx context.Context, l builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/virtual_network_interfaces`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -16684,17 +19036,21 @@ func (vpc *VpcV1) ListVirtualNetworkInterfacesWithContext(ctx context.Context, l request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_virtual_network_interfaces", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVirtualNetworkInterfaceCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -16708,17 +19064,21 @@ func (vpc *VpcV1) ListVirtualNetworkInterfacesWithContext(ctx context.Context, l // object is structured in the same way as a retrieved virtual network interface, and contains the information necessary // to create the new virtual network interface. func (vpc *VpcV1) CreateVirtualNetworkInterface(createVirtualNetworkInterfaceOptions *CreateVirtualNetworkInterfaceOptions) (result *VirtualNetworkInterface, response *core.DetailedResponse, err error) { - return vpc.CreateVirtualNetworkInterfaceWithContext(context.Background(), createVirtualNetworkInterfaceOptions) + result, response, err = vpc.CreateVirtualNetworkInterfaceWithContext(context.Background(), createVirtualNetworkInterfaceOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateVirtualNetworkInterfaceWithContext is an alternate form of the CreateVirtualNetworkInterface method which supports a Context parameter func (vpc *VpcV1) CreateVirtualNetworkInterfaceWithContext(ctx context.Context, createVirtualNetworkInterfaceOptions *CreateVirtualNetworkInterfaceOptions) (result *VirtualNetworkInterface, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createVirtualNetworkInterfaceOptions, "createVirtualNetworkInterfaceOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createVirtualNetworkInterfaceOptions, "createVirtualNetworkInterfaceOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -16727,6 +19087,7 @@ func (vpc *VpcV1) CreateVirtualNetworkInterfaceWithContext(ctx context.Context, builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/virtual_network_interfaces`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -16774,22 +19135,27 @@ func (vpc *VpcV1) CreateVirtualNetworkInterfaceWithContext(ctx context.Context, } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_virtual_network_interface", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVirtualNetworkInterface) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -16803,17 +19169,21 @@ func (vpc *VpcV1) CreateVirtualNetworkInterfaceWithContext(ctx context.Context, // virtual network interface must not be required by another resource, such as the primary network attachment for an // instance. func (vpc *VpcV1) DeleteVirtualNetworkInterfaces(deleteVirtualNetworkInterfacesOptions *DeleteVirtualNetworkInterfacesOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteVirtualNetworkInterfacesWithContext(context.Background(), deleteVirtualNetworkInterfacesOptions) + response, err = vpc.DeleteVirtualNetworkInterfacesWithContext(context.Background(), deleteVirtualNetworkInterfacesOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteVirtualNetworkInterfacesWithContext is an alternate form of the DeleteVirtualNetworkInterfaces method which supports a Context parameter func (vpc *VpcV1) DeleteVirtualNetworkInterfacesWithContext(ctx context.Context, deleteVirtualNetworkInterfacesOptions *DeleteVirtualNetworkInterfacesOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteVirtualNetworkInterfacesOptions, "deleteVirtualNetworkInterfacesOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteVirtualNetworkInterfacesOptions, "deleteVirtualNetworkInterfacesOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -16826,6 +19196,7 @@ func (vpc *VpcV1) DeleteVirtualNetworkInterfacesWithContext(ctx context.Context, builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/virtual_network_interfaces/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -16843,10 +19214,16 @@ func (vpc *VpcV1) DeleteVirtualNetworkInterfacesWithContext(ctx context.Context, request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_virtual_network_interfaces", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -16854,17 +19231,21 @@ func (vpc *VpcV1) DeleteVirtualNetworkInterfacesWithContext(ctx context.Context, // GetVirtualNetworkInterface : Retrieve a virtual network interface // This request retrieves a single virtual network interface specified by the identifier in the URL. func (vpc *VpcV1) GetVirtualNetworkInterface(getVirtualNetworkInterfaceOptions *GetVirtualNetworkInterfaceOptions) (result *VirtualNetworkInterface, response *core.DetailedResponse, err error) { - return vpc.GetVirtualNetworkInterfaceWithContext(context.Background(), getVirtualNetworkInterfaceOptions) + result, response, err = vpc.GetVirtualNetworkInterfaceWithContext(context.Background(), getVirtualNetworkInterfaceOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetVirtualNetworkInterfaceWithContext is an alternate form of the GetVirtualNetworkInterface method which supports a Context parameter func (vpc *VpcV1) GetVirtualNetworkInterfaceWithContext(ctx context.Context, getVirtualNetworkInterfaceOptions *GetVirtualNetworkInterfaceOptions) (result *VirtualNetworkInterface, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getVirtualNetworkInterfaceOptions, "getVirtualNetworkInterfaceOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getVirtualNetworkInterfaceOptions, "getVirtualNetworkInterfaceOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -16877,6 +19258,7 @@ func (vpc *VpcV1) GetVirtualNetworkInterfaceWithContext(ctx context.Context, get builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/virtual_network_interfaces/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -16895,17 +19277,21 @@ func (vpc *VpcV1) GetVirtualNetworkInterfaceWithContext(ctx context.Context, get request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_virtual_network_interface", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVirtualNetworkInterface) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -16919,17 +19305,21 @@ func (vpc *VpcV1) GetVirtualNetworkInterfaceWithContext(ctx context.Context, get // The virtual network interface patch object is structured in the same way as a retrieved virtual network interface and // contains only the information to be updated. func (vpc *VpcV1) UpdateVirtualNetworkInterface(updateVirtualNetworkInterfaceOptions *UpdateVirtualNetworkInterfaceOptions) (result *VirtualNetworkInterface, response *core.DetailedResponse, err error) { - return vpc.UpdateVirtualNetworkInterfaceWithContext(context.Background(), updateVirtualNetworkInterfaceOptions) + result, response, err = vpc.UpdateVirtualNetworkInterfaceWithContext(context.Background(), updateVirtualNetworkInterfaceOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateVirtualNetworkInterfaceWithContext is an alternate form of the UpdateVirtualNetworkInterface method which supports a Context parameter func (vpc *VpcV1) UpdateVirtualNetworkInterfaceWithContext(ctx context.Context, updateVirtualNetworkInterfaceOptions *UpdateVirtualNetworkInterfaceOptions) (result *VirtualNetworkInterface, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateVirtualNetworkInterfaceOptions, "updateVirtualNetworkInterfaceOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateVirtualNetworkInterfaceOptions, "updateVirtualNetworkInterfaceOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -16942,6 +19332,7 @@ func (vpc *VpcV1) UpdateVirtualNetworkInterfaceWithContext(ctx context.Context, builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/virtual_network_interfaces/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -16961,22 +19352,27 @@ func (vpc *VpcV1) UpdateVirtualNetworkInterfaceWithContext(ctx context.Context, _, err = builder.SetBodyContentJSON(updateVirtualNetworkInterfaceOptions.VirtualNetworkInterfacePatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_virtual_network_interface", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVirtualNetworkInterface) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -16988,17 +19384,21 @@ func (vpc *VpcV1) UpdateVirtualNetworkInterfaceWithContext(ctx context.Context, // ListNetworkInterfaceFloatingIps : List all floating IPs associated with a virtual network interface // This request lists all floating IPs associated with a virtual network interface. func (vpc *VpcV1) ListNetworkInterfaceFloatingIps(listNetworkInterfaceFloatingIpsOptions *ListNetworkInterfaceFloatingIpsOptions) (result *FloatingIPCollectionVirtualNetworkInterfaceContext, response *core.DetailedResponse, err error) { - return vpc.ListNetworkInterfaceFloatingIpsWithContext(context.Background(), listNetworkInterfaceFloatingIpsOptions) + result, response, err = vpc.ListNetworkInterfaceFloatingIpsWithContext(context.Background(), listNetworkInterfaceFloatingIpsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListNetworkInterfaceFloatingIpsWithContext is an alternate form of the ListNetworkInterfaceFloatingIps method which supports a Context parameter func (vpc *VpcV1) ListNetworkInterfaceFloatingIpsWithContext(ctx context.Context, listNetworkInterfaceFloatingIpsOptions *ListNetworkInterfaceFloatingIpsOptions) (result *FloatingIPCollectionVirtualNetworkInterfaceContext, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listNetworkInterfaceFloatingIpsOptions, "listNetworkInterfaceFloatingIpsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listNetworkInterfaceFloatingIpsOptions, "listNetworkInterfaceFloatingIpsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -17011,6 +19411,7 @@ func (vpc *VpcV1) ListNetworkInterfaceFloatingIpsWithContext(ctx context.Context builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/virtual_network_interfaces/{virtual_network_interface_id}/floating_ips`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -17038,17 +19439,21 @@ func (vpc *VpcV1) ListNetworkInterfaceFloatingIpsWithContext(ctx context.Context request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_network_interface_floating_ips", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIPCollectionVirtualNetworkInterfaceContext) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -17060,17 +19465,21 @@ func (vpc *VpcV1) ListNetworkInterfaceFloatingIpsWithContext(ctx context.Context // RemoveNetworkInterfaceFloatingIP : Disassociate a floating IP from a virtual network interface // This request disassociates the specified floating IP from the specified virtual network interface. func (vpc *VpcV1) RemoveNetworkInterfaceFloatingIP(removeNetworkInterfaceFloatingIPOptions *RemoveNetworkInterfaceFloatingIPOptions) (response *core.DetailedResponse, err error) { - return vpc.RemoveNetworkInterfaceFloatingIPWithContext(context.Background(), removeNetworkInterfaceFloatingIPOptions) + response, err = vpc.RemoveNetworkInterfaceFloatingIPWithContext(context.Background(), removeNetworkInterfaceFloatingIPOptions) + err = core.RepurposeSDKProblem(err, "") + return } // RemoveNetworkInterfaceFloatingIPWithContext is an alternate form of the RemoveNetworkInterfaceFloatingIP method which supports a Context parameter func (vpc *VpcV1) RemoveNetworkInterfaceFloatingIPWithContext(ctx context.Context, removeNetworkInterfaceFloatingIPOptions *RemoveNetworkInterfaceFloatingIPOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(removeNetworkInterfaceFloatingIPOptions, "removeNetworkInterfaceFloatingIPOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(removeNetworkInterfaceFloatingIPOptions, "removeNetworkInterfaceFloatingIPOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -17084,6 +19493,7 @@ func (vpc *VpcV1) RemoveNetworkInterfaceFloatingIPWithContext(ctx context.Contex builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/virtual_network_interfaces/{virtual_network_interface_id}/floating_ips/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -17101,10 +19511,16 @@ func (vpc *VpcV1) RemoveNetworkInterfaceFloatingIPWithContext(ctx context.Contex request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "remove_network_interface_floating_ip", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -17113,17 +19529,21 @@ func (vpc *VpcV1) RemoveNetworkInterfaceFloatingIPWithContext(ctx context.Contex // This request retrieves a specified floating IP if it is associated with the virtual network interface specified in // the URL. func (vpc *VpcV1) GetNetworkInterfaceFloatingIP(getNetworkInterfaceFloatingIPOptions *GetNetworkInterfaceFloatingIPOptions) (result *FloatingIPReference, response *core.DetailedResponse, err error) { - return vpc.GetNetworkInterfaceFloatingIPWithContext(context.Background(), getNetworkInterfaceFloatingIPOptions) + result, response, err = vpc.GetNetworkInterfaceFloatingIPWithContext(context.Background(), getNetworkInterfaceFloatingIPOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetNetworkInterfaceFloatingIPWithContext is an alternate form of the GetNetworkInterfaceFloatingIP method which supports a Context parameter func (vpc *VpcV1) GetNetworkInterfaceFloatingIPWithContext(ctx context.Context, getNetworkInterfaceFloatingIPOptions *GetNetworkInterfaceFloatingIPOptions) (result *FloatingIPReference, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getNetworkInterfaceFloatingIPOptions, "getNetworkInterfaceFloatingIPOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getNetworkInterfaceFloatingIPOptions, "getNetworkInterfaceFloatingIPOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -17137,6 +19557,7 @@ func (vpc *VpcV1) GetNetworkInterfaceFloatingIPWithContext(ctx context.Context, builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/virtual_network_interfaces/{virtual_network_interface_id}/floating_ips/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -17155,17 +19576,21 @@ func (vpc *VpcV1) GetNetworkInterfaceFloatingIPWithContext(ctx context.Context, request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_network_interface_floating_ip", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIPReference) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -17192,17 +19617,21 @@ func (vpc *VpcV1) GetNetworkInterfaceFloatingIPWithContext(ctx context.Context, // // A request body is not required, and if provided, is ignored. func (vpc *VpcV1) AddNetworkInterfaceFloatingIP(addNetworkInterfaceFloatingIPOptions *AddNetworkInterfaceFloatingIPOptions) (result *FloatingIPReference, response *core.DetailedResponse, err error) { - return vpc.AddNetworkInterfaceFloatingIPWithContext(context.Background(), addNetworkInterfaceFloatingIPOptions) + result, response, err = vpc.AddNetworkInterfaceFloatingIPWithContext(context.Background(), addNetworkInterfaceFloatingIPOptions) + err = core.RepurposeSDKProblem(err, "") + return } // AddNetworkInterfaceFloatingIPWithContext is an alternate form of the AddNetworkInterfaceFloatingIP method which supports a Context parameter func (vpc *VpcV1) AddNetworkInterfaceFloatingIPWithContext(ctx context.Context, addNetworkInterfaceFloatingIPOptions *AddNetworkInterfaceFloatingIPOptions) (result *FloatingIPReference, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(addNetworkInterfaceFloatingIPOptions, "addNetworkInterfaceFloatingIPOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(addNetworkInterfaceFloatingIPOptions, "addNetworkInterfaceFloatingIPOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -17216,6 +19645,7 @@ func (vpc *VpcV1) AddNetworkInterfaceFloatingIPWithContext(ctx context.Context, builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/virtual_network_interfaces/{virtual_network_interface_id}/floating_ips/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -17234,17 +19664,21 @@ func (vpc *VpcV1) AddNetworkInterfaceFloatingIPWithContext(ctx context.Context, request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "add_network_interface_floating_ip", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIPReference) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -17256,17 +19690,21 @@ func (vpc *VpcV1) AddNetworkInterfaceFloatingIPWithContext(ctx context.Context, // ListVirtualNetworkInterfaceIps : List all reserved IPs bound to a virtual network interface // This request lists all reserved IPs bound to a virtual network interface. func (vpc *VpcV1) ListVirtualNetworkInterfaceIps(listVirtualNetworkInterfaceIpsOptions *ListVirtualNetworkInterfaceIpsOptions) (result *ReservedIPCollectionVirtualNetworkInterfaceContext, response *core.DetailedResponse, err error) { - return vpc.ListVirtualNetworkInterfaceIpsWithContext(context.Background(), listVirtualNetworkInterfaceIpsOptions) + result, response, err = vpc.ListVirtualNetworkInterfaceIpsWithContext(context.Background(), listVirtualNetworkInterfaceIpsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListVirtualNetworkInterfaceIpsWithContext is an alternate form of the ListVirtualNetworkInterfaceIps method which supports a Context parameter func (vpc *VpcV1) ListVirtualNetworkInterfaceIpsWithContext(ctx context.Context, listVirtualNetworkInterfaceIpsOptions *ListVirtualNetworkInterfaceIpsOptions) (result *ReservedIPCollectionVirtualNetworkInterfaceContext, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listVirtualNetworkInterfaceIpsOptions, "listVirtualNetworkInterfaceIpsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listVirtualNetworkInterfaceIpsOptions, "listVirtualNetworkInterfaceIpsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -17279,6 +19717,7 @@ func (vpc *VpcV1) ListVirtualNetworkInterfaceIpsWithContext(ctx context.Context, builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/virtual_network_interfaces/{virtual_network_interface_id}/ips`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -17306,17 +19745,21 @@ func (vpc *VpcV1) ListVirtualNetworkInterfaceIpsWithContext(ctx context.Context, request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_virtual_network_interface_ips", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIPCollectionVirtualNetworkInterfaceContext) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -17331,17 +19774,21 @@ func (vpc *VpcV1) ListVirtualNetworkInterfaceIpsWithContext(ctx context.Context, // // The reserved IP for the `primary_ip` cannot be unbound. func (vpc *VpcV1) RemoveVirtualNetworkInterfaceIP(removeVirtualNetworkInterfaceIPOptions *RemoveVirtualNetworkInterfaceIPOptions) (response *core.DetailedResponse, err error) { - return vpc.RemoveVirtualNetworkInterfaceIPWithContext(context.Background(), removeVirtualNetworkInterfaceIPOptions) + response, err = vpc.RemoveVirtualNetworkInterfaceIPWithContext(context.Background(), removeVirtualNetworkInterfaceIPOptions) + err = core.RepurposeSDKProblem(err, "") + return } // RemoveVirtualNetworkInterfaceIPWithContext is an alternate form of the RemoveVirtualNetworkInterfaceIP method which supports a Context parameter func (vpc *VpcV1) RemoveVirtualNetworkInterfaceIPWithContext(ctx context.Context, removeVirtualNetworkInterfaceIPOptions *RemoveVirtualNetworkInterfaceIPOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(removeVirtualNetworkInterfaceIPOptions, "removeVirtualNetworkInterfaceIPOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(removeVirtualNetworkInterfaceIPOptions, "removeVirtualNetworkInterfaceIPOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -17355,6 +19802,7 @@ func (vpc *VpcV1) RemoveVirtualNetworkInterfaceIPWithContext(ctx context.Context builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/virtual_network_interfaces/{virtual_network_interface_id}/ips/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -17372,10 +19820,16 @@ func (vpc *VpcV1) RemoveVirtualNetworkInterfaceIPWithContext(ctx context.Context request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "remove_virtual_network_interface_ip", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -17384,17 +19838,21 @@ func (vpc *VpcV1) RemoveVirtualNetworkInterfaceIPWithContext(ctx context.Context // This request retrieves the specified reserved IP address if it is bound to the virtual network interface specified in // the URL. func (vpc *VpcV1) GetVirtualNetworkInterfaceIP(getVirtualNetworkInterfaceIPOptions *GetVirtualNetworkInterfaceIPOptions) (result *ReservedIPReference, response *core.DetailedResponse, err error) { - return vpc.GetVirtualNetworkInterfaceIPWithContext(context.Background(), getVirtualNetworkInterfaceIPOptions) + result, response, err = vpc.GetVirtualNetworkInterfaceIPWithContext(context.Background(), getVirtualNetworkInterfaceIPOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetVirtualNetworkInterfaceIPWithContext is an alternate form of the GetVirtualNetworkInterfaceIP method which supports a Context parameter func (vpc *VpcV1) GetVirtualNetworkInterfaceIPWithContext(ctx context.Context, getVirtualNetworkInterfaceIPOptions *GetVirtualNetworkInterfaceIPOptions) (result *ReservedIPReference, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getVirtualNetworkInterfaceIPOptions, "getVirtualNetworkInterfaceIPOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getVirtualNetworkInterfaceIPOptions, "getVirtualNetworkInterfaceIPOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -17408,6 +19866,7 @@ func (vpc *VpcV1) GetVirtualNetworkInterfaceIPWithContext(ctx context.Context, g builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/virtual_network_interfaces/{virtual_network_interface_id}/ips/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -17426,17 +19885,21 @@ func (vpc *VpcV1) GetVirtualNetworkInterfaceIPWithContext(ctx context.Context, g request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_virtual_network_interface_ip", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIPReference) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -17451,17 +19914,21 @@ func (vpc *VpcV1) GetVirtualNetworkInterfaceIPWithContext(ctx context.Context, g // The reserved IP must currently be unbound and in the primary IP's subnet. The virtual network interface's `target` // must not currently be a file share mount target. func (vpc *VpcV1) AddVirtualNetworkInterfaceIP(addVirtualNetworkInterfaceIPOptions *AddVirtualNetworkInterfaceIPOptions) (result *ReservedIPReference, response *core.DetailedResponse, err error) { - return vpc.AddVirtualNetworkInterfaceIPWithContext(context.Background(), addVirtualNetworkInterfaceIPOptions) + result, response, err = vpc.AddVirtualNetworkInterfaceIPWithContext(context.Background(), addVirtualNetworkInterfaceIPOptions) + err = core.RepurposeSDKProblem(err, "") + return } // AddVirtualNetworkInterfaceIPWithContext is an alternate form of the AddVirtualNetworkInterfaceIP method which supports a Context parameter func (vpc *VpcV1) AddVirtualNetworkInterfaceIPWithContext(ctx context.Context, addVirtualNetworkInterfaceIPOptions *AddVirtualNetworkInterfaceIPOptions) (result *ReservedIPReference, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(addVirtualNetworkInterfaceIPOptions, "addVirtualNetworkInterfaceIPOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(addVirtualNetworkInterfaceIPOptions, "addVirtualNetworkInterfaceIPOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -17475,6 +19942,7 @@ func (vpc *VpcV1) AddVirtualNetworkInterfaceIPWithContext(ctx context.Context, a builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/virtual_network_interfaces/{virtual_network_interface_id}/ips/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -17493,17 +19961,21 @@ func (vpc *VpcV1) AddVirtualNetworkInterfaceIPWithContext(ctx context.Context, a request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "add_virtual_network_interface_ip", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIPReference) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -17517,13 +19989,16 @@ func (vpc *VpcV1) AddVirtualNetworkInterfaceIPWithContext(ctx context.Context, a // VPC, which allows access to the Internet. A public gateway resides in a zone and can be connected to subnets in the // same zone only. func (vpc *VpcV1) ListPublicGateways(listPublicGatewaysOptions *ListPublicGatewaysOptions) (result *PublicGatewayCollection, response *core.DetailedResponse, err error) { - return vpc.ListPublicGatewaysWithContext(context.Background(), listPublicGatewaysOptions) + result, response, err = vpc.ListPublicGatewaysWithContext(context.Background(), listPublicGatewaysOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListPublicGatewaysWithContext is an alternate form of the ListPublicGateways method which supports a Context parameter func (vpc *VpcV1) ListPublicGatewaysWithContext(ctx context.Context, listPublicGatewaysOptions *ListPublicGatewaysOptions) (result *PublicGatewayCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listPublicGatewaysOptions, "listPublicGatewaysOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -17532,6 +20007,7 @@ func (vpc *VpcV1) ListPublicGatewaysWithContext(ctx context.Context, listPublicG builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/public_gateways`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -17559,17 +20035,21 @@ func (vpc *VpcV1) ListPublicGatewaysWithContext(ctx context.Context, listPublicG request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_public_gateways", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPublicGatewayCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -17586,17 +20066,21 @@ func (vpc *VpcV1) ListPublicGatewaysWithContext(ctx context.Context, listPublicG // the public gateway. Once a public gateway has been created, its floating IP cannot be unbound. A public gateway must // be explicitly attached to each subnet it will provide connectivity for. func (vpc *VpcV1) CreatePublicGateway(createPublicGatewayOptions *CreatePublicGatewayOptions) (result *PublicGateway, response *core.DetailedResponse, err error) { - return vpc.CreatePublicGatewayWithContext(context.Background(), createPublicGatewayOptions) + result, response, err = vpc.CreatePublicGatewayWithContext(context.Background(), createPublicGatewayOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreatePublicGatewayWithContext is an alternate form of the CreatePublicGateway method which supports a Context parameter func (vpc *VpcV1) CreatePublicGatewayWithContext(ctx context.Context, createPublicGatewayOptions *CreatePublicGatewayOptions) (result *PublicGateway, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createPublicGatewayOptions, "createPublicGatewayOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createPublicGatewayOptions, "createPublicGatewayOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -17605,6 +20089,7 @@ func (vpc *VpcV1) CreatePublicGatewayWithContext(ctx context.Context, createPubl builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/public_gateways`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -17640,22 +20125,27 @@ func (vpc *VpcV1) CreatePublicGatewayWithContext(ctx context.Context, createPubl } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_public_gateway", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPublicGateway) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -17669,17 +20159,21 @@ func (vpc *VpcV1) CreatePublicGatewayWithContext(ctx context.Context, createPubl // gateway must not be attached to any subnets. The public gateway's floating IP will be automatically unbound. If the // floating IP was created when the public gateway was created, it will be deleted. func (vpc *VpcV1) DeletePublicGateway(deletePublicGatewayOptions *DeletePublicGatewayOptions) (response *core.DetailedResponse, err error) { - return vpc.DeletePublicGatewayWithContext(context.Background(), deletePublicGatewayOptions) + response, err = vpc.DeletePublicGatewayWithContext(context.Background(), deletePublicGatewayOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeletePublicGatewayWithContext is an alternate form of the DeletePublicGateway method which supports a Context parameter func (vpc *VpcV1) DeletePublicGatewayWithContext(ctx context.Context, deletePublicGatewayOptions *DeletePublicGatewayOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deletePublicGatewayOptions, "deletePublicGatewayOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deletePublicGatewayOptions, "deletePublicGatewayOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -17692,6 +20186,7 @@ func (vpc *VpcV1) DeletePublicGatewayWithContext(ctx context.Context, deletePubl builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/public_gateways/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -17709,10 +20204,16 @@ func (vpc *VpcV1) DeletePublicGatewayWithContext(ctx context.Context, deletePubl request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_public_gateway", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -17720,17 +20221,21 @@ func (vpc *VpcV1) DeletePublicGatewayWithContext(ctx context.Context, deletePubl // GetPublicGateway : Retrieve a public gateway // This request retrieves a single public gateway specified by the identifier in the URL. func (vpc *VpcV1) GetPublicGateway(getPublicGatewayOptions *GetPublicGatewayOptions) (result *PublicGateway, response *core.DetailedResponse, err error) { - return vpc.GetPublicGatewayWithContext(context.Background(), getPublicGatewayOptions) + result, response, err = vpc.GetPublicGatewayWithContext(context.Background(), getPublicGatewayOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetPublicGatewayWithContext is an alternate form of the GetPublicGateway method which supports a Context parameter func (vpc *VpcV1) GetPublicGatewayWithContext(ctx context.Context, getPublicGatewayOptions *GetPublicGatewayOptions) (result *PublicGateway, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getPublicGatewayOptions, "getPublicGatewayOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getPublicGatewayOptions, "getPublicGatewayOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -17743,6 +20248,7 @@ func (vpc *VpcV1) GetPublicGatewayWithContext(ctx context.Context, getPublicGate builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/public_gateways/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -17761,17 +20267,21 @@ func (vpc *VpcV1) GetPublicGatewayWithContext(ctx context.Context, getPublicGate request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_public_gateway", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPublicGateway) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -17783,17 +20293,21 @@ func (vpc *VpcV1) GetPublicGatewayWithContext(ctx context.Context, getPublicGate // UpdatePublicGateway : Update a public gateway // This request updates a public gateway's name. func (vpc *VpcV1) UpdatePublicGateway(updatePublicGatewayOptions *UpdatePublicGatewayOptions) (result *PublicGateway, response *core.DetailedResponse, err error) { - return vpc.UpdatePublicGatewayWithContext(context.Background(), updatePublicGatewayOptions) + result, response, err = vpc.UpdatePublicGatewayWithContext(context.Background(), updatePublicGatewayOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdatePublicGatewayWithContext is an alternate form of the UpdatePublicGateway method which supports a Context parameter func (vpc *VpcV1) UpdatePublicGatewayWithContext(ctx context.Context, updatePublicGatewayOptions *UpdatePublicGatewayOptions) (result *PublicGateway, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updatePublicGatewayOptions, "updatePublicGatewayOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updatePublicGatewayOptions, "updatePublicGatewayOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -17806,6 +20320,7 @@ func (vpc *VpcV1) UpdatePublicGatewayWithContext(ctx context.Context, updatePubl builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/public_gateways/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -17825,22 +20340,27 @@ func (vpc *VpcV1) UpdatePublicGatewayWithContext(ctx context.Context, updatePubl _, err = builder.SetBodyContentJSON(updatePublicGatewayOptions.PublicGatewayPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_public_gateway", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPublicGateway) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -17853,13 +20373,16 @@ func (vpc *VpcV1) UpdatePublicGatewayWithContext(ctx context.Context, updatePubl // This request lists all floating IPs in the region. Floating IPs allow inbound and outbound traffic from the Internet // to an instance. func (vpc *VpcV1) ListFloatingIps(listFloatingIpsOptions *ListFloatingIpsOptions) (result *FloatingIPCollection, response *core.DetailedResponse, err error) { - return vpc.ListFloatingIpsWithContext(context.Background(), listFloatingIpsOptions) + result, response, err = vpc.ListFloatingIpsWithContext(context.Background(), listFloatingIpsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListFloatingIpsWithContext is an alternate form of the ListFloatingIps method which supports a Context parameter func (vpc *VpcV1) ListFloatingIpsWithContext(ctx context.Context, listFloatingIpsOptions *ListFloatingIpsOptions) (result *FloatingIPCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listFloatingIpsOptions, "listFloatingIpsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -17868,6 +20391,7 @@ func (vpc *VpcV1) ListFloatingIpsWithContext(ctx context.Context, listFloatingIp builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/floating_ips`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -17910,17 +20434,21 @@ func (vpc *VpcV1) ListFloatingIpsWithContext(ctx context.Context, listFloatingIp request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_floating_ips", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIPCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -17932,17 +20460,21 @@ func (vpc *VpcV1) ListFloatingIpsWithContext(ctx context.Context, listFloatingIp // CreateFloatingIP : Reserve a floating IP // This request reserves a new floating IP. func (vpc *VpcV1) CreateFloatingIP(createFloatingIPOptions *CreateFloatingIPOptions) (result *FloatingIP, response *core.DetailedResponse, err error) { - return vpc.CreateFloatingIPWithContext(context.Background(), createFloatingIPOptions) + result, response, err = vpc.CreateFloatingIPWithContext(context.Background(), createFloatingIPOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateFloatingIPWithContext is an alternate form of the CreateFloatingIP method which supports a Context parameter func (vpc *VpcV1) CreateFloatingIPWithContext(ctx context.Context, createFloatingIPOptions *CreateFloatingIPOptions) (result *FloatingIP, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createFloatingIPOptions, "createFloatingIPOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createFloatingIPOptions, "createFloatingIPOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -17951,6 +20483,7 @@ func (vpc *VpcV1) CreateFloatingIPWithContext(ctx context.Context, createFloatin builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/floating_ips`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -17970,22 +20503,27 @@ func (vpc *VpcV1) CreateFloatingIPWithContext(ctx context.Context, createFloatin _, err = builder.SetBodyContentJSON(createFloatingIPOptions.FloatingIPPrototype) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_floating_ip", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIP) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -17998,17 +20536,21 @@ func (vpc *VpcV1) CreateFloatingIPWithContext(ctx context.Context, createFloatin // This request disassociates (if associated) and releases a floating IP. This operation cannot be reversed. For this // request to succeed, the floating IP must not be required by another resource, such as a public gateway. func (vpc *VpcV1) DeleteFloatingIP(deleteFloatingIPOptions *DeleteFloatingIPOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteFloatingIPWithContext(context.Background(), deleteFloatingIPOptions) + response, err = vpc.DeleteFloatingIPWithContext(context.Background(), deleteFloatingIPOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteFloatingIPWithContext is an alternate form of the DeleteFloatingIP method which supports a Context parameter func (vpc *VpcV1) DeleteFloatingIPWithContext(ctx context.Context, deleteFloatingIPOptions *DeleteFloatingIPOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteFloatingIPOptions, "deleteFloatingIPOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteFloatingIPOptions, "deleteFloatingIPOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -18021,6 +20563,7 @@ func (vpc *VpcV1) DeleteFloatingIPWithContext(ctx context.Context, deleteFloatin builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/floating_ips/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -18038,10 +20581,16 @@ func (vpc *VpcV1) DeleteFloatingIPWithContext(ctx context.Context, deleteFloatin request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_floating_ip", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -18049,17 +20598,21 @@ func (vpc *VpcV1) DeleteFloatingIPWithContext(ctx context.Context, deleteFloatin // GetFloatingIP : Retrieve a floating IP // This request retrieves a single floating IP specified by the identifier in the URL. func (vpc *VpcV1) GetFloatingIP(getFloatingIPOptions *GetFloatingIPOptions) (result *FloatingIP, response *core.DetailedResponse, err error) { - return vpc.GetFloatingIPWithContext(context.Background(), getFloatingIPOptions) + result, response, err = vpc.GetFloatingIPWithContext(context.Background(), getFloatingIPOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetFloatingIPWithContext is an alternate form of the GetFloatingIP method which supports a Context parameter func (vpc *VpcV1) GetFloatingIPWithContext(ctx context.Context, getFloatingIPOptions *GetFloatingIPOptions) (result *FloatingIP, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getFloatingIPOptions, "getFloatingIPOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getFloatingIPOptions, "getFloatingIPOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -18072,6 +20625,7 @@ func (vpc *VpcV1) GetFloatingIPWithContext(ctx context.Context, getFloatingIPOpt builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/floating_ips/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -18090,17 +20644,21 @@ func (vpc *VpcV1) GetFloatingIPWithContext(ctx context.Context, getFloatingIPOpt request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_floating_ip", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIP) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -18112,17 +20670,21 @@ func (vpc *VpcV1) GetFloatingIPWithContext(ctx context.Context, getFloatingIPOpt // UpdateFloatingIP : Update a floating IP // This request updates a floating IP's name and/or target. func (vpc *VpcV1) UpdateFloatingIP(updateFloatingIPOptions *UpdateFloatingIPOptions) (result *FloatingIP, response *core.DetailedResponse, err error) { - return vpc.UpdateFloatingIPWithContext(context.Background(), updateFloatingIPOptions) + result, response, err = vpc.UpdateFloatingIPWithContext(context.Background(), updateFloatingIPOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateFloatingIPWithContext is an alternate form of the UpdateFloatingIP method which supports a Context parameter func (vpc *VpcV1) UpdateFloatingIPWithContext(ctx context.Context, updateFloatingIPOptions *UpdateFloatingIPOptions) (result *FloatingIP, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateFloatingIPOptions, "updateFloatingIPOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateFloatingIPOptions, "updateFloatingIPOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -18135,6 +20697,7 @@ func (vpc *VpcV1) UpdateFloatingIPWithContext(ctx context.Context, updateFloatin builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/floating_ips/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -18154,22 +20717,27 @@ func (vpc *VpcV1) UpdateFloatingIPWithContext(ctx context.Context, updateFloatin _, err = builder.SetBodyContentJSON(updateFloatingIPOptions.FloatingIPPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_floating_ip", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIP) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -18183,13 +20751,16 @@ func (vpc *VpcV1) UpdateFloatingIPWithContext(ctx context.Context, updateFloatin // for all traffic in and out of a subnet. Both allow and deny rules can be defined, and rules are stateless such that // reverse traffic in response to allowed traffic is not automatically permitted. func (vpc *VpcV1) ListNetworkAcls(listNetworkAclsOptions *ListNetworkAclsOptions) (result *NetworkACLCollection, response *core.DetailedResponse, err error) { - return vpc.ListNetworkAclsWithContext(context.Background(), listNetworkAclsOptions) + result, response, err = vpc.ListNetworkAclsWithContext(context.Background(), listNetworkAclsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListNetworkAclsWithContext is an alternate form of the ListNetworkAcls method which supports a Context parameter func (vpc *VpcV1) ListNetworkAclsWithContext(ctx context.Context, listNetworkAclsOptions *ListNetworkAclsOptions) (result *NetworkACLCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listNetworkAclsOptions, "listNetworkAclsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -18198,6 +20769,7 @@ func (vpc *VpcV1) ListNetworkAclsWithContext(ctx context.Context, listNetworkAcl builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/network_acls`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -18225,17 +20797,21 @@ func (vpc *VpcV1) ListNetworkAclsWithContext(ctx context.Context, listNetworkAcl request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_network_acls", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACLCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -18249,17 +20825,21 @@ func (vpc *VpcV1) ListNetworkAclsWithContext(ctx context.Context, listNetworkAcl // structured in the same way as a retrieved network ACL, and contains the information necessary to create the new // network ACL. func (vpc *VpcV1) CreateNetworkACL(createNetworkACLOptions *CreateNetworkACLOptions) (result *NetworkACL, response *core.DetailedResponse, err error) { - return vpc.CreateNetworkACLWithContext(context.Background(), createNetworkACLOptions) + result, response, err = vpc.CreateNetworkACLWithContext(context.Background(), createNetworkACLOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateNetworkACLWithContext is an alternate form of the CreateNetworkACL method which supports a Context parameter func (vpc *VpcV1) CreateNetworkACLWithContext(ctx context.Context, createNetworkACLOptions *CreateNetworkACLOptions) (result *NetworkACL, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createNetworkACLOptions, "createNetworkACLOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createNetworkACLOptions, "createNetworkACLOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -18268,6 +20848,7 @@ func (vpc *VpcV1) CreateNetworkACLWithContext(ctx context.Context, createNetwork builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/network_acls`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -18287,22 +20868,27 @@ func (vpc *VpcV1) CreateNetworkACLWithContext(ctx context.Context, createNetwork _, err = builder.SetBodyContentJSON(createNetworkACLOptions.NetworkACLPrototype) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_network_acl", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACL) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -18315,17 +20901,21 @@ func (vpc *VpcV1) CreateNetworkACLWithContext(ctx context.Context, createNetwork // This request deletes a network ACL. This operation cannot be reversed. For this request to succeed, the network ACL // must not be the default network ACL for any VPCs, and the network ACL must not be attached to any subnets. func (vpc *VpcV1) DeleteNetworkACL(deleteNetworkACLOptions *DeleteNetworkACLOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteNetworkACLWithContext(context.Background(), deleteNetworkACLOptions) + response, err = vpc.DeleteNetworkACLWithContext(context.Background(), deleteNetworkACLOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteNetworkACLWithContext is an alternate form of the DeleteNetworkACL method which supports a Context parameter func (vpc *VpcV1) DeleteNetworkACLWithContext(ctx context.Context, deleteNetworkACLOptions *DeleteNetworkACLOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteNetworkACLOptions, "deleteNetworkACLOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteNetworkACLOptions, "deleteNetworkACLOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -18338,6 +20928,7 @@ func (vpc *VpcV1) DeleteNetworkACLWithContext(ctx context.Context, deleteNetwork builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/network_acls/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -18355,10 +20946,16 @@ func (vpc *VpcV1) DeleteNetworkACLWithContext(ctx context.Context, deleteNetwork request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_network_acl", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -18366,17 +20963,21 @@ func (vpc *VpcV1) DeleteNetworkACLWithContext(ctx context.Context, deleteNetwork // GetNetworkACL : Retrieve a network ACL // This request retrieves a single network ACL specified by the identifier in the URL. func (vpc *VpcV1) GetNetworkACL(getNetworkACLOptions *GetNetworkACLOptions) (result *NetworkACL, response *core.DetailedResponse, err error) { - return vpc.GetNetworkACLWithContext(context.Background(), getNetworkACLOptions) + result, response, err = vpc.GetNetworkACLWithContext(context.Background(), getNetworkACLOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetNetworkACLWithContext is an alternate form of the GetNetworkACL method which supports a Context parameter func (vpc *VpcV1) GetNetworkACLWithContext(ctx context.Context, getNetworkACLOptions *GetNetworkACLOptions) (result *NetworkACL, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getNetworkACLOptions, "getNetworkACLOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getNetworkACLOptions, "getNetworkACLOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -18389,6 +20990,7 @@ func (vpc *VpcV1) GetNetworkACLWithContext(ctx context.Context, getNetworkACLOpt builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/network_acls/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -18407,17 +21009,21 @@ func (vpc *VpcV1) GetNetworkACLWithContext(ctx context.Context, getNetworkACLOpt request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_network_acl", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACL) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -18429,17 +21035,21 @@ func (vpc *VpcV1) GetNetworkACLWithContext(ctx context.Context, getNetworkACLOpt // UpdateNetworkACL : Update a network ACL // This request updates a network ACL's name. func (vpc *VpcV1) UpdateNetworkACL(updateNetworkACLOptions *UpdateNetworkACLOptions) (result *NetworkACL, response *core.DetailedResponse, err error) { - return vpc.UpdateNetworkACLWithContext(context.Background(), updateNetworkACLOptions) + result, response, err = vpc.UpdateNetworkACLWithContext(context.Background(), updateNetworkACLOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateNetworkACLWithContext is an alternate form of the UpdateNetworkACL method which supports a Context parameter func (vpc *VpcV1) UpdateNetworkACLWithContext(ctx context.Context, updateNetworkACLOptions *UpdateNetworkACLOptions) (result *NetworkACL, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateNetworkACLOptions, "updateNetworkACLOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateNetworkACLOptions, "updateNetworkACLOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -18452,6 +21062,7 @@ func (vpc *VpcV1) UpdateNetworkACLWithContext(ctx context.Context, updateNetwork builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/network_acls/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -18471,22 +21082,27 @@ func (vpc *VpcV1) UpdateNetworkACLWithContext(ctx context.Context, updateNetwork _, err = builder.SetBodyContentJSON(updateNetworkACLOptions.NetworkACLPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_network_acl", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACL) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -18499,17 +21115,21 @@ func (vpc *VpcV1) UpdateNetworkACLWithContext(ctx context.Context, updateNetwork // This request lists all rules for a network ACL. These rules can allow or deny traffic between a source CIDR block and // a destination CIDR block over a particular protocol and port range. func (vpc *VpcV1) ListNetworkACLRules(listNetworkACLRulesOptions *ListNetworkACLRulesOptions) (result *NetworkACLRuleCollection, response *core.DetailedResponse, err error) { - return vpc.ListNetworkACLRulesWithContext(context.Background(), listNetworkACLRulesOptions) + result, response, err = vpc.ListNetworkACLRulesWithContext(context.Background(), listNetworkACLRulesOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListNetworkACLRulesWithContext is an alternate form of the ListNetworkACLRules method which supports a Context parameter func (vpc *VpcV1) ListNetworkACLRulesWithContext(ctx context.Context, listNetworkACLRulesOptions *ListNetworkACLRulesOptions) (result *NetworkACLRuleCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listNetworkACLRulesOptions, "listNetworkACLRulesOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listNetworkACLRulesOptions, "listNetworkACLRulesOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -18522,6 +21142,7 @@ func (vpc *VpcV1) ListNetworkACLRulesWithContext(ctx context.Context, listNetwor builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/network_acls/{network_acl_id}/rules`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -18549,17 +21170,21 @@ func (vpc *VpcV1) ListNetworkACLRulesWithContext(ctx context.Context, listNetwor request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_network_acl_rules", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACLRuleCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -18572,17 +21197,21 @@ func (vpc *VpcV1) ListNetworkACLRulesWithContext(ctx context.Context, listNetwor // This request creates a new rule from a network ACL rule prototype object. The prototype object is structured in the // same way as a retrieved rule, and contains the information necessary to create the new rule. func (vpc *VpcV1) CreateNetworkACLRule(createNetworkACLRuleOptions *CreateNetworkACLRuleOptions) (result NetworkACLRuleIntf, response *core.DetailedResponse, err error) { - return vpc.CreateNetworkACLRuleWithContext(context.Background(), createNetworkACLRuleOptions) + result, response, err = vpc.CreateNetworkACLRuleWithContext(context.Background(), createNetworkACLRuleOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateNetworkACLRuleWithContext is an alternate form of the CreateNetworkACLRule method which supports a Context parameter func (vpc *VpcV1) CreateNetworkACLRuleWithContext(ctx context.Context, createNetworkACLRuleOptions *CreateNetworkACLRuleOptions) (result NetworkACLRuleIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createNetworkACLRuleOptions, "createNetworkACLRuleOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createNetworkACLRuleOptions, "createNetworkACLRuleOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -18595,6 +21224,7 @@ func (vpc *VpcV1) CreateNetworkACLRuleWithContext(ctx context.Context, createNet builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/network_acls/{network_acl_id}/rules`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -18614,22 +21244,27 @@ func (vpc *VpcV1) CreateNetworkACLRuleWithContext(ctx context.Context, createNet _, err = builder.SetBodyContentJSON(createNetworkACLRuleOptions.NetworkACLRulePrototype) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_network_acl_rule", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACLRule) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -18641,17 +21276,21 @@ func (vpc *VpcV1) CreateNetworkACLRuleWithContext(ctx context.Context, createNet // DeleteNetworkACLRule : Delete a network ACL rule // This request deletes a rule. This operation cannot be reversed. func (vpc *VpcV1) DeleteNetworkACLRule(deleteNetworkACLRuleOptions *DeleteNetworkACLRuleOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteNetworkACLRuleWithContext(context.Background(), deleteNetworkACLRuleOptions) + response, err = vpc.DeleteNetworkACLRuleWithContext(context.Background(), deleteNetworkACLRuleOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteNetworkACLRuleWithContext is an alternate form of the DeleteNetworkACLRule method which supports a Context parameter func (vpc *VpcV1) DeleteNetworkACLRuleWithContext(ctx context.Context, deleteNetworkACLRuleOptions *DeleteNetworkACLRuleOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteNetworkACLRuleOptions, "deleteNetworkACLRuleOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteNetworkACLRuleOptions, "deleteNetworkACLRuleOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -18665,6 +21304,7 @@ func (vpc *VpcV1) DeleteNetworkACLRuleWithContext(ctx context.Context, deleteNet builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/network_acls/{network_acl_id}/rules/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -18682,10 +21322,16 @@ func (vpc *VpcV1) DeleteNetworkACLRuleWithContext(ctx context.Context, deleteNet request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_network_acl_rule", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -18693,17 +21339,21 @@ func (vpc *VpcV1) DeleteNetworkACLRuleWithContext(ctx context.Context, deleteNet // GetNetworkACLRule : Retrieve a network ACL rule // This request retrieves a single rule specified by the identifier in the URL. func (vpc *VpcV1) GetNetworkACLRule(getNetworkACLRuleOptions *GetNetworkACLRuleOptions) (result NetworkACLRuleIntf, response *core.DetailedResponse, err error) { - return vpc.GetNetworkACLRuleWithContext(context.Background(), getNetworkACLRuleOptions) + result, response, err = vpc.GetNetworkACLRuleWithContext(context.Background(), getNetworkACLRuleOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetNetworkACLRuleWithContext is an alternate form of the GetNetworkACLRule method which supports a Context parameter func (vpc *VpcV1) GetNetworkACLRuleWithContext(ctx context.Context, getNetworkACLRuleOptions *GetNetworkACLRuleOptions) (result NetworkACLRuleIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getNetworkACLRuleOptions, "getNetworkACLRuleOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getNetworkACLRuleOptions, "getNetworkACLRuleOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -18717,6 +21367,7 @@ func (vpc *VpcV1) GetNetworkACLRuleWithContext(ctx context.Context, getNetworkAC builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/network_acls/{network_acl_id}/rules/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -18735,17 +21386,21 @@ func (vpc *VpcV1) GetNetworkACLRuleWithContext(ctx context.Context, getNetworkAC request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_network_acl_rule", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACLRule) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -18758,17 +21413,21 @@ func (vpc *VpcV1) GetNetworkACLRuleWithContext(ctx context.Context, getNetworkAC // This request updates a rule with the information in a provided rule patch. The rule patch object contains only the // information to be updated. The request will fail if the information is not applicable to the rule's protocol. func (vpc *VpcV1) UpdateNetworkACLRule(updateNetworkACLRuleOptions *UpdateNetworkACLRuleOptions) (result NetworkACLRuleIntf, response *core.DetailedResponse, err error) { - return vpc.UpdateNetworkACLRuleWithContext(context.Background(), updateNetworkACLRuleOptions) + result, response, err = vpc.UpdateNetworkACLRuleWithContext(context.Background(), updateNetworkACLRuleOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateNetworkACLRuleWithContext is an alternate form of the UpdateNetworkACLRule method which supports a Context parameter func (vpc *VpcV1) UpdateNetworkACLRuleWithContext(ctx context.Context, updateNetworkACLRuleOptions *UpdateNetworkACLRuleOptions) (result NetworkACLRuleIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateNetworkACLRuleOptions, "updateNetworkACLRuleOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateNetworkACLRuleOptions, "updateNetworkACLRuleOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -18782,6 +21441,7 @@ func (vpc *VpcV1) UpdateNetworkACLRuleWithContext(ctx context.Context, updateNet builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/network_acls/{network_acl_id}/rules/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -18801,22 +21461,27 @@ func (vpc *VpcV1) UpdateNetworkACLRuleWithContext(ctx context.Context, updateNet _, err = builder.SetBodyContentJSON(updateNetworkACLRuleOptions.NetworkACLRulePatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_network_acl_rule", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACLRule) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -18831,13 +21496,16 @@ func (vpc *VpcV1) UpdateNetworkACLRuleWithContext(ctx context.Context, updateNet // groups define which traffic the security group permits. Security group rules are stateful such that reverse traffic // in response to allowed traffic is automatically permitted. func (vpc *VpcV1) ListSecurityGroups(listSecurityGroupsOptions *ListSecurityGroupsOptions) (result *SecurityGroupCollection, response *core.DetailedResponse, err error) { - return vpc.ListSecurityGroupsWithContext(context.Background(), listSecurityGroupsOptions) + result, response, err = vpc.ListSecurityGroupsWithContext(context.Background(), listSecurityGroupsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListSecurityGroupsWithContext is an alternate form of the ListSecurityGroups method which supports a Context parameter func (vpc *VpcV1) ListSecurityGroupsWithContext(ctx context.Context, listSecurityGroupsOptions *ListSecurityGroupsOptions) (result *SecurityGroupCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listSecurityGroupsOptions, "listSecurityGroupsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -18846,6 +21514,7 @@ func (vpc *VpcV1) ListSecurityGroupsWithContext(ctx context.Context, listSecurit builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -18882,17 +21551,21 @@ func (vpc *VpcV1) ListSecurityGroupsWithContext(ctx context.Context, listSecurit request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_security_groups", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -18907,17 +21580,21 @@ func (vpc *VpcV1) ListSecurityGroupsWithContext(ctx context.Context, listSecurit // group. If security group rules are included in the prototype object, those rules will be added to the security group. // Each security group is scoped to one VPC. Only resources in that VPC can be added to the security group. func (vpc *VpcV1) CreateSecurityGroup(createSecurityGroupOptions *CreateSecurityGroupOptions) (result *SecurityGroup, response *core.DetailedResponse, err error) { - return vpc.CreateSecurityGroupWithContext(context.Background(), createSecurityGroupOptions) + result, response, err = vpc.CreateSecurityGroupWithContext(context.Background(), createSecurityGroupOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateSecurityGroupWithContext is an alternate form of the CreateSecurityGroup method which supports a Context parameter func (vpc *VpcV1) CreateSecurityGroupWithContext(ctx context.Context, createSecurityGroupOptions *CreateSecurityGroupOptions) (result *SecurityGroup, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createSecurityGroupOptions, "createSecurityGroupOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createSecurityGroupOptions, "createSecurityGroupOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -18926,6 +21603,7 @@ func (vpc *VpcV1) CreateSecurityGroupWithContext(ctx context.Context, createSecu builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -18958,22 +21636,27 @@ func (vpc *VpcV1) CreateSecurityGroupWithContext(ctx context.Context, createSecu } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_security_group", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroup) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -18986,17 +21669,21 @@ func (vpc *VpcV1) CreateSecurityGroupWithContext(ctx context.Context, createSecu // This request deletes a security group. A security group cannot be deleted if it is referenced by any security group // targets or rules. Additionally, a VPC's default security group cannot be deleted. This operation cannot be reversed. func (vpc *VpcV1) DeleteSecurityGroup(deleteSecurityGroupOptions *DeleteSecurityGroupOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteSecurityGroupWithContext(context.Background(), deleteSecurityGroupOptions) + response, err = vpc.DeleteSecurityGroupWithContext(context.Background(), deleteSecurityGroupOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteSecurityGroupWithContext is an alternate form of the DeleteSecurityGroup method which supports a Context parameter func (vpc *VpcV1) DeleteSecurityGroupWithContext(ctx context.Context, deleteSecurityGroupOptions *DeleteSecurityGroupOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteSecurityGroupOptions, "deleteSecurityGroupOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteSecurityGroupOptions, "deleteSecurityGroupOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -19009,6 +21696,7 @@ func (vpc *VpcV1) DeleteSecurityGroupWithContext(ctx context.Context, deleteSecu builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -19026,10 +21714,16 @@ func (vpc *VpcV1) DeleteSecurityGroupWithContext(ctx context.Context, deleteSecu request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_security_group", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -19037,17 +21731,21 @@ func (vpc *VpcV1) DeleteSecurityGroupWithContext(ctx context.Context, deleteSecu // GetSecurityGroup : Retrieve a security group // This request retrieves a single security group specified by the identifier in the URL path. func (vpc *VpcV1) GetSecurityGroup(getSecurityGroupOptions *GetSecurityGroupOptions) (result *SecurityGroup, response *core.DetailedResponse, err error) { - return vpc.GetSecurityGroupWithContext(context.Background(), getSecurityGroupOptions) + result, response, err = vpc.GetSecurityGroupWithContext(context.Background(), getSecurityGroupOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetSecurityGroupWithContext is an alternate form of the GetSecurityGroup method which supports a Context parameter func (vpc *VpcV1) GetSecurityGroupWithContext(ctx context.Context, getSecurityGroupOptions *GetSecurityGroupOptions) (result *SecurityGroup, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getSecurityGroupOptions, "getSecurityGroupOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getSecurityGroupOptions, "getSecurityGroupOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -19060,6 +21758,7 @@ func (vpc *VpcV1) GetSecurityGroupWithContext(ctx context.Context, getSecurityGr builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -19078,17 +21777,21 @@ func (vpc *VpcV1) GetSecurityGroupWithContext(ctx context.Context, getSecurityGr request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_security_group", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroup) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -19102,17 +21805,21 @@ func (vpc *VpcV1) GetSecurityGroupWithContext(ctx context.Context, getSecurityGr // group patch object is structured in the same way as a retrieved security group and contains only the information to // be updated. func (vpc *VpcV1) UpdateSecurityGroup(updateSecurityGroupOptions *UpdateSecurityGroupOptions) (result *SecurityGroup, response *core.DetailedResponse, err error) { - return vpc.UpdateSecurityGroupWithContext(context.Background(), updateSecurityGroupOptions) + result, response, err = vpc.UpdateSecurityGroupWithContext(context.Background(), updateSecurityGroupOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateSecurityGroupWithContext is an alternate form of the UpdateSecurityGroup method which supports a Context parameter func (vpc *VpcV1) UpdateSecurityGroupWithContext(ctx context.Context, updateSecurityGroupOptions *UpdateSecurityGroupOptions) (result *SecurityGroup, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateSecurityGroupOptions, "updateSecurityGroupOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateSecurityGroupOptions, "updateSecurityGroupOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -19125,6 +21832,7 @@ func (vpc *VpcV1) UpdateSecurityGroupWithContext(ctx context.Context, updateSecu builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -19144,22 +21852,27 @@ func (vpc *VpcV1) UpdateSecurityGroupWithContext(ctx context.Context, updateSecu _, err = builder.SetBodyContentJSON(updateSecurityGroupOptions.SecurityGroupPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_security_group", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroup) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -19173,17 +21886,21 @@ func (vpc *VpcV1) UpdateSecurityGroupWithContext(ctx context.Context, updateSecu // Security group rules are stateful, such that reverse traffic in response to allowed traffic is automatically // permitted. func (vpc *VpcV1) ListSecurityGroupRules(listSecurityGroupRulesOptions *ListSecurityGroupRulesOptions) (result *SecurityGroupRuleCollection, response *core.DetailedResponse, err error) { - return vpc.ListSecurityGroupRulesWithContext(context.Background(), listSecurityGroupRulesOptions) + result, response, err = vpc.ListSecurityGroupRulesWithContext(context.Background(), listSecurityGroupRulesOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListSecurityGroupRulesWithContext is an alternate form of the ListSecurityGroupRules method which supports a Context parameter func (vpc *VpcV1) ListSecurityGroupRulesWithContext(ctx context.Context, listSecurityGroupRulesOptions *ListSecurityGroupRulesOptions) (result *SecurityGroupRuleCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listSecurityGroupRulesOptions, "listSecurityGroupRulesOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listSecurityGroupRulesOptions, "listSecurityGroupRulesOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -19196,6 +21913,7 @@ func (vpc *VpcV1) ListSecurityGroupRulesWithContext(ctx context.Context, listSec builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/rules`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -19214,17 +21932,21 @@ func (vpc *VpcV1) ListSecurityGroupRulesWithContext(ctx context.Context, listSec request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_security_group_rules", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupRuleCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -19241,17 +21963,21 @@ func (vpc *VpcV1) ListSecurityGroupRulesWithContext(ctx context.Context, listSec // that reverse traffic in response to allowed traffic is automatically permitted. A rule allowing inbound TCP traffic // on port 80 also allows outbound TCP traffic on port 80 without the need for an additional rule. func (vpc *VpcV1) CreateSecurityGroupRule(createSecurityGroupRuleOptions *CreateSecurityGroupRuleOptions) (result SecurityGroupRuleIntf, response *core.DetailedResponse, err error) { - return vpc.CreateSecurityGroupRuleWithContext(context.Background(), createSecurityGroupRuleOptions) + result, response, err = vpc.CreateSecurityGroupRuleWithContext(context.Background(), createSecurityGroupRuleOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateSecurityGroupRuleWithContext is an alternate form of the CreateSecurityGroupRule method which supports a Context parameter func (vpc *VpcV1) CreateSecurityGroupRuleWithContext(ctx context.Context, createSecurityGroupRuleOptions *CreateSecurityGroupRuleOptions) (result SecurityGroupRuleIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createSecurityGroupRuleOptions, "createSecurityGroupRuleOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createSecurityGroupRuleOptions, "createSecurityGroupRuleOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -19264,6 +21990,7 @@ func (vpc *VpcV1) CreateSecurityGroupRuleWithContext(ctx context.Context, create builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/rules`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -19283,22 +22010,27 @@ func (vpc *VpcV1) CreateSecurityGroupRuleWithContext(ctx context.Context, create _, err = builder.SetBodyContentJSON(createSecurityGroupRuleOptions.SecurityGroupRulePrototype) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_security_group_rule", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupRule) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -19311,17 +22043,21 @@ func (vpc *VpcV1) CreateSecurityGroupRuleWithContext(ctx context.Context, create // This request deletes a security group rule. This operation cannot be reversed. Removing a security group rule will // not end existing connections allowed by that rule. func (vpc *VpcV1) DeleteSecurityGroupRule(deleteSecurityGroupRuleOptions *DeleteSecurityGroupRuleOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteSecurityGroupRuleWithContext(context.Background(), deleteSecurityGroupRuleOptions) + response, err = vpc.DeleteSecurityGroupRuleWithContext(context.Background(), deleteSecurityGroupRuleOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteSecurityGroupRuleWithContext is an alternate form of the DeleteSecurityGroupRule method which supports a Context parameter func (vpc *VpcV1) DeleteSecurityGroupRuleWithContext(ctx context.Context, deleteSecurityGroupRuleOptions *DeleteSecurityGroupRuleOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteSecurityGroupRuleOptions, "deleteSecurityGroupRuleOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteSecurityGroupRuleOptions, "deleteSecurityGroupRuleOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -19335,6 +22071,7 @@ func (vpc *VpcV1) DeleteSecurityGroupRuleWithContext(ctx context.Context, delete builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/rules/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -19352,10 +22089,16 @@ func (vpc *VpcV1) DeleteSecurityGroupRuleWithContext(ctx context.Context, delete request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_security_group_rule", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -19363,17 +22106,21 @@ func (vpc *VpcV1) DeleteSecurityGroupRuleWithContext(ctx context.Context, delete // GetSecurityGroupRule : Retrieve a security group rule // This request retrieves a single security group rule specified by the identifier in the URL path. func (vpc *VpcV1) GetSecurityGroupRule(getSecurityGroupRuleOptions *GetSecurityGroupRuleOptions) (result SecurityGroupRuleIntf, response *core.DetailedResponse, err error) { - return vpc.GetSecurityGroupRuleWithContext(context.Background(), getSecurityGroupRuleOptions) + result, response, err = vpc.GetSecurityGroupRuleWithContext(context.Background(), getSecurityGroupRuleOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetSecurityGroupRuleWithContext is an alternate form of the GetSecurityGroupRule method which supports a Context parameter func (vpc *VpcV1) GetSecurityGroupRuleWithContext(ctx context.Context, getSecurityGroupRuleOptions *GetSecurityGroupRuleOptions) (result SecurityGroupRuleIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getSecurityGroupRuleOptions, "getSecurityGroupRuleOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getSecurityGroupRuleOptions, "getSecurityGroupRuleOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -19387,6 +22134,7 @@ func (vpc *VpcV1) GetSecurityGroupRuleWithContext(ctx context.Context, getSecuri builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/rules/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -19405,17 +22153,21 @@ func (vpc *VpcV1) GetSecurityGroupRuleWithContext(ctx context.Context, getSecuri request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_security_group_rule", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupRule) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -19429,17 +22181,21 @@ func (vpc *VpcV1) GetSecurityGroupRuleWithContext(ctx context.Context, getSecuri // object contains only the information to be updated. The request will fail if the information is not applicable to the // rule's protocol. func (vpc *VpcV1) UpdateSecurityGroupRule(updateSecurityGroupRuleOptions *UpdateSecurityGroupRuleOptions) (result SecurityGroupRuleIntf, response *core.DetailedResponse, err error) { - return vpc.UpdateSecurityGroupRuleWithContext(context.Background(), updateSecurityGroupRuleOptions) + result, response, err = vpc.UpdateSecurityGroupRuleWithContext(context.Background(), updateSecurityGroupRuleOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateSecurityGroupRuleWithContext is an alternate form of the UpdateSecurityGroupRule method which supports a Context parameter func (vpc *VpcV1) UpdateSecurityGroupRuleWithContext(ctx context.Context, updateSecurityGroupRuleOptions *UpdateSecurityGroupRuleOptions) (result SecurityGroupRuleIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateSecurityGroupRuleOptions, "updateSecurityGroupRuleOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateSecurityGroupRuleOptions, "updateSecurityGroupRuleOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -19453,6 +22209,7 @@ func (vpc *VpcV1) UpdateSecurityGroupRuleWithContext(ctx context.Context, update builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/rules/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -19472,22 +22229,27 @@ func (vpc *VpcV1) UpdateSecurityGroupRuleWithContext(ctx context.Context, update _, err = builder.SetBodyContentJSON(updateSecurityGroupRuleOptions.SecurityGroupRulePatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_security_group_rule", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupRule) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -19500,17 +22262,21 @@ func (vpc *VpcV1) UpdateSecurityGroupRuleWithContext(ctx context.Context, update // This request lists all targets associated with a security group, to which the rules in the security group are // applied. func (vpc *VpcV1) ListSecurityGroupTargets(listSecurityGroupTargetsOptions *ListSecurityGroupTargetsOptions) (result *SecurityGroupTargetCollection, response *core.DetailedResponse, err error) { - return vpc.ListSecurityGroupTargetsWithContext(context.Background(), listSecurityGroupTargetsOptions) + result, response, err = vpc.ListSecurityGroupTargetsWithContext(context.Background(), listSecurityGroupTargetsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListSecurityGroupTargetsWithContext is an alternate form of the ListSecurityGroupTargets method which supports a Context parameter func (vpc *VpcV1) ListSecurityGroupTargetsWithContext(ctx context.Context, listSecurityGroupTargetsOptions *ListSecurityGroupTargetsOptions) (result *SecurityGroupTargetCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listSecurityGroupTargetsOptions, "listSecurityGroupTargetsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listSecurityGroupTargetsOptions, "listSecurityGroupTargetsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -19523,6 +22289,7 @@ func (vpc *VpcV1) ListSecurityGroupTargetsWithContext(ctx context.Context, listS builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/targets`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -19547,17 +22314,21 @@ func (vpc *VpcV1) ListSecurityGroupTargetsWithContext(ctx context.Context, listS request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_security_group_targets", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupTargetCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -19580,17 +22351,21 @@ func (vpc *VpcV1) ListSecurityGroupTargetsWithContext(ctx context.Context, listS // Security groups are stateful, so any changes to a target's security groups are applied to new connections. Existing // connections are not affected. func (vpc *VpcV1) DeleteSecurityGroupTargetBinding(deleteSecurityGroupTargetBindingOptions *DeleteSecurityGroupTargetBindingOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteSecurityGroupTargetBindingWithContext(context.Background(), deleteSecurityGroupTargetBindingOptions) + response, err = vpc.DeleteSecurityGroupTargetBindingWithContext(context.Background(), deleteSecurityGroupTargetBindingOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteSecurityGroupTargetBindingWithContext is an alternate form of the DeleteSecurityGroupTargetBinding method which supports a Context parameter func (vpc *VpcV1) DeleteSecurityGroupTargetBindingWithContext(ctx context.Context, deleteSecurityGroupTargetBindingOptions *DeleteSecurityGroupTargetBindingOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteSecurityGroupTargetBindingOptions, "deleteSecurityGroupTargetBindingOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteSecurityGroupTargetBindingOptions, "deleteSecurityGroupTargetBindingOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -19604,6 +22379,7 @@ func (vpc *VpcV1) DeleteSecurityGroupTargetBindingWithContext(ctx context.Contex builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/targets/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -19621,10 +22397,16 @@ func (vpc *VpcV1) DeleteSecurityGroupTargetBindingWithContext(ctx context.Contex request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_security_group_target_binding", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -19633,17 +22415,21 @@ func (vpc *VpcV1) DeleteSecurityGroupTargetBindingWithContext(ctx context.Contex // This request retrieves a single target specified by the identifier in the URL path. The target must be an existing // target of the security group. func (vpc *VpcV1) GetSecurityGroupTarget(getSecurityGroupTargetOptions *GetSecurityGroupTargetOptions) (result SecurityGroupTargetReferenceIntf, response *core.DetailedResponse, err error) { - return vpc.GetSecurityGroupTargetWithContext(context.Background(), getSecurityGroupTargetOptions) + result, response, err = vpc.GetSecurityGroupTargetWithContext(context.Background(), getSecurityGroupTargetOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetSecurityGroupTargetWithContext is an alternate form of the GetSecurityGroupTarget method which supports a Context parameter func (vpc *VpcV1) GetSecurityGroupTargetWithContext(ctx context.Context, getSecurityGroupTargetOptions *GetSecurityGroupTargetOptions) (result SecurityGroupTargetReferenceIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getSecurityGroupTargetOptions, "getSecurityGroupTargetOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getSecurityGroupTargetOptions, "getSecurityGroupTargetOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -19657,6 +22443,7 @@ func (vpc *VpcV1) GetSecurityGroupTargetWithContext(ctx context.Context, getSecu builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/targets/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -19675,17 +22462,21 @@ func (vpc *VpcV1) GetSecurityGroupTargetWithContext(ctx context.Context, getSecu request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_security_group_target", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupTargetReference) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -19707,17 +22498,21 @@ func (vpc *VpcV1) GetSecurityGroupTargetWithContext(ctx context.Context, getSecu // When a target is added to a security group, the security group rules are applied to the target. A request body is not // required, and if provided, is ignored. func (vpc *VpcV1) CreateSecurityGroupTargetBinding(createSecurityGroupTargetBindingOptions *CreateSecurityGroupTargetBindingOptions) (result SecurityGroupTargetReferenceIntf, response *core.DetailedResponse, err error) { - return vpc.CreateSecurityGroupTargetBindingWithContext(context.Background(), createSecurityGroupTargetBindingOptions) + result, response, err = vpc.CreateSecurityGroupTargetBindingWithContext(context.Background(), createSecurityGroupTargetBindingOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateSecurityGroupTargetBindingWithContext is an alternate form of the CreateSecurityGroupTargetBinding method which supports a Context parameter func (vpc *VpcV1) CreateSecurityGroupTargetBindingWithContext(ctx context.Context, createSecurityGroupTargetBindingOptions *CreateSecurityGroupTargetBindingOptions) (result SecurityGroupTargetReferenceIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createSecurityGroupTargetBindingOptions, "createSecurityGroupTargetBindingOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createSecurityGroupTargetBindingOptions, "createSecurityGroupTargetBindingOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -19731,6 +22526,7 @@ func (vpc *VpcV1) CreateSecurityGroupTargetBindingWithContext(ctx context.Contex builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/targets/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -19749,17 +22545,21 @@ func (vpc *VpcV1) CreateSecurityGroupTargetBindingWithContext(ctx context.Contex request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_security_group_target_binding", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupTargetReference) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -19771,13 +22571,16 @@ func (vpc *VpcV1) CreateSecurityGroupTargetBindingWithContext(ctx context.Contex // ListIkePolicies : List all IKE policies // This request lists all IKE policies in the region. func (vpc *VpcV1) ListIkePolicies(listIkePoliciesOptions *ListIkePoliciesOptions) (result *IkePolicyCollection, response *core.DetailedResponse, err error) { - return vpc.ListIkePoliciesWithContext(context.Background(), listIkePoliciesOptions) + result, response, err = vpc.ListIkePoliciesWithContext(context.Background(), listIkePoliciesOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListIkePoliciesWithContext is an alternate form of the ListIkePolicies method which supports a Context parameter func (vpc *VpcV1) ListIkePoliciesWithContext(ctx context.Context, listIkePoliciesOptions *ListIkePoliciesOptions) (result *IkePolicyCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listIkePoliciesOptions, "listIkePoliciesOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -19786,6 +22589,7 @@ func (vpc *VpcV1) ListIkePoliciesWithContext(ctx context.Context, listIkePolicie builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ike_policies`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -19810,17 +22614,21 @@ func (vpc *VpcV1) ListIkePoliciesWithContext(ctx context.Context, listIkePolicie request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_ike_policies", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIkePolicyCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -19832,17 +22640,21 @@ func (vpc *VpcV1) ListIkePoliciesWithContext(ctx context.Context, listIkePolicie // CreateIkePolicy : Create an IKE policy // This request creates a new IKE policy. func (vpc *VpcV1) CreateIkePolicy(createIkePolicyOptions *CreateIkePolicyOptions) (result *IkePolicy, response *core.DetailedResponse, err error) { - return vpc.CreateIkePolicyWithContext(context.Background(), createIkePolicyOptions) + result, response, err = vpc.CreateIkePolicyWithContext(context.Background(), createIkePolicyOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateIkePolicyWithContext is an alternate form of the CreateIkePolicy method which supports a Context parameter func (vpc *VpcV1) CreateIkePolicyWithContext(ctx context.Context, createIkePolicyOptions *CreateIkePolicyOptions) (result *IkePolicy, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createIkePolicyOptions, "createIkePolicyOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createIkePolicyOptions, "createIkePolicyOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -19851,6 +22663,7 @@ func (vpc *VpcV1) CreateIkePolicyWithContext(ctx context.Context, createIkePolic builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ike_policies`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -19892,22 +22705,27 @@ func (vpc *VpcV1) CreateIkePolicyWithContext(ctx context.Context, createIkePolic } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_ike_policy", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIkePolicy) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -19920,17 +22738,21 @@ func (vpc *VpcV1) CreateIkePolicyWithContext(ctx context.Context, createIkePolic // This request deletes an IKE policy. This operation cannot be reversed. For this request to succeed, there must not be // any VPN gateway connections using this policy. func (vpc *VpcV1) DeleteIkePolicy(deleteIkePolicyOptions *DeleteIkePolicyOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteIkePolicyWithContext(context.Background(), deleteIkePolicyOptions) + response, err = vpc.DeleteIkePolicyWithContext(context.Background(), deleteIkePolicyOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteIkePolicyWithContext is an alternate form of the DeleteIkePolicy method which supports a Context parameter func (vpc *VpcV1) DeleteIkePolicyWithContext(ctx context.Context, deleteIkePolicyOptions *DeleteIkePolicyOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteIkePolicyOptions, "deleteIkePolicyOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteIkePolicyOptions, "deleteIkePolicyOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -19943,6 +22765,7 @@ func (vpc *VpcV1) DeleteIkePolicyWithContext(ctx context.Context, deleteIkePolic builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ike_policies/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -19960,10 +22783,16 @@ func (vpc *VpcV1) DeleteIkePolicyWithContext(ctx context.Context, deleteIkePolic request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_ike_policy", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -19971,17 +22800,21 @@ func (vpc *VpcV1) DeleteIkePolicyWithContext(ctx context.Context, deleteIkePolic // GetIkePolicy : Retrieve an IKE policy // This request retrieves a single IKE policy specified by the identifier in the URL. func (vpc *VpcV1) GetIkePolicy(getIkePolicyOptions *GetIkePolicyOptions) (result *IkePolicy, response *core.DetailedResponse, err error) { - return vpc.GetIkePolicyWithContext(context.Background(), getIkePolicyOptions) + result, response, err = vpc.GetIkePolicyWithContext(context.Background(), getIkePolicyOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetIkePolicyWithContext is an alternate form of the GetIkePolicy method which supports a Context parameter func (vpc *VpcV1) GetIkePolicyWithContext(ctx context.Context, getIkePolicyOptions *GetIkePolicyOptions) (result *IkePolicy, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getIkePolicyOptions, "getIkePolicyOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getIkePolicyOptions, "getIkePolicyOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -19994,6 +22827,7 @@ func (vpc *VpcV1) GetIkePolicyWithContext(ctx context.Context, getIkePolicyOptio builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ike_policies/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -20012,17 +22846,21 @@ func (vpc *VpcV1) GetIkePolicyWithContext(ctx context.Context, getIkePolicyOptio request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_ike_policy", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIkePolicy) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -20034,17 +22872,21 @@ func (vpc *VpcV1) GetIkePolicyWithContext(ctx context.Context, getIkePolicyOptio // UpdateIkePolicy : Update an IKE policy // This request updates the properties of an existing IKE policy. func (vpc *VpcV1) UpdateIkePolicy(updateIkePolicyOptions *UpdateIkePolicyOptions) (result *IkePolicy, response *core.DetailedResponse, err error) { - return vpc.UpdateIkePolicyWithContext(context.Background(), updateIkePolicyOptions) + result, response, err = vpc.UpdateIkePolicyWithContext(context.Background(), updateIkePolicyOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateIkePolicyWithContext is an alternate form of the UpdateIkePolicy method which supports a Context parameter func (vpc *VpcV1) UpdateIkePolicyWithContext(ctx context.Context, updateIkePolicyOptions *UpdateIkePolicyOptions) (result *IkePolicy, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateIkePolicyOptions, "updateIkePolicyOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateIkePolicyOptions, "updateIkePolicyOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -20057,6 +22899,7 @@ func (vpc *VpcV1) UpdateIkePolicyWithContext(ctx context.Context, updateIkePolic builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ike_policies/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -20076,22 +22919,27 @@ func (vpc *VpcV1) UpdateIkePolicyWithContext(ctx context.Context, updateIkePolic _, err = builder.SetBodyContentJSON(updateIkePolicyOptions.IkePolicyPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_ike_policy", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIkePolicy) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -20103,17 +22951,21 @@ func (vpc *VpcV1) UpdateIkePolicyWithContext(ctx context.Context, updateIkePolic // ListIkePolicyConnections : List all VPN gateway connections that use a specified IKE policy // This request lists all VPN gateway connections that use a policy. func (vpc *VpcV1) ListIkePolicyConnections(listIkePolicyConnectionsOptions *ListIkePolicyConnectionsOptions) (result *VPNGatewayConnectionCollection, response *core.DetailedResponse, err error) { - return vpc.ListIkePolicyConnectionsWithContext(context.Background(), listIkePolicyConnectionsOptions) + result, response, err = vpc.ListIkePolicyConnectionsWithContext(context.Background(), listIkePolicyConnectionsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListIkePolicyConnectionsWithContext is an alternate form of the ListIkePolicyConnections method which supports a Context parameter func (vpc *VpcV1) ListIkePolicyConnectionsWithContext(ctx context.Context, listIkePolicyConnectionsOptions *ListIkePolicyConnectionsOptions) (result *VPNGatewayConnectionCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listIkePolicyConnectionsOptions, "listIkePolicyConnectionsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listIkePolicyConnectionsOptions, "listIkePolicyConnectionsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -20126,6 +22978,7 @@ func (vpc *VpcV1) ListIkePolicyConnectionsWithContext(ctx context.Context, listI builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ike_policies/{id}/connections`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -20144,17 +22997,21 @@ func (vpc *VpcV1) ListIkePolicyConnectionsWithContext(ctx context.Context, listI request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_ike_policy_connections", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnectionCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -20166,13 +23023,16 @@ func (vpc *VpcV1) ListIkePolicyConnectionsWithContext(ctx context.Context, listI // ListIpsecPolicies : List all IPsec policies // This request lists all IPsec policies in the region. func (vpc *VpcV1) ListIpsecPolicies(listIpsecPoliciesOptions *ListIpsecPoliciesOptions) (result *IPsecPolicyCollection, response *core.DetailedResponse, err error) { - return vpc.ListIpsecPoliciesWithContext(context.Background(), listIpsecPoliciesOptions) + result, response, err = vpc.ListIpsecPoliciesWithContext(context.Background(), listIpsecPoliciesOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListIpsecPoliciesWithContext is an alternate form of the ListIpsecPolicies method which supports a Context parameter func (vpc *VpcV1) ListIpsecPoliciesWithContext(ctx context.Context, listIpsecPoliciesOptions *ListIpsecPoliciesOptions) (result *IPsecPolicyCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listIpsecPoliciesOptions, "listIpsecPoliciesOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -20181,6 +23041,7 @@ func (vpc *VpcV1) ListIpsecPoliciesWithContext(ctx context.Context, listIpsecPol builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ipsec_policies`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -20205,17 +23066,21 @@ func (vpc *VpcV1) ListIpsecPoliciesWithContext(ctx context.Context, listIpsecPol request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_ipsec_policies", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIPsecPolicyCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -20227,17 +23092,21 @@ func (vpc *VpcV1) ListIpsecPoliciesWithContext(ctx context.Context, listIpsecPol // CreateIpsecPolicy : Create an IPsec policy // This request creates a new IPsec policy. func (vpc *VpcV1) CreateIpsecPolicy(createIpsecPolicyOptions *CreateIpsecPolicyOptions) (result *IPsecPolicy, response *core.DetailedResponse, err error) { - return vpc.CreateIpsecPolicyWithContext(context.Background(), createIpsecPolicyOptions) + result, response, err = vpc.CreateIpsecPolicyWithContext(context.Background(), createIpsecPolicyOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateIpsecPolicyWithContext is an alternate form of the CreateIpsecPolicy method which supports a Context parameter func (vpc *VpcV1) CreateIpsecPolicyWithContext(ctx context.Context, createIpsecPolicyOptions *CreateIpsecPolicyOptions) (result *IPsecPolicy, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createIpsecPolicyOptions, "createIpsecPolicyOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createIpsecPolicyOptions, "createIpsecPolicyOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -20246,6 +23115,7 @@ func (vpc *VpcV1) CreateIpsecPolicyWithContext(ctx context.Context, createIpsecP builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ipsec_policies`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -20284,22 +23154,27 @@ func (vpc *VpcV1) CreateIpsecPolicyWithContext(ctx context.Context, createIpsecP } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_ipsec_policy", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIPsecPolicy) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -20312,17 +23187,21 @@ func (vpc *VpcV1) CreateIpsecPolicyWithContext(ctx context.Context, createIpsecP // This request deletes an IPsec policy. This operation cannot be reversed. For this request to succeed, there must not // be any VPN gateway connections using this policy. func (vpc *VpcV1) DeleteIpsecPolicy(deleteIpsecPolicyOptions *DeleteIpsecPolicyOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteIpsecPolicyWithContext(context.Background(), deleteIpsecPolicyOptions) + response, err = vpc.DeleteIpsecPolicyWithContext(context.Background(), deleteIpsecPolicyOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteIpsecPolicyWithContext is an alternate form of the DeleteIpsecPolicy method which supports a Context parameter func (vpc *VpcV1) DeleteIpsecPolicyWithContext(ctx context.Context, deleteIpsecPolicyOptions *DeleteIpsecPolicyOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteIpsecPolicyOptions, "deleteIpsecPolicyOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteIpsecPolicyOptions, "deleteIpsecPolicyOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -20335,6 +23214,7 @@ func (vpc *VpcV1) DeleteIpsecPolicyWithContext(ctx context.Context, deleteIpsecP builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ipsec_policies/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -20352,10 +23232,16 @@ func (vpc *VpcV1) DeleteIpsecPolicyWithContext(ctx context.Context, deleteIpsecP request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_ipsec_policy", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -20363,17 +23249,21 @@ func (vpc *VpcV1) DeleteIpsecPolicyWithContext(ctx context.Context, deleteIpsecP // GetIpsecPolicy : Retrieve an IPsec policy // This request retrieves a single IPsec policy specified by the identifier in the URL. func (vpc *VpcV1) GetIpsecPolicy(getIpsecPolicyOptions *GetIpsecPolicyOptions) (result *IPsecPolicy, response *core.DetailedResponse, err error) { - return vpc.GetIpsecPolicyWithContext(context.Background(), getIpsecPolicyOptions) + result, response, err = vpc.GetIpsecPolicyWithContext(context.Background(), getIpsecPolicyOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetIpsecPolicyWithContext is an alternate form of the GetIpsecPolicy method which supports a Context parameter func (vpc *VpcV1) GetIpsecPolicyWithContext(ctx context.Context, getIpsecPolicyOptions *GetIpsecPolicyOptions) (result *IPsecPolicy, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getIpsecPolicyOptions, "getIpsecPolicyOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getIpsecPolicyOptions, "getIpsecPolicyOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -20386,6 +23276,7 @@ func (vpc *VpcV1) GetIpsecPolicyWithContext(ctx context.Context, getIpsecPolicyO builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ipsec_policies/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -20404,17 +23295,21 @@ func (vpc *VpcV1) GetIpsecPolicyWithContext(ctx context.Context, getIpsecPolicyO request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_ipsec_policy", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIPsecPolicy) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -20426,17 +23321,21 @@ func (vpc *VpcV1) GetIpsecPolicyWithContext(ctx context.Context, getIpsecPolicyO // UpdateIpsecPolicy : Update an IPsec policy // This request updates the properties of an existing IPsec policy. func (vpc *VpcV1) UpdateIpsecPolicy(updateIpsecPolicyOptions *UpdateIpsecPolicyOptions) (result *IPsecPolicy, response *core.DetailedResponse, err error) { - return vpc.UpdateIpsecPolicyWithContext(context.Background(), updateIpsecPolicyOptions) + result, response, err = vpc.UpdateIpsecPolicyWithContext(context.Background(), updateIpsecPolicyOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateIpsecPolicyWithContext is an alternate form of the UpdateIpsecPolicy method which supports a Context parameter func (vpc *VpcV1) UpdateIpsecPolicyWithContext(ctx context.Context, updateIpsecPolicyOptions *UpdateIpsecPolicyOptions) (result *IPsecPolicy, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateIpsecPolicyOptions, "updateIpsecPolicyOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateIpsecPolicyOptions, "updateIpsecPolicyOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -20449,6 +23348,7 @@ func (vpc *VpcV1) UpdateIpsecPolicyWithContext(ctx context.Context, updateIpsecP builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ipsec_policies/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -20468,22 +23368,27 @@ func (vpc *VpcV1) UpdateIpsecPolicyWithContext(ctx context.Context, updateIpsecP _, err = builder.SetBodyContentJSON(updateIpsecPolicyOptions.IPsecPolicyPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_ipsec_policy", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIPsecPolicy) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -20495,17 +23400,21 @@ func (vpc *VpcV1) UpdateIpsecPolicyWithContext(ctx context.Context, updateIpsecP // ListIpsecPolicyConnections : List all VPN gateway connections that use a specified IPsec policy // This request lists all VPN gateway connections that use a policy. func (vpc *VpcV1) ListIpsecPolicyConnections(listIpsecPolicyConnectionsOptions *ListIpsecPolicyConnectionsOptions) (result *VPNGatewayConnectionCollection, response *core.DetailedResponse, err error) { - return vpc.ListIpsecPolicyConnectionsWithContext(context.Background(), listIpsecPolicyConnectionsOptions) + result, response, err = vpc.ListIpsecPolicyConnectionsWithContext(context.Background(), listIpsecPolicyConnectionsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListIpsecPolicyConnectionsWithContext is an alternate form of the ListIpsecPolicyConnections method which supports a Context parameter func (vpc *VpcV1) ListIpsecPolicyConnectionsWithContext(ctx context.Context, listIpsecPolicyConnectionsOptions *ListIpsecPolicyConnectionsOptions) (result *VPNGatewayConnectionCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listIpsecPolicyConnectionsOptions, "listIpsecPolicyConnectionsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listIpsecPolicyConnectionsOptions, "listIpsecPolicyConnectionsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -20518,6 +23427,7 @@ func (vpc *VpcV1) ListIpsecPolicyConnectionsWithContext(ctx context.Context, lis builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ipsec_policies/{id}/connections`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -20536,17 +23446,21 @@ func (vpc *VpcV1) ListIpsecPolicyConnectionsWithContext(ctx context.Context, lis request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_ipsec_policy_connections", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnectionCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -20558,13 +23472,16 @@ func (vpc *VpcV1) ListIpsecPolicyConnectionsWithContext(ctx context.Context, lis // ListVPNGateways : List all VPN gateways // This request lists all VPN gateways in the region. func (vpc *VpcV1) ListVPNGateways(listVPNGatewaysOptions *ListVPNGatewaysOptions) (result *VPNGatewayCollection, response *core.DetailedResponse, err error) { - return vpc.ListVPNGatewaysWithContext(context.Background(), listVPNGatewaysOptions) + result, response, err = vpc.ListVPNGatewaysWithContext(context.Background(), listVPNGatewaysOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListVPNGatewaysWithContext is an alternate form of the ListVPNGateways method which supports a Context parameter func (vpc *VpcV1) ListVPNGatewaysWithContext(ctx context.Context, listVPNGatewaysOptions *ListVPNGatewaysOptions) (result *VPNGatewayCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listVPNGatewaysOptions, "listVPNGatewaysOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -20573,6 +23490,7 @@ func (vpc *VpcV1) ListVPNGatewaysWithContext(ctx context.Context, listVPNGateway builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -20606,17 +23524,21 @@ func (vpc *VpcV1) ListVPNGatewaysWithContext(ctx context.Context, listVPNGateway request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_vpn_gateways", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -20628,17 +23550,21 @@ func (vpc *VpcV1) ListVPNGatewaysWithContext(ctx context.Context, listVPNGateway // CreateVPNGateway : Create a VPN gateway // This request creates a new VPN gateway. func (vpc *VpcV1) CreateVPNGateway(createVPNGatewayOptions *CreateVPNGatewayOptions) (result VPNGatewayIntf, response *core.DetailedResponse, err error) { - return vpc.CreateVPNGatewayWithContext(context.Background(), createVPNGatewayOptions) + result, response, err = vpc.CreateVPNGatewayWithContext(context.Background(), createVPNGatewayOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateVPNGatewayWithContext is an alternate form of the CreateVPNGateway method which supports a Context parameter func (vpc *VpcV1) CreateVPNGatewayWithContext(ctx context.Context, createVPNGatewayOptions *CreateVPNGatewayOptions) (result VPNGatewayIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createVPNGatewayOptions, "createVPNGatewayOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createVPNGatewayOptions, "createVPNGatewayOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -20647,6 +23573,7 @@ func (vpc *VpcV1) CreateVPNGatewayWithContext(ctx context.Context, createVPNGate builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -20666,22 +23593,27 @@ func (vpc *VpcV1) CreateVPNGatewayWithContext(ctx context.Context, createVPNGate _, err = builder.SetBodyContentJSON(createVPNGatewayOptions.VPNGatewayPrototype) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_vpn_gateway", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGateway) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -20695,17 +23627,21 @@ func (vpc *VpcV1) CreateVPNGatewayWithContext(ctx context.Context, createVPNGate // must not have a `status` of `pending`, and there must not be any VPC routes using the VPN gateway's connections as a // next hop. func (vpc *VpcV1) DeleteVPNGateway(deleteVPNGatewayOptions *DeleteVPNGatewayOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteVPNGatewayWithContext(context.Background(), deleteVPNGatewayOptions) + response, err = vpc.DeleteVPNGatewayWithContext(context.Background(), deleteVPNGatewayOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteVPNGatewayWithContext is an alternate form of the DeleteVPNGateway method which supports a Context parameter func (vpc *VpcV1) DeleteVPNGatewayWithContext(ctx context.Context, deleteVPNGatewayOptions *DeleteVPNGatewayOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteVPNGatewayOptions, "deleteVPNGatewayOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteVPNGatewayOptions, "deleteVPNGatewayOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -20718,6 +23654,7 @@ func (vpc *VpcV1) DeleteVPNGatewayWithContext(ctx context.Context, deleteVPNGate builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -20735,10 +23672,16 @@ func (vpc *VpcV1) DeleteVPNGatewayWithContext(ctx context.Context, deleteVPNGate request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_vpn_gateway", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -20746,17 +23689,21 @@ func (vpc *VpcV1) DeleteVPNGatewayWithContext(ctx context.Context, deleteVPNGate // GetVPNGateway : Retrieve a VPN gateway // This request retrieves a single VPN gateway specified by the identifier in the URL. func (vpc *VpcV1) GetVPNGateway(getVPNGatewayOptions *GetVPNGatewayOptions) (result VPNGatewayIntf, response *core.DetailedResponse, err error) { - return vpc.GetVPNGatewayWithContext(context.Background(), getVPNGatewayOptions) + result, response, err = vpc.GetVPNGatewayWithContext(context.Background(), getVPNGatewayOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetVPNGatewayWithContext is an alternate form of the GetVPNGateway method which supports a Context parameter func (vpc *VpcV1) GetVPNGatewayWithContext(ctx context.Context, getVPNGatewayOptions *GetVPNGatewayOptions) (result VPNGatewayIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getVPNGatewayOptions, "getVPNGatewayOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getVPNGatewayOptions, "getVPNGatewayOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -20769,6 +23716,7 @@ func (vpc *VpcV1) GetVPNGatewayWithContext(ctx context.Context, getVPNGatewayOpt builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -20787,17 +23735,21 @@ func (vpc *VpcV1) GetVPNGatewayWithContext(ctx context.Context, getVPNGatewayOpt request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_vpn_gateway", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGateway) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -20809,17 +23761,21 @@ func (vpc *VpcV1) GetVPNGatewayWithContext(ctx context.Context, getVPNGatewayOpt // UpdateVPNGateway : Update a VPN gateway // This request updates the properties of an existing VPN gateway. func (vpc *VpcV1) UpdateVPNGateway(updateVPNGatewayOptions *UpdateVPNGatewayOptions) (result VPNGatewayIntf, response *core.DetailedResponse, err error) { - return vpc.UpdateVPNGatewayWithContext(context.Background(), updateVPNGatewayOptions) + result, response, err = vpc.UpdateVPNGatewayWithContext(context.Background(), updateVPNGatewayOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateVPNGatewayWithContext is an alternate form of the UpdateVPNGateway method which supports a Context parameter func (vpc *VpcV1) UpdateVPNGatewayWithContext(ctx context.Context, updateVPNGatewayOptions *UpdateVPNGatewayOptions) (result VPNGatewayIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateVPNGatewayOptions, "updateVPNGatewayOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateVPNGatewayOptions, "updateVPNGatewayOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -20832,6 +23788,7 @@ func (vpc *VpcV1) UpdateVPNGatewayWithContext(ctx context.Context, updateVPNGate builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -20851,22 +23808,27 @@ func (vpc *VpcV1) UpdateVPNGatewayWithContext(ctx context.Context, updateVPNGate _, err = builder.SetBodyContentJSON(updateVPNGatewayOptions.VPNGatewayPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_vpn_gateway", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGateway) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -20878,17 +23840,21 @@ func (vpc *VpcV1) UpdateVPNGatewayWithContext(ctx context.Context, updateVPNGate // ListVPNGatewayConnections : List all connections of a VPN gateway // This request lists all connections of a VPN gateway. func (vpc *VpcV1) ListVPNGatewayConnections(listVPNGatewayConnectionsOptions *ListVPNGatewayConnectionsOptions) (result *VPNGatewayConnectionCollection, response *core.DetailedResponse, err error) { - return vpc.ListVPNGatewayConnectionsWithContext(context.Background(), listVPNGatewayConnectionsOptions) + result, response, err = vpc.ListVPNGatewayConnectionsWithContext(context.Background(), listVPNGatewayConnectionsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListVPNGatewayConnectionsWithContext is an alternate form of the ListVPNGatewayConnections method which supports a Context parameter func (vpc *VpcV1) ListVPNGatewayConnectionsWithContext(ctx context.Context, listVPNGatewayConnectionsOptions *ListVPNGatewayConnectionsOptions) (result *VPNGatewayConnectionCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listVPNGatewayConnectionsOptions, "listVPNGatewayConnectionsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listVPNGatewayConnectionsOptions, "listVPNGatewayConnectionsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -20901,6 +23867,7 @@ func (vpc *VpcV1) ListVPNGatewayConnectionsWithContext(ctx context.Context, list builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -20922,17 +23889,21 @@ func (vpc *VpcV1) ListVPNGatewayConnectionsWithContext(ctx context.Context, list request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_vpn_gateway_connections", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnectionCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -20944,17 +23915,21 @@ func (vpc *VpcV1) ListVPNGatewayConnectionsWithContext(ctx context.Context, list // CreateVPNGatewayConnection : Create a connection for a VPN gateway // This request creates a new VPN gateway connection. func (vpc *VpcV1) CreateVPNGatewayConnection(createVPNGatewayConnectionOptions *CreateVPNGatewayConnectionOptions) (result VPNGatewayConnectionIntf, response *core.DetailedResponse, err error) { - return vpc.CreateVPNGatewayConnectionWithContext(context.Background(), createVPNGatewayConnectionOptions) + result, response, err = vpc.CreateVPNGatewayConnectionWithContext(context.Background(), createVPNGatewayConnectionOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateVPNGatewayConnectionWithContext is an alternate form of the CreateVPNGatewayConnection method which supports a Context parameter func (vpc *VpcV1) CreateVPNGatewayConnectionWithContext(ctx context.Context, createVPNGatewayConnectionOptions *CreateVPNGatewayConnectionOptions) (result VPNGatewayConnectionIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createVPNGatewayConnectionOptions, "createVPNGatewayConnectionOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createVPNGatewayConnectionOptions, "createVPNGatewayConnectionOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -20967,6 +23942,7 @@ func (vpc *VpcV1) CreateVPNGatewayConnectionWithContext(ctx context.Context, cre builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -20986,22 +23962,27 @@ func (vpc *VpcV1) CreateVPNGatewayConnectionWithContext(ctx context.Context, cre _, err = builder.SetBodyContentJSON(createVPNGatewayConnectionOptions.VPNGatewayConnectionPrototype) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_vpn_gateway_connection", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -21014,17 +23995,21 @@ func (vpc *VpcV1) CreateVPNGatewayConnectionWithContext(ctx context.Context, cre // This request deletes a VPN gateway connection. This operation cannot be reversed. For this request to succeed, there // must not be VPC routes using this VPN connection as a next hop. func (vpc *VpcV1) DeleteVPNGatewayConnection(deleteVPNGatewayConnectionOptions *DeleteVPNGatewayConnectionOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteVPNGatewayConnectionWithContext(context.Background(), deleteVPNGatewayConnectionOptions) + response, err = vpc.DeleteVPNGatewayConnectionWithContext(context.Background(), deleteVPNGatewayConnectionOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteVPNGatewayConnectionWithContext is an alternate form of the DeleteVPNGatewayConnection method which supports a Context parameter func (vpc *VpcV1) DeleteVPNGatewayConnectionWithContext(ctx context.Context, deleteVPNGatewayConnectionOptions *DeleteVPNGatewayConnectionOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteVPNGatewayConnectionOptions, "deleteVPNGatewayConnectionOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteVPNGatewayConnectionOptions, "deleteVPNGatewayConnectionOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -21038,6 +24023,7 @@ func (vpc *VpcV1) DeleteVPNGatewayConnectionWithContext(ctx context.Context, del builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -21055,10 +24041,16 @@ func (vpc *VpcV1) DeleteVPNGatewayConnectionWithContext(ctx context.Context, del request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_vpn_gateway_connection", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -21066,17 +24058,21 @@ func (vpc *VpcV1) DeleteVPNGatewayConnectionWithContext(ctx context.Context, del // GetVPNGatewayConnection : Retrieve a VPN gateway connection // This request retrieves a single VPN gateway connection specified by the identifier in the URL. func (vpc *VpcV1) GetVPNGatewayConnection(getVPNGatewayConnectionOptions *GetVPNGatewayConnectionOptions) (result VPNGatewayConnectionIntf, response *core.DetailedResponse, err error) { - return vpc.GetVPNGatewayConnectionWithContext(context.Background(), getVPNGatewayConnectionOptions) + result, response, err = vpc.GetVPNGatewayConnectionWithContext(context.Background(), getVPNGatewayConnectionOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetVPNGatewayConnectionWithContext is an alternate form of the GetVPNGatewayConnection method which supports a Context parameter func (vpc *VpcV1) GetVPNGatewayConnectionWithContext(ctx context.Context, getVPNGatewayConnectionOptions *GetVPNGatewayConnectionOptions) (result VPNGatewayConnectionIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getVPNGatewayConnectionOptions, "getVPNGatewayConnectionOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getVPNGatewayConnectionOptions, "getVPNGatewayConnectionOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -21090,6 +24086,7 @@ func (vpc *VpcV1) GetVPNGatewayConnectionWithContext(ctx context.Context, getVPN builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -21108,17 +24105,21 @@ func (vpc *VpcV1) GetVPNGatewayConnectionWithContext(ctx context.Context, getVPN request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_vpn_gateway_connection", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -21130,17 +24131,21 @@ func (vpc *VpcV1) GetVPNGatewayConnectionWithContext(ctx context.Context, getVPN // UpdateVPNGatewayConnection : Update a VPN gateway connection // This request updates the properties of an existing VPN gateway connection. func (vpc *VpcV1) UpdateVPNGatewayConnection(updateVPNGatewayConnectionOptions *UpdateVPNGatewayConnectionOptions) (result VPNGatewayConnectionIntf, response *core.DetailedResponse, err error) { - return vpc.UpdateVPNGatewayConnectionWithContext(context.Background(), updateVPNGatewayConnectionOptions) + result, response, err = vpc.UpdateVPNGatewayConnectionWithContext(context.Background(), updateVPNGatewayConnectionOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateVPNGatewayConnectionWithContext is an alternate form of the UpdateVPNGatewayConnection method which supports a Context parameter func (vpc *VpcV1) UpdateVPNGatewayConnectionWithContext(ctx context.Context, updateVPNGatewayConnectionOptions *UpdateVPNGatewayConnectionOptions) (result VPNGatewayConnectionIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateVPNGatewayConnectionOptions, "updateVPNGatewayConnectionOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateVPNGatewayConnectionOptions, "updateVPNGatewayConnectionOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -21154,6 +24159,7 @@ func (vpc *VpcV1) UpdateVPNGatewayConnectionWithContext(ctx context.Context, upd builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -21173,22 +24179,27 @@ func (vpc *VpcV1) UpdateVPNGatewayConnectionWithContext(ctx context.Context, upd _, err = builder.SetBodyContentJSON(updateVPNGatewayConnectionOptions.VPNGatewayConnectionPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_vpn_gateway_connection", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -21197,43 +24208,48 @@ func (vpc *VpcV1) UpdateVPNGatewayConnectionWithContext(ctx context.Context, upd return } -// ListVPNGatewayConnectionLocalCIDRs : List all local CIDRs for a VPN gateway connection +// ListVPNGatewayConnectionsLocalCIDRs : List all local CIDRs for a VPN gateway connection // This request lists all local CIDRs for a VPN gateway connection. // // This request is only supported for policy mode VPN gateways. -func (vpc *VpcV1) ListVPNGatewayConnectionLocalCIDRs(listVPNGatewayConnectionLocalCIDRsOptions *ListVPNGatewayConnectionLocalCIDRsOptions) (result *VPNGatewayConnectionLocalCIDRs, response *core.DetailedResponse, err error) { - return vpc.ListVPNGatewayConnectionLocalCIDRsWithContext(context.Background(), listVPNGatewayConnectionLocalCIDRsOptions) +func (vpc *VpcV1) ListVPNGatewayConnectionsLocalCIDRs(listVPNGatewayConnectionsLocalCIDRsOptions *ListVPNGatewayConnectionsLocalCIDRsOptions) (result *VPNGatewayConnectionCIDRs, response *core.DetailedResponse, err error) { + result, response, err = vpc.ListVPNGatewayConnectionsLocalCIDRsWithContext(context.Background(), listVPNGatewayConnectionsLocalCIDRsOptions) + err = core.RepurposeSDKProblem(err, "") + return } -// ListVPNGatewayConnectionLocalCIDRsWithContext is an alternate form of the ListVPNGatewayConnectionLocalCIDRs method which supports a Context parameter -func (vpc *VpcV1) ListVPNGatewayConnectionLocalCIDRsWithContext(ctx context.Context, listVPNGatewayConnectionLocalCIDRsOptions *ListVPNGatewayConnectionLocalCIDRsOptions) (result *VPNGatewayConnectionLocalCIDRs, response *core.DetailedResponse, err error) { - err = core.ValidateNotNil(listVPNGatewayConnectionLocalCIDRsOptions, "listVPNGatewayConnectionLocalCIDRsOptions cannot be nil") +// ListVPNGatewayConnectionsLocalCIDRsWithContext is an alternate form of the ListVPNGatewayConnectionsLocalCIDRs method which supports a Context parameter +func (vpc *VpcV1) ListVPNGatewayConnectionsLocalCIDRsWithContext(ctx context.Context, listVPNGatewayConnectionsLocalCIDRsOptions *ListVPNGatewayConnectionsLocalCIDRsOptions) (result *VPNGatewayConnectionCIDRs, response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(listVPNGatewayConnectionsLocalCIDRsOptions, "listVPNGatewayConnectionsLocalCIDRsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } - err = core.ValidateStruct(listVPNGatewayConnectionLocalCIDRsOptions, "listVPNGatewayConnectionLocalCIDRsOptions") + err = core.ValidateStruct(listVPNGatewayConnectionsLocalCIDRsOptions, "listVPNGatewayConnectionsLocalCIDRsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } pathParamsMap := map[string]string{ - "vpn_gateway_id": *listVPNGatewayConnectionLocalCIDRsOptions.VPNGatewayID, - "id": *listVPNGatewayConnectionLocalCIDRsOptions.ID, + "vpn_gateway_id": *listVPNGatewayConnectionsLocalCIDRsOptions.VPNGatewayID, + "id": *listVPNGatewayConnectionsLocalCIDRsOptions.ID, } builder := core.NewRequestBuilder(core.GET) builder = builder.WithContext(ctx) builder.EnableGzipCompression = vpc.GetEnableGzipCompression() - _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/local_cidrs`, pathParamsMap) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/local/cidrs`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range listVPNGatewayConnectionLocalCIDRsOptions.Headers { + for headerName, headerValue := range listVPNGatewayConnectionsLocalCIDRsOptions.Headers { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListVPNGatewayConnectionLocalCIDRs") + sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListVPNGatewayConnectionsLocalCIDRs") for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } @@ -21244,17 +24260,21 @@ func (vpc *VpcV1) ListVPNGatewayConnectionLocalCIDRsWithContext(ctx context.Cont request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_vpn_gateway_connections_local_cidrs", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { - err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnectionLocalCIDRs) + err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnectionCIDRs) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -21263,45 +24283,49 @@ func (vpc *VpcV1) ListVPNGatewayConnectionLocalCIDRsWithContext(ctx context.Cont return } -// RemoveVPNGatewayConnectionLocalCIDR : Remove a local CIDR from a VPN gateway connection +// RemoveVPNGatewayConnectionsLocalCIDR : Remove a local CIDR from a VPN gateway connection // This request removes a CIDR from a VPN gateway connection. // // This request is only supported for policy mode VPN gateways. -func (vpc *VpcV1) RemoveVPNGatewayConnectionLocalCIDR(removeVPNGatewayConnectionLocalCIDROptions *RemoveVPNGatewayConnectionLocalCIDROptions) (response *core.DetailedResponse, err error) { - return vpc.RemoveVPNGatewayConnectionLocalCIDRWithContext(context.Background(), removeVPNGatewayConnectionLocalCIDROptions) +func (vpc *VpcV1) RemoveVPNGatewayConnectionsLocalCIDR(removeVPNGatewayConnectionsLocalCIDROptions *RemoveVPNGatewayConnectionsLocalCIDROptions) (response *core.DetailedResponse, err error) { + response, err = vpc.RemoveVPNGatewayConnectionsLocalCIDRWithContext(context.Background(), removeVPNGatewayConnectionsLocalCIDROptions) + err = core.RepurposeSDKProblem(err, "") + return } -// RemoveVPNGatewayConnectionLocalCIDRWithContext is an alternate form of the RemoveVPNGatewayConnectionLocalCIDR method which supports a Context parameter -func (vpc *VpcV1) RemoveVPNGatewayConnectionLocalCIDRWithContext(ctx context.Context, removeVPNGatewayConnectionLocalCIDROptions *RemoveVPNGatewayConnectionLocalCIDROptions) (response *core.DetailedResponse, err error) { - err = core.ValidateNotNil(removeVPNGatewayConnectionLocalCIDROptions, "removeVPNGatewayConnectionLocalCIDROptions cannot be nil") +// RemoveVPNGatewayConnectionsLocalCIDRWithContext is an alternate form of the RemoveVPNGatewayConnectionsLocalCIDR method which supports a Context parameter +func (vpc *VpcV1) RemoveVPNGatewayConnectionsLocalCIDRWithContext(ctx context.Context, removeVPNGatewayConnectionsLocalCIDROptions *RemoveVPNGatewayConnectionsLocalCIDROptions) (response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(removeVPNGatewayConnectionsLocalCIDROptions, "removeVPNGatewayConnectionsLocalCIDROptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } - err = core.ValidateStruct(removeVPNGatewayConnectionLocalCIDROptions, "removeVPNGatewayConnectionLocalCIDROptions") + err = core.ValidateStruct(removeVPNGatewayConnectionsLocalCIDROptions, "removeVPNGatewayConnectionsLocalCIDROptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } pathParamsMap := map[string]string{ - "vpn_gateway_id": *removeVPNGatewayConnectionLocalCIDROptions.VPNGatewayID, - "id": *removeVPNGatewayConnectionLocalCIDROptions.ID, - "cidr_prefix": *removeVPNGatewayConnectionLocalCIDROptions.CIDRPrefix, - "prefix_length": *removeVPNGatewayConnectionLocalCIDROptions.PrefixLength, + "vpn_gateway_id": *removeVPNGatewayConnectionsLocalCIDROptions.VPNGatewayID, + "id": *removeVPNGatewayConnectionsLocalCIDROptions.ID, + "cidr": *removeVPNGatewayConnectionsLocalCIDROptions.CIDR, } builder := core.NewRequestBuilder(core.DELETE) builder = builder.WithContext(ctx) builder.EnableGzipCompression = vpc.GetEnableGzipCompression() - _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/local_cidrs/{cidr_prefix}/{prefix_length}`, pathParamsMap) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/local/cidrs/{cidr}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range removeVPNGatewayConnectionLocalCIDROptions.Headers { + for headerName, headerValue := range removeVPNGatewayConnectionsLocalCIDROptions.Headers { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("vpc", "V1", "RemoveVPNGatewayConnectionLocalCIDR") + sdkHeaders := common.GetSdkHeaders("vpc", "V1", "RemoveVPNGatewayConnectionsLocalCIDR") for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } @@ -21311,53 +24335,63 @@ func (vpc *VpcV1) RemoveVPNGatewayConnectionLocalCIDRWithContext(ctx context.Con request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "remove_vpn_gateway_connections_local_cidr", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } -// CheckVPNGatewayConnectionLocalCIDR : Check if the specified local CIDR exists on a VPN gateway connection +// CheckVPNGatewayConnectionsLocalCIDR : Check if the specified local CIDR exists on a VPN gateway connection // This request succeeds if a CIDR exists on the specified VPN gateway connection, and fails otherwise. // // This request is only supported for policy mode VPN gateways. -func (vpc *VpcV1) CheckVPNGatewayConnectionLocalCIDR(checkVPNGatewayConnectionLocalCIDROptions *CheckVPNGatewayConnectionLocalCIDROptions) (response *core.DetailedResponse, err error) { - return vpc.CheckVPNGatewayConnectionLocalCIDRWithContext(context.Background(), checkVPNGatewayConnectionLocalCIDROptions) +func (vpc *VpcV1) CheckVPNGatewayConnectionsLocalCIDR(checkVPNGatewayConnectionsLocalCIDROptions *CheckVPNGatewayConnectionsLocalCIDROptions) (response *core.DetailedResponse, err error) { + response, err = vpc.CheckVPNGatewayConnectionsLocalCIDRWithContext(context.Background(), checkVPNGatewayConnectionsLocalCIDROptions) + err = core.RepurposeSDKProblem(err, "") + return } -// CheckVPNGatewayConnectionLocalCIDRWithContext is an alternate form of the CheckVPNGatewayConnectionLocalCIDR method which supports a Context parameter -func (vpc *VpcV1) CheckVPNGatewayConnectionLocalCIDRWithContext(ctx context.Context, checkVPNGatewayConnectionLocalCIDROptions *CheckVPNGatewayConnectionLocalCIDROptions) (response *core.DetailedResponse, err error) { - err = core.ValidateNotNil(checkVPNGatewayConnectionLocalCIDROptions, "checkVPNGatewayConnectionLocalCIDROptions cannot be nil") +// CheckVPNGatewayConnectionsLocalCIDRWithContext is an alternate form of the CheckVPNGatewayConnectionsLocalCIDR method which supports a Context parameter +func (vpc *VpcV1) CheckVPNGatewayConnectionsLocalCIDRWithContext(ctx context.Context, checkVPNGatewayConnectionsLocalCIDROptions *CheckVPNGatewayConnectionsLocalCIDROptions) (response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(checkVPNGatewayConnectionsLocalCIDROptions, "checkVPNGatewayConnectionsLocalCIDROptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } - err = core.ValidateStruct(checkVPNGatewayConnectionLocalCIDROptions, "checkVPNGatewayConnectionLocalCIDROptions") + err = core.ValidateStruct(checkVPNGatewayConnectionsLocalCIDROptions, "checkVPNGatewayConnectionsLocalCIDROptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } pathParamsMap := map[string]string{ - "vpn_gateway_id": *checkVPNGatewayConnectionLocalCIDROptions.VPNGatewayID, - "id": *checkVPNGatewayConnectionLocalCIDROptions.ID, - "cidr_prefix": *checkVPNGatewayConnectionLocalCIDROptions.CIDRPrefix, - "prefix_length": *checkVPNGatewayConnectionLocalCIDROptions.PrefixLength, + "vpn_gateway_id": *checkVPNGatewayConnectionsLocalCIDROptions.VPNGatewayID, + "id": *checkVPNGatewayConnectionsLocalCIDROptions.ID, + "cidr": *checkVPNGatewayConnectionsLocalCIDROptions.CIDR, } builder := core.NewRequestBuilder(core.GET) builder = builder.WithContext(ctx) builder.EnableGzipCompression = vpc.GetEnableGzipCompression() - _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/local_cidrs/{cidr_prefix}/{prefix_length}`, pathParamsMap) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/local/cidrs/{cidr}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range checkVPNGatewayConnectionLocalCIDROptions.Headers { + for headerName, headerValue := range checkVPNGatewayConnectionsLocalCIDROptions.Headers { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CheckVPNGatewayConnectionLocalCIDR") + sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CheckVPNGatewayConnectionsLocalCIDR") for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } @@ -21367,54 +24401,64 @@ func (vpc *VpcV1) CheckVPNGatewayConnectionLocalCIDRWithContext(ctx context.Cont request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "check_vpn_gateway_connections_local_cidr", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } -// AddVPNGatewayConnectionLocalCIDR : Set a local CIDR on a VPN gateway connection +// AddVPNGatewayConnectionsLocalCIDR : Set a local CIDR on a VPN gateway connection // This request adds the specified CIDR to the specified VPN gateway connection. This request succeeds if the specified // CIDR already exists. A request body is not required, and if provided, is ignored. // // This request is only supported for policy mode VPN gateways. -func (vpc *VpcV1) AddVPNGatewayConnectionLocalCIDR(addVPNGatewayConnectionLocalCIDROptions *AddVPNGatewayConnectionLocalCIDROptions) (response *core.DetailedResponse, err error) { - return vpc.AddVPNGatewayConnectionLocalCIDRWithContext(context.Background(), addVPNGatewayConnectionLocalCIDROptions) +func (vpc *VpcV1) AddVPNGatewayConnectionsLocalCIDR(addVPNGatewayConnectionsLocalCIDROptions *AddVPNGatewayConnectionsLocalCIDROptions) (response *core.DetailedResponse, err error) { + response, err = vpc.AddVPNGatewayConnectionsLocalCIDRWithContext(context.Background(), addVPNGatewayConnectionsLocalCIDROptions) + err = core.RepurposeSDKProblem(err, "") + return } -// AddVPNGatewayConnectionLocalCIDRWithContext is an alternate form of the AddVPNGatewayConnectionLocalCIDR method which supports a Context parameter -func (vpc *VpcV1) AddVPNGatewayConnectionLocalCIDRWithContext(ctx context.Context, addVPNGatewayConnectionLocalCIDROptions *AddVPNGatewayConnectionLocalCIDROptions) (response *core.DetailedResponse, err error) { - err = core.ValidateNotNil(addVPNGatewayConnectionLocalCIDROptions, "addVPNGatewayConnectionLocalCIDROptions cannot be nil") +// AddVPNGatewayConnectionsLocalCIDRWithContext is an alternate form of the AddVPNGatewayConnectionsLocalCIDR method which supports a Context parameter +func (vpc *VpcV1) AddVPNGatewayConnectionsLocalCIDRWithContext(ctx context.Context, addVPNGatewayConnectionsLocalCIDROptions *AddVPNGatewayConnectionsLocalCIDROptions) (response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(addVPNGatewayConnectionsLocalCIDROptions, "addVPNGatewayConnectionsLocalCIDROptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } - err = core.ValidateStruct(addVPNGatewayConnectionLocalCIDROptions, "addVPNGatewayConnectionLocalCIDROptions") + err = core.ValidateStruct(addVPNGatewayConnectionsLocalCIDROptions, "addVPNGatewayConnectionsLocalCIDROptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } pathParamsMap := map[string]string{ - "vpn_gateway_id": *addVPNGatewayConnectionLocalCIDROptions.VPNGatewayID, - "id": *addVPNGatewayConnectionLocalCIDROptions.ID, - "cidr_prefix": *addVPNGatewayConnectionLocalCIDROptions.CIDRPrefix, - "prefix_length": *addVPNGatewayConnectionLocalCIDROptions.PrefixLength, + "vpn_gateway_id": *addVPNGatewayConnectionsLocalCIDROptions.VPNGatewayID, + "id": *addVPNGatewayConnectionsLocalCIDROptions.ID, + "cidr": *addVPNGatewayConnectionsLocalCIDROptions.CIDR, } builder := core.NewRequestBuilder(core.PUT) builder = builder.WithContext(ctx) builder.EnableGzipCompression = vpc.GetEnableGzipCompression() - _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/local_cidrs/{cidr_prefix}/{prefix_length}`, pathParamsMap) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/local/cidrs/{cidr}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range addVPNGatewayConnectionLocalCIDROptions.Headers { + for headerName, headerValue := range addVPNGatewayConnectionsLocalCIDROptions.Headers { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("vpc", "V1", "AddVPNGatewayConnectionLocalCIDR") + sdkHeaders := common.GetSdkHeaders("vpc", "V1", "AddVPNGatewayConnectionsLocalCIDR") for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } @@ -21424,51 +24468,62 @@ func (vpc *VpcV1) AddVPNGatewayConnectionLocalCIDRWithContext(ctx context.Contex request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "add_vpn_gateway_connections_local_cidr", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } -// ListVPNGatewayConnectionPeerCIDRs : List all peer CIDRs for a VPN gateway connection +// ListVPNGatewayConnectionsPeerCIDRs : List all peer CIDRs for a VPN gateway connection // This request lists all peer CIDRs for a VPN gateway connection. // // This request is only supported for policy mode VPN gateways. -func (vpc *VpcV1) ListVPNGatewayConnectionPeerCIDRs(listVPNGatewayConnectionPeerCIDRsOptions *ListVPNGatewayConnectionPeerCIDRsOptions) (result *VPNGatewayConnectionPeerCIDRs, response *core.DetailedResponse, err error) { - return vpc.ListVPNGatewayConnectionPeerCIDRsWithContext(context.Background(), listVPNGatewayConnectionPeerCIDRsOptions) +func (vpc *VpcV1) ListVPNGatewayConnectionsPeerCIDRs(listVPNGatewayConnectionsPeerCIDRsOptions *ListVPNGatewayConnectionsPeerCIDRsOptions) (result *VPNGatewayConnectionCIDRs, response *core.DetailedResponse, err error) { + result, response, err = vpc.ListVPNGatewayConnectionsPeerCIDRsWithContext(context.Background(), listVPNGatewayConnectionsPeerCIDRsOptions) + err = core.RepurposeSDKProblem(err, "") + return } -// ListVPNGatewayConnectionPeerCIDRsWithContext is an alternate form of the ListVPNGatewayConnectionPeerCIDRs method which supports a Context parameter -func (vpc *VpcV1) ListVPNGatewayConnectionPeerCIDRsWithContext(ctx context.Context, listVPNGatewayConnectionPeerCIDRsOptions *ListVPNGatewayConnectionPeerCIDRsOptions) (result *VPNGatewayConnectionPeerCIDRs, response *core.DetailedResponse, err error) { - err = core.ValidateNotNil(listVPNGatewayConnectionPeerCIDRsOptions, "listVPNGatewayConnectionPeerCIDRsOptions cannot be nil") +// ListVPNGatewayConnectionsPeerCIDRsWithContext is an alternate form of the ListVPNGatewayConnectionsPeerCIDRs method which supports a Context parameter +func (vpc *VpcV1) ListVPNGatewayConnectionsPeerCIDRsWithContext(ctx context.Context, listVPNGatewayConnectionsPeerCIDRsOptions *ListVPNGatewayConnectionsPeerCIDRsOptions) (result *VPNGatewayConnectionCIDRs, response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(listVPNGatewayConnectionsPeerCIDRsOptions, "listVPNGatewayConnectionsPeerCIDRsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } - err = core.ValidateStruct(listVPNGatewayConnectionPeerCIDRsOptions, "listVPNGatewayConnectionPeerCIDRsOptions") + err = core.ValidateStruct(listVPNGatewayConnectionsPeerCIDRsOptions, "listVPNGatewayConnectionsPeerCIDRsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } pathParamsMap := map[string]string{ - "vpn_gateway_id": *listVPNGatewayConnectionPeerCIDRsOptions.VPNGatewayID, - "id": *listVPNGatewayConnectionPeerCIDRsOptions.ID, + "vpn_gateway_id": *listVPNGatewayConnectionsPeerCIDRsOptions.VPNGatewayID, + "id": *listVPNGatewayConnectionsPeerCIDRsOptions.ID, } builder := core.NewRequestBuilder(core.GET) builder = builder.WithContext(ctx) builder.EnableGzipCompression = vpc.GetEnableGzipCompression() - _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer_cidrs`, pathParamsMap) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer/cidrs`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range listVPNGatewayConnectionPeerCIDRsOptions.Headers { + for headerName, headerValue := range listVPNGatewayConnectionsPeerCIDRsOptions.Headers { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListVPNGatewayConnectionPeerCIDRs") + sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListVPNGatewayConnectionsPeerCIDRs") for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } @@ -21479,17 +24534,21 @@ func (vpc *VpcV1) ListVPNGatewayConnectionPeerCIDRsWithContext(ctx context.Conte request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_vpn_gateway_connections_peer_cidrs", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { - err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnectionPeerCIDRs) + err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnectionCIDRs) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -21498,45 +24557,49 @@ func (vpc *VpcV1) ListVPNGatewayConnectionPeerCIDRsWithContext(ctx context.Conte return } -// RemoveVPNGatewayConnectionPeerCIDR : Remove a peer CIDR from a VPN gateway connection +// RemoveVPNGatewayConnectionsPeerCIDR : Remove a peer CIDR from a VPN gateway connection // This request removes a CIDR from a VPN gateway connection. // // This request is only supported for policy mode VPN gateways. -func (vpc *VpcV1) RemoveVPNGatewayConnectionPeerCIDR(removeVPNGatewayConnectionPeerCIDROptions *RemoveVPNGatewayConnectionPeerCIDROptions) (response *core.DetailedResponse, err error) { - return vpc.RemoveVPNGatewayConnectionPeerCIDRWithContext(context.Background(), removeVPNGatewayConnectionPeerCIDROptions) +func (vpc *VpcV1) RemoveVPNGatewayConnectionsPeerCIDR(removeVPNGatewayConnectionsPeerCIDROptions *RemoveVPNGatewayConnectionsPeerCIDROptions) (response *core.DetailedResponse, err error) { + response, err = vpc.RemoveVPNGatewayConnectionsPeerCIDRWithContext(context.Background(), removeVPNGatewayConnectionsPeerCIDROptions) + err = core.RepurposeSDKProblem(err, "") + return } -// RemoveVPNGatewayConnectionPeerCIDRWithContext is an alternate form of the RemoveVPNGatewayConnectionPeerCIDR method which supports a Context parameter -func (vpc *VpcV1) RemoveVPNGatewayConnectionPeerCIDRWithContext(ctx context.Context, removeVPNGatewayConnectionPeerCIDROptions *RemoveVPNGatewayConnectionPeerCIDROptions) (response *core.DetailedResponse, err error) { - err = core.ValidateNotNil(removeVPNGatewayConnectionPeerCIDROptions, "removeVPNGatewayConnectionPeerCIDROptions cannot be nil") +// RemoveVPNGatewayConnectionsPeerCIDRWithContext is an alternate form of the RemoveVPNGatewayConnectionsPeerCIDR method which supports a Context parameter +func (vpc *VpcV1) RemoveVPNGatewayConnectionsPeerCIDRWithContext(ctx context.Context, removeVPNGatewayConnectionsPeerCIDROptions *RemoveVPNGatewayConnectionsPeerCIDROptions) (response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(removeVPNGatewayConnectionsPeerCIDROptions, "removeVPNGatewayConnectionsPeerCIDROptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } - err = core.ValidateStruct(removeVPNGatewayConnectionPeerCIDROptions, "removeVPNGatewayConnectionPeerCIDROptions") + err = core.ValidateStruct(removeVPNGatewayConnectionsPeerCIDROptions, "removeVPNGatewayConnectionsPeerCIDROptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } pathParamsMap := map[string]string{ - "vpn_gateway_id": *removeVPNGatewayConnectionPeerCIDROptions.VPNGatewayID, - "id": *removeVPNGatewayConnectionPeerCIDROptions.ID, - "cidr_prefix": *removeVPNGatewayConnectionPeerCIDROptions.CIDRPrefix, - "prefix_length": *removeVPNGatewayConnectionPeerCIDROptions.PrefixLength, + "vpn_gateway_id": *removeVPNGatewayConnectionsPeerCIDROptions.VPNGatewayID, + "id": *removeVPNGatewayConnectionsPeerCIDROptions.ID, + "cidr": *removeVPNGatewayConnectionsPeerCIDROptions.CIDR, } builder := core.NewRequestBuilder(core.DELETE) builder = builder.WithContext(ctx) builder.EnableGzipCompression = vpc.GetEnableGzipCompression() - _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer_cidrs/{cidr_prefix}/{prefix_length}`, pathParamsMap) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer/cidrs/{cidr}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range removeVPNGatewayConnectionPeerCIDROptions.Headers { + for headerName, headerValue := range removeVPNGatewayConnectionsPeerCIDROptions.Headers { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("vpc", "V1", "RemoveVPNGatewayConnectionPeerCIDR") + sdkHeaders := common.GetSdkHeaders("vpc", "V1", "RemoveVPNGatewayConnectionsPeerCIDR") for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } @@ -21546,53 +24609,63 @@ func (vpc *VpcV1) RemoveVPNGatewayConnectionPeerCIDRWithContext(ctx context.Cont request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "remove_vpn_gateway_connections_peer_cidr", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } -// CheckVPNGatewayConnectionPeerCIDR : Check if the specified peer CIDR exists on a VPN gateway connection +// CheckVPNGatewayConnectionsPeerCIDR : Check if the specified peer CIDR exists on a VPN gateway connection // This request succeeds if a CIDR exists on the specified VPN gateway connection, and fails otherwise. // // This request is only supported for policy mode VPN gateways. -func (vpc *VpcV1) CheckVPNGatewayConnectionPeerCIDR(checkVPNGatewayConnectionPeerCIDROptions *CheckVPNGatewayConnectionPeerCIDROptions) (response *core.DetailedResponse, err error) { - return vpc.CheckVPNGatewayConnectionPeerCIDRWithContext(context.Background(), checkVPNGatewayConnectionPeerCIDROptions) +func (vpc *VpcV1) CheckVPNGatewayConnectionsPeerCIDR(checkVPNGatewayConnectionsPeerCIDROptions *CheckVPNGatewayConnectionsPeerCIDROptions) (response *core.DetailedResponse, err error) { + response, err = vpc.CheckVPNGatewayConnectionsPeerCIDRWithContext(context.Background(), checkVPNGatewayConnectionsPeerCIDROptions) + err = core.RepurposeSDKProblem(err, "") + return } -// CheckVPNGatewayConnectionPeerCIDRWithContext is an alternate form of the CheckVPNGatewayConnectionPeerCIDR method which supports a Context parameter -func (vpc *VpcV1) CheckVPNGatewayConnectionPeerCIDRWithContext(ctx context.Context, checkVPNGatewayConnectionPeerCIDROptions *CheckVPNGatewayConnectionPeerCIDROptions) (response *core.DetailedResponse, err error) { - err = core.ValidateNotNil(checkVPNGatewayConnectionPeerCIDROptions, "checkVPNGatewayConnectionPeerCIDROptions cannot be nil") +// CheckVPNGatewayConnectionsPeerCIDRWithContext is an alternate form of the CheckVPNGatewayConnectionsPeerCIDR method which supports a Context parameter +func (vpc *VpcV1) CheckVPNGatewayConnectionsPeerCIDRWithContext(ctx context.Context, checkVPNGatewayConnectionsPeerCIDROptions *CheckVPNGatewayConnectionsPeerCIDROptions) (response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(checkVPNGatewayConnectionsPeerCIDROptions, "checkVPNGatewayConnectionsPeerCIDROptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } - err = core.ValidateStruct(checkVPNGatewayConnectionPeerCIDROptions, "checkVPNGatewayConnectionPeerCIDROptions") + err = core.ValidateStruct(checkVPNGatewayConnectionsPeerCIDROptions, "checkVPNGatewayConnectionsPeerCIDROptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } pathParamsMap := map[string]string{ - "vpn_gateway_id": *checkVPNGatewayConnectionPeerCIDROptions.VPNGatewayID, - "id": *checkVPNGatewayConnectionPeerCIDROptions.ID, - "cidr_prefix": *checkVPNGatewayConnectionPeerCIDROptions.CIDRPrefix, - "prefix_length": *checkVPNGatewayConnectionPeerCIDROptions.PrefixLength, + "vpn_gateway_id": *checkVPNGatewayConnectionsPeerCIDROptions.VPNGatewayID, + "id": *checkVPNGatewayConnectionsPeerCIDROptions.ID, + "cidr": *checkVPNGatewayConnectionsPeerCIDROptions.CIDR, } builder := core.NewRequestBuilder(core.GET) builder = builder.WithContext(ctx) builder.EnableGzipCompression = vpc.GetEnableGzipCompression() - _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer_cidrs/{cidr_prefix}/{prefix_length}`, pathParamsMap) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer/cidrs/{cidr}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range checkVPNGatewayConnectionPeerCIDROptions.Headers { + for headerName, headerValue := range checkVPNGatewayConnectionsPeerCIDROptions.Headers { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CheckVPNGatewayConnectionPeerCIDR") + sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CheckVPNGatewayConnectionsPeerCIDR") for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } @@ -21602,54 +24675,64 @@ func (vpc *VpcV1) CheckVPNGatewayConnectionPeerCIDRWithContext(ctx context.Conte request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "check_vpn_gateway_connections_peer_cidr", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } -// AddVPNGatewayConnectionPeerCIDR : Set a peer CIDR on a VPN gateway connection +// AddVPNGatewayConnectionsPeerCIDR : Set a peer CIDR on a VPN gateway connection // This request adds the specified CIDR to the specified VPN gateway connection. This request succeeds if the specified // CIDR already exists. A request body is not required, and if provided, is ignored. // // This request is only supported for policy mode VPN gateways. -func (vpc *VpcV1) AddVPNGatewayConnectionPeerCIDR(addVPNGatewayConnectionPeerCIDROptions *AddVPNGatewayConnectionPeerCIDROptions) (response *core.DetailedResponse, err error) { - return vpc.AddVPNGatewayConnectionPeerCIDRWithContext(context.Background(), addVPNGatewayConnectionPeerCIDROptions) +func (vpc *VpcV1) AddVPNGatewayConnectionsPeerCIDR(addVPNGatewayConnectionsPeerCIDROptions *AddVPNGatewayConnectionsPeerCIDROptions) (response *core.DetailedResponse, err error) { + response, err = vpc.AddVPNGatewayConnectionsPeerCIDRWithContext(context.Background(), addVPNGatewayConnectionsPeerCIDROptions) + err = core.RepurposeSDKProblem(err, "") + return } -// AddVPNGatewayConnectionPeerCIDRWithContext is an alternate form of the AddVPNGatewayConnectionPeerCIDR method which supports a Context parameter -func (vpc *VpcV1) AddVPNGatewayConnectionPeerCIDRWithContext(ctx context.Context, addVPNGatewayConnectionPeerCIDROptions *AddVPNGatewayConnectionPeerCIDROptions) (response *core.DetailedResponse, err error) { - err = core.ValidateNotNil(addVPNGatewayConnectionPeerCIDROptions, "addVPNGatewayConnectionPeerCIDROptions cannot be nil") +// AddVPNGatewayConnectionsPeerCIDRWithContext is an alternate form of the AddVPNGatewayConnectionsPeerCIDR method which supports a Context parameter +func (vpc *VpcV1) AddVPNGatewayConnectionsPeerCIDRWithContext(ctx context.Context, addVPNGatewayConnectionsPeerCIDROptions *AddVPNGatewayConnectionsPeerCIDROptions) (response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(addVPNGatewayConnectionsPeerCIDROptions, "addVPNGatewayConnectionsPeerCIDROptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } - err = core.ValidateStruct(addVPNGatewayConnectionPeerCIDROptions, "addVPNGatewayConnectionPeerCIDROptions") + err = core.ValidateStruct(addVPNGatewayConnectionsPeerCIDROptions, "addVPNGatewayConnectionsPeerCIDROptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } pathParamsMap := map[string]string{ - "vpn_gateway_id": *addVPNGatewayConnectionPeerCIDROptions.VPNGatewayID, - "id": *addVPNGatewayConnectionPeerCIDROptions.ID, - "cidr_prefix": *addVPNGatewayConnectionPeerCIDROptions.CIDRPrefix, - "prefix_length": *addVPNGatewayConnectionPeerCIDROptions.PrefixLength, + "vpn_gateway_id": *addVPNGatewayConnectionsPeerCIDROptions.VPNGatewayID, + "id": *addVPNGatewayConnectionsPeerCIDROptions.ID, + "cidr": *addVPNGatewayConnectionsPeerCIDROptions.CIDR, } builder := core.NewRequestBuilder(core.PUT) builder = builder.WithContext(ctx) builder.EnableGzipCompression = vpc.GetEnableGzipCompression() - _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer_cidrs/{cidr_prefix}/{prefix_length}`, pathParamsMap) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer/cidrs/{cidr}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range addVPNGatewayConnectionPeerCIDROptions.Headers { + for headerName, headerValue := range addVPNGatewayConnectionsPeerCIDROptions.Headers { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("vpc", "V1", "AddVPNGatewayConnectionPeerCIDR") + sdkHeaders := common.GetSdkHeaders("vpc", "V1", "AddVPNGatewayConnectionsPeerCIDR") for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } @@ -21659,10 +24742,16 @@ func (vpc *VpcV1) AddVPNGatewayConnectionPeerCIDRWithContext(ctx context.Context request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "add_vpn_gateway_connections_peer_cidr", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -21670,13 +24759,16 @@ func (vpc *VpcV1) AddVPNGatewayConnectionPeerCIDRWithContext(ctx context.Context // ListVPNServers : List all VPN servers // This request lists all VPN servers. func (vpc *VpcV1) ListVPNServers(listVPNServersOptions *ListVPNServersOptions) (result *VPNServerCollection, response *core.DetailedResponse, err error) { - return vpc.ListVPNServersWithContext(context.Background(), listVPNServersOptions) + result, response, err = vpc.ListVPNServersWithContext(context.Background(), listVPNServersOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListVPNServersWithContext is an alternate form of the ListVPNServers method which supports a Context parameter func (vpc *VpcV1) ListVPNServersWithContext(ctx context.Context, listVPNServersOptions *ListVPNServersOptions) (result *VPNServerCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listVPNServersOptions, "listVPNServersOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -21685,6 +24777,7 @@ func (vpc *VpcV1) ListVPNServersWithContext(ctx context.Context, listVPNServersO builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_servers`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -21718,17 +24811,21 @@ func (vpc *VpcV1) ListVPNServersWithContext(ctx context.Context, listVPNServersO request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_vpn_servers", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNServerCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -21740,17 +24837,21 @@ func (vpc *VpcV1) ListVPNServersWithContext(ctx context.Context, listVPNServersO // CreateVPNServer : Create a VPN server // This request creates a new VPN server. func (vpc *VpcV1) CreateVPNServer(createVPNServerOptions *CreateVPNServerOptions) (result *VPNServer, response *core.DetailedResponse, err error) { - return vpc.CreateVPNServerWithContext(context.Background(), createVPNServerOptions) + result, response, err = vpc.CreateVPNServerWithContext(context.Background(), createVPNServerOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateVPNServerWithContext is an alternate form of the CreateVPNServer method which supports a Context parameter func (vpc *VpcV1) CreateVPNServerWithContext(ctx context.Context, createVPNServerOptions *CreateVPNServerOptions) (result *VPNServer, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createVPNServerOptions, "createVPNServerOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createVPNServerOptions, "createVPNServerOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -21759,6 +24860,7 @@ func (vpc *VpcV1) CreateVPNServerWithContext(ctx context.Context, createVPNServe builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_servers`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -21815,22 +24917,27 @@ func (vpc *VpcV1) CreateVPNServerWithContext(ctx context.Context, createVPNServe } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_vpn_server", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNServer) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -21842,17 +24949,21 @@ func (vpc *VpcV1) CreateVPNServerWithContext(ctx context.Context, createVPNServe // DeleteVPNServer : Delete a VPN server // This request deletes a VPN server. This operation cannot be reversed. func (vpc *VpcV1) DeleteVPNServer(deleteVPNServerOptions *DeleteVPNServerOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteVPNServerWithContext(context.Background(), deleteVPNServerOptions) + response, err = vpc.DeleteVPNServerWithContext(context.Background(), deleteVPNServerOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteVPNServerWithContext is an alternate form of the DeleteVPNServer method which supports a Context parameter func (vpc *VpcV1) DeleteVPNServerWithContext(ctx context.Context, deleteVPNServerOptions *DeleteVPNServerOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteVPNServerOptions, "deleteVPNServerOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteVPNServerOptions, "deleteVPNServerOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -21865,6 +24976,7 @@ func (vpc *VpcV1) DeleteVPNServerWithContext(ctx context.Context, deleteVPNServe builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_servers/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -21885,10 +24997,16 @@ func (vpc *VpcV1) DeleteVPNServerWithContext(ctx context.Context, deleteVPNServe request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_vpn_server", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -21896,17 +25014,21 @@ func (vpc *VpcV1) DeleteVPNServerWithContext(ctx context.Context, deleteVPNServe // GetVPNServer : Retrieve a VPN server // This request retrieves a single VPN server specified by the identifier in the URL. func (vpc *VpcV1) GetVPNServer(getVPNServerOptions *GetVPNServerOptions) (result *VPNServer, response *core.DetailedResponse, err error) { - return vpc.GetVPNServerWithContext(context.Background(), getVPNServerOptions) + result, response, err = vpc.GetVPNServerWithContext(context.Background(), getVPNServerOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetVPNServerWithContext is an alternate form of the GetVPNServer method which supports a Context parameter func (vpc *VpcV1) GetVPNServerWithContext(ctx context.Context, getVPNServerOptions *GetVPNServerOptions) (result *VPNServer, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getVPNServerOptions, "getVPNServerOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getVPNServerOptions, "getVPNServerOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -21919,6 +25041,7 @@ func (vpc *VpcV1) GetVPNServerWithContext(ctx context.Context, getVPNServerOptio builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_servers/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -21937,17 +25060,21 @@ func (vpc *VpcV1) GetVPNServerWithContext(ctx context.Context, getVPNServerOptio request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_vpn_server", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNServer) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -21960,17 +25087,21 @@ func (vpc *VpcV1) GetVPNServerWithContext(ctx context.Context, getVPNServerOptio // This request updates the properties of an existing VPN server. Any property changes will cause all connected VPN // clients are disconnected from this VPN server except for the name change. func (vpc *VpcV1) UpdateVPNServer(updateVPNServerOptions *UpdateVPNServerOptions) (result *VPNServer, response *core.DetailedResponse, err error) { - return vpc.UpdateVPNServerWithContext(context.Background(), updateVPNServerOptions) + result, response, err = vpc.UpdateVPNServerWithContext(context.Background(), updateVPNServerOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateVPNServerWithContext is an alternate form of the UpdateVPNServer method which supports a Context parameter func (vpc *VpcV1) UpdateVPNServerWithContext(ctx context.Context, updateVPNServerOptions *UpdateVPNServerOptions) (result *VPNServer, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateVPNServerOptions, "updateVPNServerOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateVPNServerOptions, "updateVPNServerOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -21983,6 +25114,7 @@ func (vpc *VpcV1) UpdateVPNServerWithContext(ctx context.Context, updateVPNServe builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_servers/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -22005,22 +25137,27 @@ func (vpc *VpcV1) UpdateVPNServerWithContext(ctx context.Context, updateVPNServe _, err = builder.SetBodyContentJSON(updateVPNServerOptions.VPNServerPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_vpn_server", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNServer) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -22033,17 +25170,21 @@ func (vpc *VpcV1) UpdateVPNServerWithContext(ctx context.Context, updateVPNServe // This request retrieves OpenVPN client configuration on a single VPN server specified by the identifier in the URL. // This configuration includes directives compatible with OpenVPN releases 2.4 and 2.5. func (vpc *VpcV1) GetVPNServerClientConfiguration(getVPNServerClientConfigurationOptions *GetVPNServerClientConfigurationOptions) (result *string, response *core.DetailedResponse, err error) { - return vpc.GetVPNServerClientConfigurationWithContext(context.Background(), getVPNServerClientConfigurationOptions) + result, response, err = vpc.GetVPNServerClientConfigurationWithContext(context.Background(), getVPNServerClientConfigurationOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetVPNServerClientConfigurationWithContext is an alternate form of the GetVPNServerClientConfiguration method which supports a Context parameter func (vpc *VpcV1) GetVPNServerClientConfigurationWithContext(ctx context.Context, getVPNServerClientConfigurationOptions *GetVPNServerClientConfigurationOptions) (result *string, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getVPNServerClientConfigurationOptions, "getVPNServerClientConfigurationOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getVPNServerClientConfigurationOptions, "getVPNServerClientConfigurationOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -22056,6 +25197,7 @@ func (vpc *VpcV1) GetVPNServerClientConfigurationWithContext(ctx context.Context builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_servers/{id}/client_configuration`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -22074,10 +25216,16 @@ func (vpc *VpcV1) GetVPNServerClientConfigurationWithContext(ctx context.Context request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, &result) + if err != nil { + core.EnrichHTTPProblem(err, "get_vpn_server_client_configuration", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -22086,17 +25234,21 @@ func (vpc *VpcV1) GetVPNServerClientConfigurationWithContext(ctx context.Context // This request retrieves all connected VPN clients, and any disconnected VPN clients that the VPN server has not yet // deleted based on its auto-deletion policy. func (vpc *VpcV1) ListVPNServerClients(listVPNServerClientsOptions *ListVPNServerClientsOptions) (result *VPNServerClientCollection, response *core.DetailedResponse, err error) { - return vpc.ListVPNServerClientsWithContext(context.Background(), listVPNServerClientsOptions) + result, response, err = vpc.ListVPNServerClientsWithContext(context.Background(), listVPNServerClientsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListVPNServerClientsWithContext is an alternate form of the ListVPNServerClients method which supports a Context parameter func (vpc *VpcV1) ListVPNServerClientsWithContext(ctx context.Context, listVPNServerClientsOptions *ListVPNServerClientsOptions) (result *VPNServerClientCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listVPNServerClientsOptions, "listVPNServerClientsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listVPNServerClientsOptions, "listVPNServerClientsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -22109,6 +25261,7 @@ func (vpc *VpcV1) ListVPNServerClientsWithContext(ctx context.Context, listVPNSe builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_servers/{vpn_server_id}/clients`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -22136,17 +25289,21 @@ func (vpc *VpcV1) ListVPNServerClientsWithContext(ctx context.Context, listVPNSe request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_vpn_server_clients", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNServerClientCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -22160,17 +25317,21 @@ func (vpc *VpcV1) ListVPNServerClientsWithContext(ctx context.Context, listVPNSe // authentication permissions for the configured authentication methods (such as its client certificate) have been // revoked. func (vpc *VpcV1) DeleteVPNServerClient(deleteVPNServerClientOptions *DeleteVPNServerClientOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteVPNServerClientWithContext(context.Background(), deleteVPNServerClientOptions) + response, err = vpc.DeleteVPNServerClientWithContext(context.Background(), deleteVPNServerClientOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteVPNServerClientWithContext is an alternate form of the DeleteVPNServerClient method which supports a Context parameter func (vpc *VpcV1) DeleteVPNServerClientWithContext(ctx context.Context, deleteVPNServerClientOptions *DeleteVPNServerClientOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteVPNServerClientOptions, "deleteVPNServerClientOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteVPNServerClientOptions, "deleteVPNServerClientOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -22184,6 +25345,7 @@ func (vpc *VpcV1) DeleteVPNServerClientWithContext(ctx context.Context, deleteVP builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_servers/{vpn_server_id}/clients/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -22201,10 +25363,16 @@ func (vpc *VpcV1) DeleteVPNServerClientWithContext(ctx context.Context, deleteVP request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_vpn_server_client", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -22212,17 +25380,21 @@ func (vpc *VpcV1) DeleteVPNServerClientWithContext(ctx context.Context, deleteVP // GetVPNServerClient : Retrieve a VPN client // This request retrieves a single VPN client specified by the identifier in the URL. func (vpc *VpcV1) GetVPNServerClient(getVPNServerClientOptions *GetVPNServerClientOptions) (result *VPNServerClient, response *core.DetailedResponse, err error) { - return vpc.GetVPNServerClientWithContext(context.Background(), getVPNServerClientOptions) + result, response, err = vpc.GetVPNServerClientWithContext(context.Background(), getVPNServerClientOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetVPNServerClientWithContext is an alternate form of the GetVPNServerClient method which supports a Context parameter func (vpc *VpcV1) GetVPNServerClientWithContext(ctx context.Context, getVPNServerClientOptions *GetVPNServerClientOptions) (result *VPNServerClient, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getVPNServerClientOptions, "getVPNServerClientOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getVPNServerClientOptions, "getVPNServerClientOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -22236,6 +25408,7 @@ func (vpc *VpcV1) GetVPNServerClientWithContext(ctx context.Context, getVPNServe builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_servers/{vpn_server_id}/clients/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -22254,17 +25427,21 @@ func (vpc *VpcV1) GetVPNServerClientWithContext(ctx context.Context, getVPNServe request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_vpn_server_client", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNServerClient) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -22278,17 +25455,21 @@ func (vpc *VpcV1) GetVPNServerClientWithContext(ctx context.Context, getVPNServe // policy. The VPN client may reconnect unless its authentication permissions for the configured authentication methods // (such as its client certificate) have been revoked. func (vpc *VpcV1) DisconnectVPNClient(disconnectVPNClientOptions *DisconnectVPNClientOptions) (response *core.DetailedResponse, err error) { - return vpc.DisconnectVPNClientWithContext(context.Background(), disconnectVPNClientOptions) + response, err = vpc.DisconnectVPNClientWithContext(context.Background(), disconnectVPNClientOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DisconnectVPNClientWithContext is an alternate form of the DisconnectVPNClient method which supports a Context parameter func (vpc *VpcV1) DisconnectVPNClientWithContext(ctx context.Context, disconnectVPNClientOptions *DisconnectVPNClientOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(disconnectVPNClientOptions, "disconnectVPNClientOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(disconnectVPNClientOptions, "disconnectVPNClientOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -22302,6 +25483,7 @@ func (vpc *VpcV1) DisconnectVPNClientWithContext(ctx context.Context, disconnect builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_servers/{vpn_server_id}/clients/{id}/disconnect`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -22319,10 +25501,16 @@ func (vpc *VpcV1) DisconnectVPNClientWithContext(ctx context.Context, disconnect request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "disconnect_vpn_client", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -22332,17 +25520,21 @@ func (vpc *VpcV1) DisconnectVPNClientWithContext(ctx context.Context, disconnect // is established. Packets received from the VPN client will be dropped by the VPN server if there is no VPN route // matching their specified destinations. All VPN routes must be unique within the VPN server. func (vpc *VpcV1) ListVPNServerRoutes(listVPNServerRoutesOptions *ListVPNServerRoutesOptions) (result *VPNServerRouteCollection, response *core.DetailedResponse, err error) { - return vpc.ListVPNServerRoutesWithContext(context.Background(), listVPNServerRoutesOptions) + result, response, err = vpc.ListVPNServerRoutesWithContext(context.Background(), listVPNServerRoutesOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListVPNServerRoutesWithContext is an alternate form of the ListVPNServerRoutes method which supports a Context parameter func (vpc *VpcV1) ListVPNServerRoutesWithContext(ctx context.Context, listVPNServerRoutesOptions *ListVPNServerRoutesOptions) (result *VPNServerRouteCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listVPNServerRoutesOptions, "listVPNServerRoutesOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listVPNServerRoutesOptions, "listVPNServerRoutesOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -22355,6 +25547,7 @@ func (vpc *VpcV1) ListVPNServerRoutesWithContext(ctx context.Context, listVPNSer builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_servers/{vpn_server_id}/routes`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -22382,17 +25575,21 @@ func (vpc *VpcV1) ListVPNServerRoutesWithContext(ctx context.Context, listVPNSer request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_vpn_server_routes", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNServerRouteCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -22407,17 +25604,21 @@ func (vpc *VpcV1) ListVPNServerRoutesWithContext(ctx context.Context, listVPNSer // route matching their specified destinations. All VPN routes must be unique within the VPN server. destination of the // packet. func (vpc *VpcV1) CreateVPNServerRoute(createVPNServerRouteOptions *CreateVPNServerRouteOptions) (result *VPNServerRoute, response *core.DetailedResponse, err error) { - return vpc.CreateVPNServerRouteWithContext(context.Background(), createVPNServerRouteOptions) + result, response, err = vpc.CreateVPNServerRouteWithContext(context.Background(), createVPNServerRouteOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateVPNServerRouteWithContext is an alternate form of the CreateVPNServerRoute method which supports a Context parameter func (vpc *VpcV1) CreateVPNServerRouteWithContext(ctx context.Context, createVPNServerRouteOptions *CreateVPNServerRouteOptions) (result *VPNServerRoute, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createVPNServerRouteOptions, "createVPNServerRouteOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createVPNServerRouteOptions, "createVPNServerRouteOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -22430,6 +25631,7 @@ func (vpc *VpcV1) CreateVPNServerRouteWithContext(ctx context.Context, createVPN builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_servers/{vpn_server_id}/routes`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -22459,22 +25661,27 @@ func (vpc *VpcV1) CreateVPNServerRouteWithContext(ctx context.Context, createVPN } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_vpn_server_route", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNServerRoute) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -22486,17 +25693,21 @@ func (vpc *VpcV1) CreateVPNServerRouteWithContext(ctx context.Context, createVPN // DeleteVPNServerRoute : Delete a VPN route // This request deletes a VPN route. This operation cannot be reversed. func (vpc *VpcV1) DeleteVPNServerRoute(deleteVPNServerRouteOptions *DeleteVPNServerRouteOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteVPNServerRouteWithContext(context.Background(), deleteVPNServerRouteOptions) + response, err = vpc.DeleteVPNServerRouteWithContext(context.Background(), deleteVPNServerRouteOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteVPNServerRouteWithContext is an alternate form of the DeleteVPNServerRoute method which supports a Context parameter func (vpc *VpcV1) DeleteVPNServerRouteWithContext(ctx context.Context, deleteVPNServerRouteOptions *DeleteVPNServerRouteOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteVPNServerRouteOptions, "deleteVPNServerRouteOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteVPNServerRouteOptions, "deleteVPNServerRouteOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -22510,6 +25721,7 @@ func (vpc *VpcV1) DeleteVPNServerRouteWithContext(ctx context.Context, deleteVPN builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_servers/{vpn_server_id}/routes/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -22527,10 +25739,16 @@ func (vpc *VpcV1) DeleteVPNServerRouteWithContext(ctx context.Context, deleteVPN request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_vpn_server_route", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -22538,17 +25756,21 @@ func (vpc *VpcV1) DeleteVPNServerRouteWithContext(ctx context.Context, deleteVPN // GetVPNServerRoute : Retrieve a VPN route // This request retrieves a single VPN route specified by the identifier in the URL. func (vpc *VpcV1) GetVPNServerRoute(getVPNServerRouteOptions *GetVPNServerRouteOptions) (result *VPNServerRoute, response *core.DetailedResponse, err error) { - return vpc.GetVPNServerRouteWithContext(context.Background(), getVPNServerRouteOptions) + result, response, err = vpc.GetVPNServerRouteWithContext(context.Background(), getVPNServerRouteOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetVPNServerRouteWithContext is an alternate form of the GetVPNServerRoute method which supports a Context parameter func (vpc *VpcV1) GetVPNServerRouteWithContext(ctx context.Context, getVPNServerRouteOptions *GetVPNServerRouteOptions) (result *VPNServerRoute, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getVPNServerRouteOptions, "getVPNServerRouteOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getVPNServerRouteOptions, "getVPNServerRouteOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -22562,6 +25784,7 @@ func (vpc *VpcV1) GetVPNServerRouteWithContext(ctx context.Context, getVPNServer builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_servers/{vpn_server_id}/routes/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -22580,17 +25803,21 @@ func (vpc *VpcV1) GetVPNServerRouteWithContext(ctx context.Context, getVPNServer request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_vpn_server_route", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNServerRoute) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -22603,17 +25830,21 @@ func (vpc *VpcV1) GetVPNServerRouteWithContext(ctx context.Context, getVPNServer // This request updates a VPN route with the information in a provided VPN route patch. The VPN route patch object is // structured in the same way as a retrieved VPN route and contains only the information to be updated. func (vpc *VpcV1) UpdateVPNServerRoute(updateVPNServerRouteOptions *UpdateVPNServerRouteOptions) (result *VPNServerRoute, response *core.DetailedResponse, err error) { - return vpc.UpdateVPNServerRouteWithContext(context.Background(), updateVPNServerRouteOptions) + result, response, err = vpc.UpdateVPNServerRouteWithContext(context.Background(), updateVPNServerRouteOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateVPNServerRouteWithContext is an alternate form of the UpdateVPNServerRoute method which supports a Context parameter func (vpc *VpcV1) UpdateVPNServerRouteWithContext(ctx context.Context, updateVPNServerRouteOptions *UpdateVPNServerRouteOptions) (result *VPNServerRoute, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateVPNServerRouteOptions, "updateVPNServerRouteOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateVPNServerRouteOptions, "updateVPNServerRouteOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -22627,6 +25858,7 @@ func (vpc *VpcV1) UpdateVPNServerRouteWithContext(ctx context.Context, updateVPN builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_servers/{vpn_server_id}/routes/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -22646,22 +25878,27 @@ func (vpc *VpcV1) UpdateVPNServerRouteWithContext(ctx context.Context, updateVPN _, err = builder.SetBodyContentJSON(updateVPNServerRouteOptions.VPNServerRoutePatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_vpn_server_route", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNServerRoute) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -22674,13 +25911,16 @@ func (vpc *VpcV1) UpdateVPNServerRouteWithContext(ctx context.Context, updateVPN // This request lists all load balancer profiles available in the region. A load balancer profile specifies the // performance characteristics and pricing model for a load balancer. func (vpc *VpcV1) ListLoadBalancerProfiles(listLoadBalancerProfilesOptions *ListLoadBalancerProfilesOptions) (result *LoadBalancerProfileCollection, response *core.DetailedResponse, err error) { - return vpc.ListLoadBalancerProfilesWithContext(context.Background(), listLoadBalancerProfilesOptions) + result, response, err = vpc.ListLoadBalancerProfilesWithContext(context.Background(), listLoadBalancerProfilesOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListLoadBalancerProfilesWithContext is an alternate form of the ListLoadBalancerProfiles method which supports a Context parameter func (vpc *VpcV1) ListLoadBalancerProfilesWithContext(ctx context.Context, listLoadBalancerProfilesOptions *ListLoadBalancerProfilesOptions) (result *LoadBalancerProfileCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listLoadBalancerProfilesOptions, "listLoadBalancerProfilesOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -22689,6 +25929,7 @@ func (vpc *VpcV1) ListLoadBalancerProfilesWithContext(ctx context.Context, listL builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancer/profiles`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -22713,17 +25954,21 @@ func (vpc *VpcV1) ListLoadBalancerProfilesWithContext(ctx context.Context, listL request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_load_balancer_profiles", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerProfileCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -22735,17 +25980,21 @@ func (vpc *VpcV1) ListLoadBalancerProfilesWithContext(ctx context.Context, listL // GetLoadBalancerProfile : Retrieve a load balancer profile // This request retrieves a load balancer profile specified by the name in the URL. func (vpc *VpcV1) GetLoadBalancerProfile(getLoadBalancerProfileOptions *GetLoadBalancerProfileOptions) (result *LoadBalancerProfile, response *core.DetailedResponse, err error) { - return vpc.GetLoadBalancerProfileWithContext(context.Background(), getLoadBalancerProfileOptions) + result, response, err = vpc.GetLoadBalancerProfileWithContext(context.Background(), getLoadBalancerProfileOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetLoadBalancerProfileWithContext is an alternate form of the GetLoadBalancerProfile method which supports a Context parameter func (vpc *VpcV1) GetLoadBalancerProfileWithContext(ctx context.Context, getLoadBalancerProfileOptions *GetLoadBalancerProfileOptions) (result *LoadBalancerProfile, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getLoadBalancerProfileOptions, "getLoadBalancerProfileOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getLoadBalancerProfileOptions, "getLoadBalancerProfileOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -22758,6 +26007,7 @@ func (vpc *VpcV1) GetLoadBalancerProfileWithContext(ctx context.Context, getLoad builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancer/profiles/{name}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -22776,17 +26026,21 @@ func (vpc *VpcV1) GetLoadBalancerProfileWithContext(ctx context.Context, getLoad request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_load_balancer_profile", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerProfile) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -22798,13 +26052,16 @@ func (vpc *VpcV1) GetLoadBalancerProfileWithContext(ctx context.Context, getLoad // ListLoadBalancers : List all load balancers // This request lists all load balancers in the region. func (vpc *VpcV1) ListLoadBalancers(listLoadBalancersOptions *ListLoadBalancersOptions) (result *LoadBalancerCollection, response *core.DetailedResponse, err error) { - return vpc.ListLoadBalancersWithContext(context.Background(), listLoadBalancersOptions) + result, response, err = vpc.ListLoadBalancersWithContext(context.Background(), listLoadBalancersOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListLoadBalancersWithContext is an alternate form of the ListLoadBalancers method which supports a Context parameter func (vpc *VpcV1) ListLoadBalancersWithContext(ctx context.Context, listLoadBalancersOptions *ListLoadBalancersOptions) (result *LoadBalancerCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listLoadBalancersOptions, "listLoadBalancersOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -22813,6 +26070,7 @@ func (vpc *VpcV1) ListLoadBalancersWithContext(ctx context.Context, listLoadBala builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -22837,17 +26095,21 @@ func (vpc *VpcV1) ListLoadBalancersWithContext(ctx context.Context, listLoadBala request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_load_balancers", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -22859,17 +26121,21 @@ func (vpc *VpcV1) ListLoadBalancersWithContext(ctx context.Context, listLoadBala // CreateLoadBalancer : Create a load balancer // This request creates and provisions a new load balancer. func (vpc *VpcV1) CreateLoadBalancer(createLoadBalancerOptions *CreateLoadBalancerOptions) (result *LoadBalancer, response *core.DetailedResponse, err error) { - return vpc.CreateLoadBalancerWithContext(context.Background(), createLoadBalancerOptions) + result, response, err = vpc.CreateLoadBalancerWithContext(context.Background(), createLoadBalancerOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateLoadBalancerWithContext is an alternate form of the CreateLoadBalancer method which supports a Context parameter func (vpc *VpcV1) CreateLoadBalancerWithContext(ctx context.Context, createLoadBalancerOptions *CreateLoadBalancerOptions) (result *LoadBalancer, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createLoadBalancerOptions, "createLoadBalancerOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createLoadBalancerOptions, "createLoadBalancerOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -22878,6 +26144,7 @@ func (vpc *VpcV1) CreateLoadBalancerWithContext(ctx context.Context, createLoadB builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -22931,22 +26198,27 @@ func (vpc *VpcV1) CreateLoadBalancerWithContext(ctx context.Context, createLoadB } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_load_balancer", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancer) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -22959,17 +26231,21 @@ func (vpc *VpcV1) CreateLoadBalancerWithContext(ctx context.Context, createLoadB // This request deletes a load balancer. This operation cannot be reversed. A load balancer cannot be deleted if its // `provisioning_status` is `delete_pending` or it is referenced by a resource. func (vpc *VpcV1) DeleteLoadBalancer(deleteLoadBalancerOptions *DeleteLoadBalancerOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteLoadBalancerWithContext(context.Background(), deleteLoadBalancerOptions) + response, err = vpc.DeleteLoadBalancerWithContext(context.Background(), deleteLoadBalancerOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteLoadBalancerWithContext is an alternate form of the DeleteLoadBalancer method which supports a Context parameter func (vpc *VpcV1) DeleteLoadBalancerWithContext(ctx context.Context, deleteLoadBalancerOptions *DeleteLoadBalancerOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteLoadBalancerOptions, "deleteLoadBalancerOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteLoadBalancerOptions, "deleteLoadBalancerOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -22982,6 +26258,7 @@ func (vpc *VpcV1) DeleteLoadBalancerWithContext(ctx context.Context, deleteLoadB builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -23002,10 +26279,16 @@ func (vpc *VpcV1) DeleteLoadBalancerWithContext(ctx context.Context, deleteLoadB request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_load_balancer", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -23013,17 +26296,21 @@ func (vpc *VpcV1) DeleteLoadBalancerWithContext(ctx context.Context, deleteLoadB // GetLoadBalancer : Retrieve a load balancer // This request retrieves a single load balancer specified by the identifier in the URL path. func (vpc *VpcV1) GetLoadBalancer(getLoadBalancerOptions *GetLoadBalancerOptions) (result *LoadBalancer, response *core.DetailedResponse, err error) { - return vpc.GetLoadBalancerWithContext(context.Background(), getLoadBalancerOptions) + result, response, err = vpc.GetLoadBalancerWithContext(context.Background(), getLoadBalancerOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetLoadBalancerWithContext is an alternate form of the GetLoadBalancer method which supports a Context parameter func (vpc *VpcV1) GetLoadBalancerWithContext(ctx context.Context, getLoadBalancerOptions *GetLoadBalancerOptions) (result *LoadBalancer, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getLoadBalancerOptions, "getLoadBalancerOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getLoadBalancerOptions, "getLoadBalancerOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -23036,6 +26323,7 @@ func (vpc *VpcV1) GetLoadBalancerWithContext(ctx context.Context, getLoadBalance builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -23054,17 +26342,21 @@ func (vpc *VpcV1) GetLoadBalancerWithContext(ctx context.Context, getLoadBalance request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_load_balancer", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancer) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -23078,17 +26370,21 @@ func (vpc *VpcV1) GetLoadBalancerWithContext(ctx context.Context, getLoadBalance // object is structured in the same way as a retrieved load balancer and contains only the information to be updated. A // load balancer can only be updated if its `provisioning_status` is `active`. func (vpc *VpcV1) UpdateLoadBalancer(updateLoadBalancerOptions *UpdateLoadBalancerOptions) (result *LoadBalancer, response *core.DetailedResponse, err error) { - return vpc.UpdateLoadBalancerWithContext(context.Background(), updateLoadBalancerOptions) + result, response, err = vpc.UpdateLoadBalancerWithContext(context.Background(), updateLoadBalancerOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateLoadBalancerWithContext is an alternate form of the UpdateLoadBalancer method which supports a Context parameter func (vpc *VpcV1) UpdateLoadBalancerWithContext(ctx context.Context, updateLoadBalancerOptions *UpdateLoadBalancerOptions) (result *LoadBalancer, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateLoadBalancerOptions, "updateLoadBalancerOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateLoadBalancerOptions, "updateLoadBalancerOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -23101,6 +26397,7 @@ func (vpc *VpcV1) UpdateLoadBalancerWithContext(ctx context.Context, updateLoadB builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -23123,22 +26420,27 @@ func (vpc *VpcV1) UpdateLoadBalancerWithContext(ctx context.Context, updateLoadB _, err = builder.SetBodyContentJSON(updateLoadBalancerOptions.LoadBalancerPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_load_balancer", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancer) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -23150,17 +26452,21 @@ func (vpc *VpcV1) UpdateLoadBalancerWithContext(ctx context.Context, updateLoadB // GetLoadBalancerStatistics : List all statistics of a load balancer // This request lists statistics of a load balancer. func (vpc *VpcV1) GetLoadBalancerStatistics(getLoadBalancerStatisticsOptions *GetLoadBalancerStatisticsOptions) (result *LoadBalancerStatistics, response *core.DetailedResponse, err error) { - return vpc.GetLoadBalancerStatisticsWithContext(context.Background(), getLoadBalancerStatisticsOptions) + result, response, err = vpc.GetLoadBalancerStatisticsWithContext(context.Background(), getLoadBalancerStatisticsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetLoadBalancerStatisticsWithContext is an alternate form of the GetLoadBalancerStatistics method which supports a Context parameter func (vpc *VpcV1) GetLoadBalancerStatisticsWithContext(ctx context.Context, getLoadBalancerStatisticsOptions *GetLoadBalancerStatisticsOptions) (result *LoadBalancerStatistics, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getLoadBalancerStatisticsOptions, "getLoadBalancerStatisticsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getLoadBalancerStatisticsOptions, "getLoadBalancerStatisticsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -23173,6 +26479,7 @@ func (vpc *VpcV1) GetLoadBalancerStatisticsWithContext(ctx context.Context, getL builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{id}/statistics`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -23191,17 +26498,21 @@ func (vpc *VpcV1) GetLoadBalancerStatisticsWithContext(ctx context.Context, getL request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_load_balancer_statistics", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerStatistics) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -23213,17 +26524,21 @@ func (vpc *VpcV1) GetLoadBalancerStatisticsWithContext(ctx context.Context, getL // ListLoadBalancerListeners : List all listeners for a load balancer // This request lists all listeners for a load balancer. func (vpc *VpcV1) ListLoadBalancerListeners(listLoadBalancerListenersOptions *ListLoadBalancerListenersOptions) (result *LoadBalancerListenerCollection, response *core.DetailedResponse, err error) { - return vpc.ListLoadBalancerListenersWithContext(context.Background(), listLoadBalancerListenersOptions) + result, response, err = vpc.ListLoadBalancerListenersWithContext(context.Background(), listLoadBalancerListenersOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListLoadBalancerListenersWithContext is an alternate form of the ListLoadBalancerListeners method which supports a Context parameter func (vpc *VpcV1) ListLoadBalancerListenersWithContext(ctx context.Context, listLoadBalancerListenersOptions *ListLoadBalancerListenersOptions) (result *LoadBalancerListenerCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listLoadBalancerListenersOptions, "listLoadBalancerListenersOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listLoadBalancerListenersOptions, "listLoadBalancerListenersOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -23236,6 +26551,7 @@ func (vpc *VpcV1) ListLoadBalancerListenersWithContext(ctx context.Context, list builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -23254,17 +26570,21 @@ func (vpc *VpcV1) ListLoadBalancerListenersWithContext(ctx context.Context, list request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_load_balancer_listeners", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -23276,17 +26596,21 @@ func (vpc *VpcV1) ListLoadBalancerListenersWithContext(ctx context.Context, list // CreateLoadBalancerListener : Create a listener for a load balancer // This request creates a new listener for a load balancer. func (vpc *VpcV1) CreateLoadBalancerListener(createLoadBalancerListenerOptions *CreateLoadBalancerListenerOptions) (result *LoadBalancerListener, response *core.DetailedResponse, err error) { - return vpc.CreateLoadBalancerListenerWithContext(context.Background(), createLoadBalancerListenerOptions) + result, response, err = vpc.CreateLoadBalancerListenerWithContext(context.Background(), createLoadBalancerListenerOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateLoadBalancerListenerWithContext is an alternate form of the CreateLoadBalancerListener method which supports a Context parameter func (vpc *VpcV1) CreateLoadBalancerListenerWithContext(ctx context.Context, createLoadBalancerListenerOptions *CreateLoadBalancerListenerOptions) (result *LoadBalancerListener, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createLoadBalancerListenerOptions, "createLoadBalancerListenerOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createLoadBalancerListenerOptions, "createLoadBalancerListenerOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -23299,6 +26623,7 @@ func (vpc *VpcV1) CreateLoadBalancerListenerWithContext(ctx context.Context, cre builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -23352,22 +26677,27 @@ func (vpc *VpcV1) CreateLoadBalancerListenerWithContext(ctx context.Context, cre } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_load_balancer_listener", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListener) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -23380,17 +26710,21 @@ func (vpc *VpcV1) CreateLoadBalancerListenerWithContext(ctx context.Context, cre // This request deletes a load balancer listener. This operation cannot be reversed. For this operation to succeed, the // listener must not be the target of another load balancer listener. func (vpc *VpcV1) DeleteLoadBalancerListener(deleteLoadBalancerListenerOptions *DeleteLoadBalancerListenerOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteLoadBalancerListenerWithContext(context.Background(), deleteLoadBalancerListenerOptions) + response, err = vpc.DeleteLoadBalancerListenerWithContext(context.Background(), deleteLoadBalancerListenerOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteLoadBalancerListenerWithContext is an alternate form of the DeleteLoadBalancerListener method which supports a Context parameter func (vpc *VpcV1) DeleteLoadBalancerListenerWithContext(ctx context.Context, deleteLoadBalancerListenerOptions *DeleteLoadBalancerListenerOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteLoadBalancerListenerOptions, "deleteLoadBalancerListenerOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteLoadBalancerListenerOptions, "deleteLoadBalancerListenerOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -23404,6 +26738,7 @@ func (vpc *VpcV1) DeleteLoadBalancerListenerWithContext(ctx context.Context, del builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -23421,10 +26756,16 @@ func (vpc *VpcV1) DeleteLoadBalancerListenerWithContext(ctx context.Context, del request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_load_balancer_listener", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -23432,17 +26773,21 @@ func (vpc *VpcV1) DeleteLoadBalancerListenerWithContext(ctx context.Context, del // GetLoadBalancerListener : Retrieve a load balancer listener // This request retrieves a single listener specified by the identifier in the URL path. func (vpc *VpcV1) GetLoadBalancerListener(getLoadBalancerListenerOptions *GetLoadBalancerListenerOptions) (result *LoadBalancerListener, response *core.DetailedResponse, err error) { - return vpc.GetLoadBalancerListenerWithContext(context.Background(), getLoadBalancerListenerOptions) + result, response, err = vpc.GetLoadBalancerListenerWithContext(context.Background(), getLoadBalancerListenerOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetLoadBalancerListenerWithContext is an alternate form of the GetLoadBalancerListener method which supports a Context parameter func (vpc *VpcV1) GetLoadBalancerListenerWithContext(ctx context.Context, getLoadBalancerListenerOptions *GetLoadBalancerListenerOptions) (result *LoadBalancerListener, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getLoadBalancerListenerOptions, "getLoadBalancerListenerOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getLoadBalancerListenerOptions, "getLoadBalancerListenerOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -23456,6 +26801,7 @@ func (vpc *VpcV1) GetLoadBalancerListenerWithContext(ctx context.Context, getLoa builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -23474,17 +26820,21 @@ func (vpc *VpcV1) GetLoadBalancerListenerWithContext(ctx context.Context, getLoa request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_load_balancer_listener", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListener) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -23496,17 +26846,21 @@ func (vpc *VpcV1) GetLoadBalancerListenerWithContext(ctx context.Context, getLoa // UpdateLoadBalancerListener : Update a load balancer listener // This request updates a load balancer listener from a listener patch. func (vpc *VpcV1) UpdateLoadBalancerListener(updateLoadBalancerListenerOptions *UpdateLoadBalancerListenerOptions) (result *LoadBalancerListener, response *core.DetailedResponse, err error) { - return vpc.UpdateLoadBalancerListenerWithContext(context.Background(), updateLoadBalancerListenerOptions) + result, response, err = vpc.UpdateLoadBalancerListenerWithContext(context.Background(), updateLoadBalancerListenerOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateLoadBalancerListenerWithContext is an alternate form of the UpdateLoadBalancerListener method which supports a Context parameter func (vpc *VpcV1) UpdateLoadBalancerListenerWithContext(ctx context.Context, updateLoadBalancerListenerOptions *UpdateLoadBalancerListenerOptions) (result *LoadBalancerListener, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateLoadBalancerListenerOptions, "updateLoadBalancerListenerOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateLoadBalancerListenerOptions, "updateLoadBalancerListenerOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -23520,6 +26874,7 @@ func (vpc *VpcV1) UpdateLoadBalancerListenerWithContext(ctx context.Context, upd builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -23539,22 +26894,27 @@ func (vpc *VpcV1) UpdateLoadBalancerListenerWithContext(ctx context.Context, upd _, err = builder.SetBodyContentJSON(updateLoadBalancerListenerOptions.LoadBalancerListenerPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_load_balancer_listener", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListener) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -23567,17 +26927,21 @@ func (vpc *VpcV1) UpdateLoadBalancerListenerWithContext(ctx context.Context, upd // This request lists all policies for a load balancer listener. A policy consists of rules to match against each // incoming request, and an action to apply to the request if a rule matches. func (vpc *VpcV1) ListLoadBalancerListenerPolicies(listLoadBalancerListenerPoliciesOptions *ListLoadBalancerListenerPoliciesOptions) (result *LoadBalancerListenerPolicyCollection, response *core.DetailedResponse, err error) { - return vpc.ListLoadBalancerListenerPoliciesWithContext(context.Background(), listLoadBalancerListenerPoliciesOptions) + result, response, err = vpc.ListLoadBalancerListenerPoliciesWithContext(context.Background(), listLoadBalancerListenerPoliciesOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListLoadBalancerListenerPoliciesWithContext is an alternate form of the ListLoadBalancerListenerPolicies method which supports a Context parameter func (vpc *VpcV1) ListLoadBalancerListenerPoliciesWithContext(ctx context.Context, listLoadBalancerListenerPoliciesOptions *ListLoadBalancerListenerPoliciesOptions) (result *LoadBalancerListenerPolicyCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listLoadBalancerListenerPoliciesOptions, "listLoadBalancerListenerPoliciesOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listLoadBalancerListenerPoliciesOptions, "listLoadBalancerListenerPoliciesOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -23591,6 +26955,7 @@ func (vpc *VpcV1) ListLoadBalancerListenerPoliciesWithContext(ctx context.Contex builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -23609,17 +26974,21 @@ func (vpc *VpcV1) ListLoadBalancerListenerPoliciesWithContext(ctx context.Contex request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_load_balancer_listener_policies", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicyCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -23633,17 +27002,21 @@ func (vpc *VpcV1) ListLoadBalancerListenerPoliciesWithContext(ctx context.Contex // the same way as a retrieved policy, and contains the information necessary to create the new policy. For this request // to succeed, the listener must have a `protocol` of `http` or `https`. func (vpc *VpcV1) CreateLoadBalancerListenerPolicy(createLoadBalancerListenerPolicyOptions *CreateLoadBalancerListenerPolicyOptions) (result *LoadBalancerListenerPolicy, response *core.DetailedResponse, err error) { - return vpc.CreateLoadBalancerListenerPolicyWithContext(context.Background(), createLoadBalancerListenerPolicyOptions) + result, response, err = vpc.CreateLoadBalancerListenerPolicyWithContext(context.Background(), createLoadBalancerListenerPolicyOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateLoadBalancerListenerPolicyWithContext is an alternate form of the CreateLoadBalancerListenerPolicy method which supports a Context parameter func (vpc *VpcV1) CreateLoadBalancerListenerPolicyWithContext(ctx context.Context, createLoadBalancerListenerPolicyOptions *CreateLoadBalancerListenerPolicyOptions) (result *LoadBalancerListenerPolicy, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createLoadBalancerListenerPolicyOptions, "createLoadBalancerListenerPolicyOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createLoadBalancerListenerPolicyOptions, "createLoadBalancerListenerPolicyOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -23657,6 +27030,7 @@ func (vpc *VpcV1) CreateLoadBalancerListenerPolicyWithContext(ctx context.Contex builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -23692,22 +27066,27 @@ func (vpc *VpcV1) CreateLoadBalancerListenerPolicyWithContext(ctx context.Contex } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_load_balancer_listener_policy", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicy) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -23719,17 +27098,21 @@ func (vpc *VpcV1) CreateLoadBalancerListenerPolicyWithContext(ctx context.Contex // DeleteLoadBalancerListenerPolicy : Delete a load balancer listener policy // Deletes a policy of the load balancer listener. This operation cannot be reversed. func (vpc *VpcV1) DeleteLoadBalancerListenerPolicy(deleteLoadBalancerListenerPolicyOptions *DeleteLoadBalancerListenerPolicyOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteLoadBalancerListenerPolicyWithContext(context.Background(), deleteLoadBalancerListenerPolicyOptions) + response, err = vpc.DeleteLoadBalancerListenerPolicyWithContext(context.Background(), deleteLoadBalancerListenerPolicyOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteLoadBalancerListenerPolicyWithContext is an alternate form of the DeleteLoadBalancerListenerPolicy method which supports a Context parameter func (vpc *VpcV1) DeleteLoadBalancerListenerPolicyWithContext(ctx context.Context, deleteLoadBalancerListenerPolicyOptions *DeleteLoadBalancerListenerPolicyOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteLoadBalancerListenerPolicyOptions, "deleteLoadBalancerListenerPolicyOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteLoadBalancerListenerPolicyOptions, "deleteLoadBalancerListenerPolicyOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -23744,6 +27127,7 @@ func (vpc *VpcV1) DeleteLoadBalancerListenerPolicyWithContext(ctx context.Contex builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -23761,10 +27145,16 @@ func (vpc *VpcV1) DeleteLoadBalancerListenerPolicyWithContext(ctx context.Contex request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_load_balancer_listener_policy", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -23772,17 +27162,21 @@ func (vpc *VpcV1) DeleteLoadBalancerListenerPolicyWithContext(ctx context.Contex // GetLoadBalancerListenerPolicy : Retrieve a load balancer listener policy // Retrieve a single policy specified by the identifier in the URL path. func (vpc *VpcV1) GetLoadBalancerListenerPolicy(getLoadBalancerListenerPolicyOptions *GetLoadBalancerListenerPolicyOptions) (result *LoadBalancerListenerPolicy, response *core.DetailedResponse, err error) { - return vpc.GetLoadBalancerListenerPolicyWithContext(context.Background(), getLoadBalancerListenerPolicyOptions) + result, response, err = vpc.GetLoadBalancerListenerPolicyWithContext(context.Background(), getLoadBalancerListenerPolicyOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetLoadBalancerListenerPolicyWithContext is an alternate form of the GetLoadBalancerListenerPolicy method which supports a Context parameter func (vpc *VpcV1) GetLoadBalancerListenerPolicyWithContext(ctx context.Context, getLoadBalancerListenerPolicyOptions *GetLoadBalancerListenerPolicyOptions) (result *LoadBalancerListenerPolicy, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getLoadBalancerListenerPolicyOptions, "getLoadBalancerListenerPolicyOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getLoadBalancerListenerPolicyOptions, "getLoadBalancerListenerPolicyOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -23797,6 +27191,7 @@ func (vpc *VpcV1) GetLoadBalancerListenerPolicyWithContext(ctx context.Context, builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -23815,17 +27210,21 @@ func (vpc *VpcV1) GetLoadBalancerListenerPolicyWithContext(ctx context.Context, request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_load_balancer_listener_policy", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicy) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -23838,17 +27237,21 @@ func (vpc *VpcV1) GetLoadBalancerListenerPolicyWithContext(ctx context.Context, // This request updates a load balancer listener policy with the information in a provided policy patch. The policy // patch object is structured in the same way as a retrieved policy and contains only the information to be updated. func (vpc *VpcV1) UpdateLoadBalancerListenerPolicy(updateLoadBalancerListenerPolicyOptions *UpdateLoadBalancerListenerPolicyOptions) (result *LoadBalancerListenerPolicy, response *core.DetailedResponse, err error) { - return vpc.UpdateLoadBalancerListenerPolicyWithContext(context.Background(), updateLoadBalancerListenerPolicyOptions) + result, response, err = vpc.UpdateLoadBalancerListenerPolicyWithContext(context.Background(), updateLoadBalancerListenerPolicyOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateLoadBalancerListenerPolicyWithContext is an alternate form of the UpdateLoadBalancerListenerPolicy method which supports a Context parameter func (vpc *VpcV1) UpdateLoadBalancerListenerPolicyWithContext(ctx context.Context, updateLoadBalancerListenerPolicyOptions *UpdateLoadBalancerListenerPolicyOptions) (result *LoadBalancerListenerPolicy, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateLoadBalancerListenerPolicyOptions, "updateLoadBalancerListenerPolicyOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateLoadBalancerListenerPolicyOptions, "updateLoadBalancerListenerPolicyOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -23863,6 +27266,7 @@ func (vpc *VpcV1) UpdateLoadBalancerListenerPolicyWithContext(ctx context.Contex builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -23882,22 +27286,27 @@ func (vpc *VpcV1) UpdateLoadBalancerListenerPolicyWithContext(ctx context.Contex _, err = builder.SetBodyContentJSON(updateLoadBalancerListenerPolicyOptions.LoadBalancerListenerPolicyPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_load_balancer_listener_policy", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicy) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -23909,17 +27318,21 @@ func (vpc *VpcV1) UpdateLoadBalancerListenerPolicyWithContext(ctx context.Contex // ListLoadBalancerListenerPolicyRules : List all rules of a load balancer listener policy // This request lists all rules of a load balancer listener policy. func (vpc *VpcV1) ListLoadBalancerListenerPolicyRules(listLoadBalancerListenerPolicyRulesOptions *ListLoadBalancerListenerPolicyRulesOptions) (result *LoadBalancerListenerPolicyRuleCollection, response *core.DetailedResponse, err error) { - return vpc.ListLoadBalancerListenerPolicyRulesWithContext(context.Background(), listLoadBalancerListenerPolicyRulesOptions) + result, response, err = vpc.ListLoadBalancerListenerPolicyRulesWithContext(context.Background(), listLoadBalancerListenerPolicyRulesOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListLoadBalancerListenerPolicyRulesWithContext is an alternate form of the ListLoadBalancerListenerPolicyRules method which supports a Context parameter func (vpc *VpcV1) ListLoadBalancerListenerPolicyRulesWithContext(ctx context.Context, listLoadBalancerListenerPolicyRulesOptions *ListLoadBalancerListenerPolicyRulesOptions) (result *LoadBalancerListenerPolicyRuleCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listLoadBalancerListenerPolicyRulesOptions, "listLoadBalancerListenerPolicyRulesOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listLoadBalancerListenerPolicyRulesOptions, "listLoadBalancerListenerPolicyRulesOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -23934,6 +27347,7 @@ func (vpc *VpcV1) ListLoadBalancerListenerPolicyRulesWithContext(ctx context.Con builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -23952,17 +27366,21 @@ func (vpc *VpcV1) ListLoadBalancerListenerPolicyRulesWithContext(ctx context.Con request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_load_balancer_listener_policy_rules", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicyRuleCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -23974,17 +27392,21 @@ func (vpc *VpcV1) ListLoadBalancerListenerPolicyRulesWithContext(ctx context.Con // CreateLoadBalancerListenerPolicyRule : Create a rule for a load balancer listener policy // Creates a new rule for the load balancer listener policy. func (vpc *VpcV1) CreateLoadBalancerListenerPolicyRule(createLoadBalancerListenerPolicyRuleOptions *CreateLoadBalancerListenerPolicyRuleOptions) (result *LoadBalancerListenerPolicyRule, response *core.DetailedResponse, err error) { - return vpc.CreateLoadBalancerListenerPolicyRuleWithContext(context.Background(), createLoadBalancerListenerPolicyRuleOptions) + result, response, err = vpc.CreateLoadBalancerListenerPolicyRuleWithContext(context.Background(), createLoadBalancerListenerPolicyRuleOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateLoadBalancerListenerPolicyRuleWithContext is an alternate form of the CreateLoadBalancerListenerPolicyRule method which supports a Context parameter func (vpc *VpcV1) CreateLoadBalancerListenerPolicyRuleWithContext(ctx context.Context, createLoadBalancerListenerPolicyRuleOptions *CreateLoadBalancerListenerPolicyRuleOptions) (result *LoadBalancerListenerPolicyRule, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createLoadBalancerListenerPolicyRuleOptions, "createLoadBalancerListenerPolicyRuleOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createLoadBalancerListenerPolicyRuleOptions, "createLoadBalancerListenerPolicyRuleOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -23999,6 +27421,7 @@ func (vpc *VpcV1) CreateLoadBalancerListenerPolicyRuleWithContext(ctx context.Co builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -24031,22 +27454,27 @@ func (vpc *VpcV1) CreateLoadBalancerListenerPolicyRuleWithContext(ctx context.Co } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_load_balancer_listener_policy_rule", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicyRule) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -24058,17 +27486,21 @@ func (vpc *VpcV1) CreateLoadBalancerListenerPolicyRuleWithContext(ctx context.Co // DeleteLoadBalancerListenerPolicyRule : Delete a load balancer listener policy rule // Deletes a rule from the load balancer listener policy. This operation cannot be reversed. func (vpc *VpcV1) DeleteLoadBalancerListenerPolicyRule(deleteLoadBalancerListenerPolicyRuleOptions *DeleteLoadBalancerListenerPolicyRuleOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteLoadBalancerListenerPolicyRuleWithContext(context.Background(), deleteLoadBalancerListenerPolicyRuleOptions) + response, err = vpc.DeleteLoadBalancerListenerPolicyRuleWithContext(context.Background(), deleteLoadBalancerListenerPolicyRuleOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteLoadBalancerListenerPolicyRuleWithContext is an alternate form of the DeleteLoadBalancerListenerPolicyRule method which supports a Context parameter func (vpc *VpcV1) DeleteLoadBalancerListenerPolicyRuleWithContext(ctx context.Context, deleteLoadBalancerListenerPolicyRuleOptions *DeleteLoadBalancerListenerPolicyRuleOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteLoadBalancerListenerPolicyRuleOptions, "deleteLoadBalancerListenerPolicyRuleOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteLoadBalancerListenerPolicyRuleOptions, "deleteLoadBalancerListenerPolicyRuleOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -24084,6 +27516,7 @@ func (vpc *VpcV1) DeleteLoadBalancerListenerPolicyRuleWithContext(ctx context.Co builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -24101,10 +27534,16 @@ func (vpc *VpcV1) DeleteLoadBalancerListenerPolicyRuleWithContext(ctx context.Co request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_load_balancer_listener_policy_rule", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -24112,17 +27551,21 @@ func (vpc *VpcV1) DeleteLoadBalancerListenerPolicyRuleWithContext(ctx context.Co // GetLoadBalancerListenerPolicyRule : Retrieve a load balancer listener policy rule // Retrieves a single rule specified by the identifier in the URL path. func (vpc *VpcV1) GetLoadBalancerListenerPolicyRule(getLoadBalancerListenerPolicyRuleOptions *GetLoadBalancerListenerPolicyRuleOptions) (result *LoadBalancerListenerPolicyRule, response *core.DetailedResponse, err error) { - return vpc.GetLoadBalancerListenerPolicyRuleWithContext(context.Background(), getLoadBalancerListenerPolicyRuleOptions) + result, response, err = vpc.GetLoadBalancerListenerPolicyRuleWithContext(context.Background(), getLoadBalancerListenerPolicyRuleOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetLoadBalancerListenerPolicyRuleWithContext is an alternate form of the GetLoadBalancerListenerPolicyRule method which supports a Context parameter func (vpc *VpcV1) GetLoadBalancerListenerPolicyRuleWithContext(ctx context.Context, getLoadBalancerListenerPolicyRuleOptions *GetLoadBalancerListenerPolicyRuleOptions) (result *LoadBalancerListenerPolicyRule, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getLoadBalancerListenerPolicyRuleOptions, "getLoadBalancerListenerPolicyRuleOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getLoadBalancerListenerPolicyRuleOptions, "getLoadBalancerListenerPolicyRuleOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -24138,6 +27581,7 @@ func (vpc *VpcV1) GetLoadBalancerListenerPolicyRuleWithContext(ctx context.Conte builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -24156,17 +27600,21 @@ func (vpc *VpcV1) GetLoadBalancerListenerPolicyRuleWithContext(ctx context.Conte request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_load_balancer_listener_policy_rule", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicyRule) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -24178,17 +27626,21 @@ func (vpc *VpcV1) GetLoadBalancerListenerPolicyRuleWithContext(ctx context.Conte // UpdateLoadBalancerListenerPolicyRule : Update a load balancer listener policy rule // Updates a rule of the load balancer listener policy. func (vpc *VpcV1) UpdateLoadBalancerListenerPolicyRule(updateLoadBalancerListenerPolicyRuleOptions *UpdateLoadBalancerListenerPolicyRuleOptions) (result *LoadBalancerListenerPolicyRule, response *core.DetailedResponse, err error) { - return vpc.UpdateLoadBalancerListenerPolicyRuleWithContext(context.Background(), updateLoadBalancerListenerPolicyRuleOptions) + result, response, err = vpc.UpdateLoadBalancerListenerPolicyRuleWithContext(context.Background(), updateLoadBalancerListenerPolicyRuleOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateLoadBalancerListenerPolicyRuleWithContext is an alternate form of the UpdateLoadBalancerListenerPolicyRule method which supports a Context parameter func (vpc *VpcV1) UpdateLoadBalancerListenerPolicyRuleWithContext(ctx context.Context, updateLoadBalancerListenerPolicyRuleOptions *UpdateLoadBalancerListenerPolicyRuleOptions) (result *LoadBalancerListenerPolicyRule, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateLoadBalancerListenerPolicyRuleOptions, "updateLoadBalancerListenerPolicyRuleOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateLoadBalancerListenerPolicyRuleOptions, "updateLoadBalancerListenerPolicyRuleOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -24204,6 +27656,7 @@ func (vpc *VpcV1) UpdateLoadBalancerListenerPolicyRuleWithContext(ctx context.Co builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -24223,22 +27676,27 @@ func (vpc *VpcV1) UpdateLoadBalancerListenerPolicyRuleWithContext(ctx context.Co _, err = builder.SetBodyContentJSON(updateLoadBalancerListenerPolicyRuleOptions.LoadBalancerListenerPolicyRulePatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_load_balancer_listener_policy_rule", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicyRule) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -24250,17 +27708,21 @@ func (vpc *VpcV1) UpdateLoadBalancerListenerPolicyRuleWithContext(ctx context.Co // ListLoadBalancerPools : List all pools of a load balancer // This request lists all pools of a load balancer. func (vpc *VpcV1) ListLoadBalancerPools(listLoadBalancerPoolsOptions *ListLoadBalancerPoolsOptions) (result *LoadBalancerPoolCollection, response *core.DetailedResponse, err error) { - return vpc.ListLoadBalancerPoolsWithContext(context.Background(), listLoadBalancerPoolsOptions) + result, response, err = vpc.ListLoadBalancerPoolsWithContext(context.Background(), listLoadBalancerPoolsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListLoadBalancerPoolsWithContext is an alternate form of the ListLoadBalancerPools method which supports a Context parameter func (vpc *VpcV1) ListLoadBalancerPoolsWithContext(ctx context.Context, listLoadBalancerPoolsOptions *ListLoadBalancerPoolsOptions) (result *LoadBalancerPoolCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listLoadBalancerPoolsOptions, "listLoadBalancerPoolsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listLoadBalancerPoolsOptions, "listLoadBalancerPoolsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -24273,6 +27735,7 @@ func (vpc *VpcV1) ListLoadBalancerPoolsWithContext(ctx context.Context, listLoad builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -24291,17 +27754,21 @@ func (vpc *VpcV1) ListLoadBalancerPoolsWithContext(ctx context.Context, listLoad request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_load_balancer_pools", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPoolCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -24313,17 +27780,21 @@ func (vpc *VpcV1) ListLoadBalancerPoolsWithContext(ctx context.Context, listLoad // CreateLoadBalancerPool : Create a load balancer pool // This request creates a new pool from a pool prototype object. func (vpc *VpcV1) CreateLoadBalancerPool(createLoadBalancerPoolOptions *CreateLoadBalancerPoolOptions) (result *LoadBalancerPool, response *core.DetailedResponse, err error) { - return vpc.CreateLoadBalancerPoolWithContext(context.Background(), createLoadBalancerPoolOptions) + result, response, err = vpc.CreateLoadBalancerPoolWithContext(context.Background(), createLoadBalancerPoolOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateLoadBalancerPoolWithContext is an alternate form of the CreateLoadBalancerPool method which supports a Context parameter func (vpc *VpcV1) CreateLoadBalancerPoolWithContext(ctx context.Context, createLoadBalancerPoolOptions *CreateLoadBalancerPoolOptions) (result *LoadBalancerPool, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createLoadBalancerPoolOptions, "createLoadBalancerPoolOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createLoadBalancerPoolOptions, "createLoadBalancerPoolOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -24336,6 +27807,7 @@ func (vpc *VpcV1) CreateLoadBalancerPoolWithContext(ctx context.Context, createL builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -24377,22 +27849,27 @@ func (vpc *VpcV1) CreateLoadBalancerPoolWithContext(ctx context.Context, createL } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_load_balancer_pool", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPool) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -24405,17 +27882,21 @@ func (vpc *VpcV1) CreateLoadBalancerPoolWithContext(ctx context.Context, createL // This request deletes a load balancer pool. This operation cannot be reversed. The pool must not currently be the // default pool for any listener in the load balancer. func (vpc *VpcV1) DeleteLoadBalancerPool(deleteLoadBalancerPoolOptions *DeleteLoadBalancerPoolOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteLoadBalancerPoolWithContext(context.Background(), deleteLoadBalancerPoolOptions) + response, err = vpc.DeleteLoadBalancerPoolWithContext(context.Background(), deleteLoadBalancerPoolOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteLoadBalancerPoolWithContext is an alternate form of the DeleteLoadBalancerPool method which supports a Context parameter func (vpc *VpcV1) DeleteLoadBalancerPoolWithContext(ctx context.Context, deleteLoadBalancerPoolOptions *DeleteLoadBalancerPoolOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteLoadBalancerPoolOptions, "deleteLoadBalancerPoolOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteLoadBalancerPoolOptions, "deleteLoadBalancerPoolOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -24429,6 +27910,7 @@ func (vpc *VpcV1) DeleteLoadBalancerPoolWithContext(ctx context.Context, deleteL builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -24446,10 +27928,16 @@ func (vpc *VpcV1) DeleteLoadBalancerPoolWithContext(ctx context.Context, deleteL request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_load_balancer_pool", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -24457,17 +27945,21 @@ func (vpc *VpcV1) DeleteLoadBalancerPoolWithContext(ctx context.Context, deleteL // GetLoadBalancerPool : Retrieve a load balancer pool // This request retrieves a single pool specified by the identifier in the URL path. func (vpc *VpcV1) GetLoadBalancerPool(getLoadBalancerPoolOptions *GetLoadBalancerPoolOptions) (result *LoadBalancerPool, response *core.DetailedResponse, err error) { - return vpc.GetLoadBalancerPoolWithContext(context.Background(), getLoadBalancerPoolOptions) + result, response, err = vpc.GetLoadBalancerPoolWithContext(context.Background(), getLoadBalancerPoolOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetLoadBalancerPoolWithContext is an alternate form of the GetLoadBalancerPool method which supports a Context parameter func (vpc *VpcV1) GetLoadBalancerPoolWithContext(ctx context.Context, getLoadBalancerPoolOptions *GetLoadBalancerPoolOptions) (result *LoadBalancerPool, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getLoadBalancerPoolOptions, "getLoadBalancerPoolOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getLoadBalancerPoolOptions, "getLoadBalancerPoolOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -24481,6 +27973,7 @@ func (vpc *VpcV1) GetLoadBalancerPoolWithContext(ctx context.Context, getLoadBal builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -24499,17 +27992,21 @@ func (vpc *VpcV1) GetLoadBalancerPoolWithContext(ctx context.Context, getLoadBal request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_load_balancer_pool", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPool) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -24521,17 +28018,21 @@ func (vpc *VpcV1) GetLoadBalancerPoolWithContext(ctx context.Context, getLoadBal // UpdateLoadBalancerPool : Update a load balancer pool // This request updates a load balancer pool from a pool patch. func (vpc *VpcV1) UpdateLoadBalancerPool(updateLoadBalancerPoolOptions *UpdateLoadBalancerPoolOptions) (result *LoadBalancerPool, response *core.DetailedResponse, err error) { - return vpc.UpdateLoadBalancerPoolWithContext(context.Background(), updateLoadBalancerPoolOptions) + result, response, err = vpc.UpdateLoadBalancerPoolWithContext(context.Background(), updateLoadBalancerPoolOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateLoadBalancerPoolWithContext is an alternate form of the UpdateLoadBalancerPool method which supports a Context parameter func (vpc *VpcV1) UpdateLoadBalancerPoolWithContext(ctx context.Context, updateLoadBalancerPoolOptions *UpdateLoadBalancerPoolOptions) (result *LoadBalancerPool, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateLoadBalancerPoolOptions, "updateLoadBalancerPoolOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateLoadBalancerPoolOptions, "updateLoadBalancerPoolOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -24545,6 +28046,7 @@ func (vpc *VpcV1) UpdateLoadBalancerPoolWithContext(ctx context.Context, updateL builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -24564,22 +28066,27 @@ func (vpc *VpcV1) UpdateLoadBalancerPoolWithContext(ctx context.Context, updateL _, err = builder.SetBodyContentJSON(updateLoadBalancerPoolOptions.LoadBalancerPoolPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_load_balancer_pool", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPool) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -24591,17 +28098,21 @@ func (vpc *VpcV1) UpdateLoadBalancerPoolWithContext(ctx context.Context, updateL // ListLoadBalancerPoolMembers : List all members of a load balancer pool // This request lists all members of a load balancer pool. func (vpc *VpcV1) ListLoadBalancerPoolMembers(listLoadBalancerPoolMembersOptions *ListLoadBalancerPoolMembersOptions) (result *LoadBalancerPoolMemberCollection, response *core.DetailedResponse, err error) { - return vpc.ListLoadBalancerPoolMembersWithContext(context.Background(), listLoadBalancerPoolMembersOptions) + result, response, err = vpc.ListLoadBalancerPoolMembersWithContext(context.Background(), listLoadBalancerPoolMembersOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListLoadBalancerPoolMembersWithContext is an alternate form of the ListLoadBalancerPoolMembers method which supports a Context parameter func (vpc *VpcV1) ListLoadBalancerPoolMembersWithContext(ctx context.Context, listLoadBalancerPoolMembersOptions *ListLoadBalancerPoolMembersOptions) (result *LoadBalancerPoolMemberCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listLoadBalancerPoolMembersOptions, "listLoadBalancerPoolMembersOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listLoadBalancerPoolMembersOptions, "listLoadBalancerPoolMembersOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -24615,6 +28126,7 @@ func (vpc *VpcV1) ListLoadBalancerPoolMembersWithContext(ctx context.Context, li builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{pool_id}/members`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -24633,17 +28145,21 @@ func (vpc *VpcV1) ListLoadBalancerPoolMembersWithContext(ctx context.Context, li request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_load_balancer_pool_members", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPoolMemberCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -24655,17 +28171,21 @@ func (vpc *VpcV1) ListLoadBalancerPoolMembersWithContext(ctx context.Context, li // CreateLoadBalancerPoolMember : Create a member in a load balancer pool // This request creates a new member and adds the member to the pool. func (vpc *VpcV1) CreateLoadBalancerPoolMember(createLoadBalancerPoolMemberOptions *CreateLoadBalancerPoolMemberOptions) (result *LoadBalancerPoolMember, response *core.DetailedResponse, err error) { - return vpc.CreateLoadBalancerPoolMemberWithContext(context.Background(), createLoadBalancerPoolMemberOptions) + result, response, err = vpc.CreateLoadBalancerPoolMemberWithContext(context.Background(), createLoadBalancerPoolMemberOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateLoadBalancerPoolMemberWithContext is an alternate form of the CreateLoadBalancerPoolMember method which supports a Context parameter func (vpc *VpcV1) CreateLoadBalancerPoolMemberWithContext(ctx context.Context, createLoadBalancerPoolMemberOptions *CreateLoadBalancerPoolMemberOptions) (result *LoadBalancerPoolMember, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createLoadBalancerPoolMemberOptions, "createLoadBalancerPoolMemberOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createLoadBalancerPoolMemberOptions, "createLoadBalancerPoolMemberOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -24679,6 +28199,7 @@ func (vpc *VpcV1) CreateLoadBalancerPoolMemberWithContext(ctx context.Context, c builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{pool_id}/members`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -24708,22 +28229,27 @@ func (vpc *VpcV1) CreateLoadBalancerPoolMemberWithContext(ctx context.Context, c } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_load_balancer_pool_member", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPoolMember) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -24736,17 +28262,21 @@ func (vpc *VpcV1) CreateLoadBalancerPoolMemberWithContext(ctx context.Context, c // This request replaces the existing members of the load balancer pool with new members created from the collection of // member prototype objects. func (vpc *VpcV1) ReplaceLoadBalancerPoolMembers(replaceLoadBalancerPoolMembersOptions *ReplaceLoadBalancerPoolMembersOptions) (result *LoadBalancerPoolMemberCollection, response *core.DetailedResponse, err error) { - return vpc.ReplaceLoadBalancerPoolMembersWithContext(context.Background(), replaceLoadBalancerPoolMembersOptions) + result, response, err = vpc.ReplaceLoadBalancerPoolMembersWithContext(context.Background(), replaceLoadBalancerPoolMembersOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ReplaceLoadBalancerPoolMembersWithContext is an alternate form of the ReplaceLoadBalancerPoolMembers method which supports a Context parameter func (vpc *VpcV1) ReplaceLoadBalancerPoolMembersWithContext(ctx context.Context, replaceLoadBalancerPoolMembersOptions *ReplaceLoadBalancerPoolMembersOptions) (result *LoadBalancerPoolMemberCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(replaceLoadBalancerPoolMembersOptions, "replaceLoadBalancerPoolMembersOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(replaceLoadBalancerPoolMembersOptions, "replaceLoadBalancerPoolMembersOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -24760,6 +28290,7 @@ func (vpc *VpcV1) ReplaceLoadBalancerPoolMembersWithContext(ctx context.Context, builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{pool_id}/members`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -24783,22 +28314,27 @@ func (vpc *VpcV1) ReplaceLoadBalancerPoolMembersWithContext(ctx context.Context, } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "replace_load_balancer_pool_members", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPoolMemberCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -24810,17 +28346,21 @@ func (vpc *VpcV1) ReplaceLoadBalancerPoolMembersWithContext(ctx context.Context, // DeleteLoadBalancerPoolMember : Delete a load balancer pool member // This request deletes a member from the pool. This operation cannot be reversed. func (vpc *VpcV1) DeleteLoadBalancerPoolMember(deleteLoadBalancerPoolMemberOptions *DeleteLoadBalancerPoolMemberOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteLoadBalancerPoolMemberWithContext(context.Background(), deleteLoadBalancerPoolMemberOptions) + response, err = vpc.DeleteLoadBalancerPoolMemberWithContext(context.Background(), deleteLoadBalancerPoolMemberOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteLoadBalancerPoolMemberWithContext is an alternate form of the DeleteLoadBalancerPoolMember method which supports a Context parameter func (vpc *VpcV1) DeleteLoadBalancerPoolMemberWithContext(ctx context.Context, deleteLoadBalancerPoolMemberOptions *DeleteLoadBalancerPoolMemberOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteLoadBalancerPoolMemberOptions, "deleteLoadBalancerPoolMemberOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteLoadBalancerPoolMemberOptions, "deleteLoadBalancerPoolMemberOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -24835,6 +28375,7 @@ func (vpc *VpcV1) DeleteLoadBalancerPoolMemberWithContext(ctx context.Context, d builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{pool_id}/members/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -24852,10 +28393,16 @@ func (vpc *VpcV1) DeleteLoadBalancerPoolMemberWithContext(ctx context.Context, d request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_load_balancer_pool_member", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -24863,17 +28410,21 @@ func (vpc *VpcV1) DeleteLoadBalancerPoolMemberWithContext(ctx context.Context, d // GetLoadBalancerPoolMember : Retrieve a load balancer pool member // This request retrieves a single member specified by the identifier in the URL path. func (vpc *VpcV1) GetLoadBalancerPoolMember(getLoadBalancerPoolMemberOptions *GetLoadBalancerPoolMemberOptions) (result *LoadBalancerPoolMember, response *core.DetailedResponse, err error) { - return vpc.GetLoadBalancerPoolMemberWithContext(context.Background(), getLoadBalancerPoolMemberOptions) + result, response, err = vpc.GetLoadBalancerPoolMemberWithContext(context.Background(), getLoadBalancerPoolMemberOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetLoadBalancerPoolMemberWithContext is an alternate form of the GetLoadBalancerPoolMember method which supports a Context parameter func (vpc *VpcV1) GetLoadBalancerPoolMemberWithContext(ctx context.Context, getLoadBalancerPoolMemberOptions *GetLoadBalancerPoolMemberOptions) (result *LoadBalancerPoolMember, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getLoadBalancerPoolMemberOptions, "getLoadBalancerPoolMemberOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getLoadBalancerPoolMemberOptions, "getLoadBalancerPoolMemberOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -24888,6 +28439,7 @@ func (vpc *VpcV1) GetLoadBalancerPoolMemberWithContext(ctx context.Context, getL builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{pool_id}/members/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -24906,17 +28458,21 @@ func (vpc *VpcV1) GetLoadBalancerPoolMemberWithContext(ctx context.Context, getL request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_load_balancer_pool_member", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPoolMember) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -24928,17 +28484,21 @@ func (vpc *VpcV1) GetLoadBalancerPoolMemberWithContext(ctx context.Context, getL // UpdateLoadBalancerPoolMember : Update a load balancer pool member // This request updates an existing member from a member patch. func (vpc *VpcV1) UpdateLoadBalancerPoolMember(updateLoadBalancerPoolMemberOptions *UpdateLoadBalancerPoolMemberOptions) (result *LoadBalancerPoolMember, response *core.DetailedResponse, err error) { - return vpc.UpdateLoadBalancerPoolMemberWithContext(context.Background(), updateLoadBalancerPoolMemberOptions) + result, response, err = vpc.UpdateLoadBalancerPoolMemberWithContext(context.Background(), updateLoadBalancerPoolMemberOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateLoadBalancerPoolMemberWithContext is an alternate form of the UpdateLoadBalancerPoolMember method which supports a Context parameter func (vpc *VpcV1) UpdateLoadBalancerPoolMemberWithContext(ctx context.Context, updateLoadBalancerPoolMemberOptions *UpdateLoadBalancerPoolMemberOptions) (result *LoadBalancerPoolMember, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateLoadBalancerPoolMemberOptions, "updateLoadBalancerPoolMemberOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateLoadBalancerPoolMemberOptions, "updateLoadBalancerPoolMemberOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -24953,6 +28513,7 @@ func (vpc *VpcV1) UpdateLoadBalancerPoolMemberWithContext(ctx context.Context, u builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{pool_id}/members/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -24972,22 +28533,27 @@ func (vpc *VpcV1) UpdateLoadBalancerPoolMemberWithContext(ctx context.Context, u _, err = builder.SetBodyContentJSON(updateLoadBalancerPoolMemberOptions.LoadBalancerPoolMemberPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_load_balancer_pool_member", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPoolMember) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -25000,13 +28566,16 @@ func (vpc *VpcV1) UpdateLoadBalancerPoolMemberWithContext(ctx context.Context, u // This request lists all endpoint gateways in the region. An endpoint gateway maps one or more reserved IPs in a VPC to // a target outside the VPC. func (vpc *VpcV1) ListEndpointGateways(listEndpointGatewaysOptions *ListEndpointGatewaysOptions) (result *EndpointGatewayCollection, response *core.DetailedResponse, err error) { - return vpc.ListEndpointGatewaysWithContext(context.Background(), listEndpointGatewaysOptions) + result, response, err = vpc.ListEndpointGatewaysWithContext(context.Background(), listEndpointGatewaysOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListEndpointGatewaysWithContext is an alternate form of the ListEndpointGateways method which supports a Context parameter func (vpc *VpcV1) ListEndpointGatewaysWithContext(ctx context.Context, listEndpointGatewaysOptions *ListEndpointGatewaysOptions) (result *EndpointGatewayCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listEndpointGatewaysOptions, "listEndpointGatewaysOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -25015,6 +28584,7 @@ func (vpc *VpcV1) ListEndpointGatewaysWithContext(ctx context.Context, listEndpo builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/endpoint_gateways`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -25057,17 +28627,21 @@ func (vpc *VpcV1) ListEndpointGatewaysWithContext(ctx context.Context, listEndpo request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_endpoint_gateways", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalEndpointGatewayCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -25080,17 +28654,21 @@ func (vpc *VpcV1) ListEndpointGatewaysWithContext(ctx context.Context, listEndpo // This request creates a new endpoint gateway. An endpoint gateway maps one or more reserved IPs in a VPC to a target // outside the VPC. func (vpc *VpcV1) CreateEndpointGateway(createEndpointGatewayOptions *CreateEndpointGatewayOptions) (result *EndpointGateway, response *core.DetailedResponse, err error) { - return vpc.CreateEndpointGatewayWithContext(context.Background(), createEndpointGatewayOptions) + result, response, err = vpc.CreateEndpointGatewayWithContext(context.Background(), createEndpointGatewayOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateEndpointGatewayWithContext is an alternate form of the CreateEndpointGateway method which supports a Context parameter func (vpc *VpcV1) CreateEndpointGatewayWithContext(ctx context.Context, createEndpointGatewayOptions *CreateEndpointGatewayOptions) (result *EndpointGateway, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createEndpointGatewayOptions, "createEndpointGatewayOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createEndpointGatewayOptions, "createEndpointGatewayOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -25099,6 +28677,7 @@ func (vpc *VpcV1) CreateEndpointGatewayWithContext(ctx context.Context, createEn builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/endpoint_gateways`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -25140,22 +28719,27 @@ func (vpc *VpcV1) CreateEndpointGatewayWithContext(ctx context.Context, createEn } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_endpoint_gateway", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalEndpointGateway) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -25167,17 +28751,21 @@ func (vpc *VpcV1) CreateEndpointGatewayWithContext(ctx context.Context, createEn // ListEndpointGatewayIps : List all reserved IPs bound to an endpoint gateway // This request lists all reserved IPs bound to an endpoint gateway. func (vpc *VpcV1) ListEndpointGatewayIps(listEndpointGatewayIpsOptions *ListEndpointGatewayIpsOptions) (result *ReservedIPCollectionEndpointGatewayContext, response *core.DetailedResponse, err error) { - return vpc.ListEndpointGatewayIpsWithContext(context.Background(), listEndpointGatewayIpsOptions) + result, response, err = vpc.ListEndpointGatewayIpsWithContext(context.Background(), listEndpointGatewayIpsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListEndpointGatewayIpsWithContext is an alternate form of the ListEndpointGatewayIps method which supports a Context parameter func (vpc *VpcV1) ListEndpointGatewayIpsWithContext(ctx context.Context, listEndpointGatewayIpsOptions *ListEndpointGatewayIpsOptions) (result *ReservedIPCollectionEndpointGatewayContext, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listEndpointGatewayIpsOptions, "listEndpointGatewayIpsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listEndpointGatewayIpsOptions, "listEndpointGatewayIpsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -25190,6 +28778,7 @@ func (vpc *VpcV1) ListEndpointGatewayIpsWithContext(ctx context.Context, listEnd builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/endpoint_gateways/{endpoint_gateway_id}/ips`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -25217,17 +28806,21 @@ func (vpc *VpcV1) ListEndpointGatewayIpsWithContext(ctx context.Context, listEnd request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_endpoint_gateway_ips", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIPCollectionEndpointGatewayContext) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -25240,17 +28833,21 @@ func (vpc *VpcV1) ListEndpointGatewayIpsWithContext(ctx context.Context, listEnd // This request unbinds the specified reserved IP from the specified endpoint gateway. If the reserved IP has // `auto_delete` set to `true`, the reserved IP will be deleted. func (vpc *VpcV1) RemoveEndpointGatewayIP(removeEndpointGatewayIPOptions *RemoveEndpointGatewayIPOptions) (response *core.DetailedResponse, err error) { - return vpc.RemoveEndpointGatewayIPWithContext(context.Background(), removeEndpointGatewayIPOptions) + response, err = vpc.RemoveEndpointGatewayIPWithContext(context.Background(), removeEndpointGatewayIPOptions) + err = core.RepurposeSDKProblem(err, "") + return } // RemoveEndpointGatewayIPWithContext is an alternate form of the RemoveEndpointGatewayIP method which supports a Context parameter func (vpc *VpcV1) RemoveEndpointGatewayIPWithContext(ctx context.Context, removeEndpointGatewayIPOptions *RemoveEndpointGatewayIPOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(removeEndpointGatewayIPOptions, "removeEndpointGatewayIPOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(removeEndpointGatewayIPOptions, "removeEndpointGatewayIPOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -25264,6 +28861,7 @@ func (vpc *VpcV1) RemoveEndpointGatewayIPWithContext(ctx context.Context, remove builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/endpoint_gateways/{endpoint_gateway_id}/ips/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -25281,10 +28879,16 @@ func (vpc *VpcV1) RemoveEndpointGatewayIPWithContext(ctx context.Context, remove request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "remove_endpoint_gateway_ip", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -25292,17 +28896,21 @@ func (vpc *VpcV1) RemoveEndpointGatewayIPWithContext(ctx context.Context, remove // GetEndpointGatewayIP : Retrieve a reserved IP bound to an endpoint gateway // This request retrieves the specified reserved IP address if it is bound to the endpoint gateway specified in the URL. func (vpc *VpcV1) GetEndpointGatewayIP(getEndpointGatewayIPOptions *GetEndpointGatewayIPOptions) (result *ReservedIP, response *core.DetailedResponse, err error) { - return vpc.GetEndpointGatewayIPWithContext(context.Background(), getEndpointGatewayIPOptions) + result, response, err = vpc.GetEndpointGatewayIPWithContext(context.Background(), getEndpointGatewayIPOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetEndpointGatewayIPWithContext is an alternate form of the GetEndpointGatewayIP method which supports a Context parameter func (vpc *VpcV1) GetEndpointGatewayIPWithContext(ctx context.Context, getEndpointGatewayIPOptions *GetEndpointGatewayIPOptions) (result *ReservedIP, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getEndpointGatewayIPOptions, "getEndpointGatewayIPOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getEndpointGatewayIPOptions, "getEndpointGatewayIPOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -25316,6 +28924,7 @@ func (vpc *VpcV1) GetEndpointGatewayIPWithContext(ctx context.Context, getEndpoi builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/endpoint_gateways/{endpoint_gateway_id}/ips/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -25334,17 +28943,21 @@ func (vpc *VpcV1) GetEndpointGatewayIPWithContext(ctx context.Context, getEndpoi request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_endpoint_gateway_ip", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIP) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -25359,17 +28972,21 @@ func (vpc *VpcV1) GetEndpointGatewayIPWithContext(ctx context.Context, getEndpoi // - must currently be unbound, or not required by its target // - must not be in the same zone as any other reserved IP bound to the endpoint gateway. func (vpc *VpcV1) AddEndpointGatewayIP(addEndpointGatewayIPOptions *AddEndpointGatewayIPOptions) (result *ReservedIP, response *core.DetailedResponse, err error) { - return vpc.AddEndpointGatewayIPWithContext(context.Background(), addEndpointGatewayIPOptions) + result, response, err = vpc.AddEndpointGatewayIPWithContext(context.Background(), addEndpointGatewayIPOptions) + err = core.RepurposeSDKProblem(err, "") + return } // AddEndpointGatewayIPWithContext is an alternate form of the AddEndpointGatewayIP method which supports a Context parameter func (vpc *VpcV1) AddEndpointGatewayIPWithContext(ctx context.Context, addEndpointGatewayIPOptions *AddEndpointGatewayIPOptions) (result *ReservedIP, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(addEndpointGatewayIPOptions, "addEndpointGatewayIPOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(addEndpointGatewayIPOptions, "addEndpointGatewayIPOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -25383,6 +29000,7 @@ func (vpc *VpcV1) AddEndpointGatewayIPWithContext(ctx context.Context, addEndpoi builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/endpoint_gateways/{endpoint_gateway_id}/ips/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -25401,17 +29019,21 @@ func (vpc *VpcV1) AddEndpointGatewayIPWithContext(ctx context.Context, addEndpoi request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "add_endpoint_gateway_ip", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIP) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -25426,17 +29048,21 @@ func (vpc *VpcV1) AddEndpointGatewayIPWithContext(ctx context.Context, addEndpoi // Reserved IPs that were bound to the endpoint gateway will be released if their // `auto_delete` property is set to true. func (vpc *VpcV1) DeleteEndpointGateway(deleteEndpointGatewayOptions *DeleteEndpointGatewayOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteEndpointGatewayWithContext(context.Background(), deleteEndpointGatewayOptions) + response, err = vpc.DeleteEndpointGatewayWithContext(context.Background(), deleteEndpointGatewayOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteEndpointGatewayWithContext is an alternate form of the DeleteEndpointGateway method which supports a Context parameter func (vpc *VpcV1) DeleteEndpointGatewayWithContext(ctx context.Context, deleteEndpointGatewayOptions *DeleteEndpointGatewayOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteEndpointGatewayOptions, "deleteEndpointGatewayOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteEndpointGatewayOptions, "deleteEndpointGatewayOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -25449,6 +29075,7 @@ func (vpc *VpcV1) DeleteEndpointGatewayWithContext(ctx context.Context, deleteEn builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/endpoint_gateways/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -25466,10 +29093,16 @@ func (vpc *VpcV1) DeleteEndpointGatewayWithContext(ctx context.Context, deleteEn request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_endpoint_gateway", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -25477,17 +29110,21 @@ func (vpc *VpcV1) DeleteEndpointGatewayWithContext(ctx context.Context, deleteEn // GetEndpointGateway : Retrieve an endpoint gateway // This request retrieves a single endpoint gateway specified by the identifier in the URL. func (vpc *VpcV1) GetEndpointGateway(getEndpointGatewayOptions *GetEndpointGatewayOptions) (result *EndpointGateway, response *core.DetailedResponse, err error) { - return vpc.GetEndpointGatewayWithContext(context.Background(), getEndpointGatewayOptions) + result, response, err = vpc.GetEndpointGatewayWithContext(context.Background(), getEndpointGatewayOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetEndpointGatewayWithContext is an alternate form of the GetEndpointGateway method which supports a Context parameter func (vpc *VpcV1) GetEndpointGatewayWithContext(ctx context.Context, getEndpointGatewayOptions *GetEndpointGatewayOptions) (result *EndpointGateway, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getEndpointGatewayOptions, "getEndpointGatewayOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getEndpointGatewayOptions, "getEndpointGatewayOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -25500,6 +29137,7 @@ func (vpc *VpcV1) GetEndpointGatewayWithContext(ctx context.Context, getEndpoint builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/endpoint_gateways/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -25518,17 +29156,21 @@ func (vpc *VpcV1) GetEndpointGatewayWithContext(ctx context.Context, getEndpoint request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_endpoint_gateway", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalEndpointGateway) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -25540,17 +29182,21 @@ func (vpc *VpcV1) GetEndpointGatewayWithContext(ctx context.Context, getEndpoint // UpdateEndpointGateway : Update an endpoint gateway // This request updates an endpoint gateway's name. func (vpc *VpcV1) UpdateEndpointGateway(updateEndpointGatewayOptions *UpdateEndpointGatewayOptions) (result *EndpointGateway, response *core.DetailedResponse, err error) { - return vpc.UpdateEndpointGatewayWithContext(context.Background(), updateEndpointGatewayOptions) + result, response, err = vpc.UpdateEndpointGatewayWithContext(context.Background(), updateEndpointGatewayOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateEndpointGatewayWithContext is an alternate form of the UpdateEndpointGateway method which supports a Context parameter func (vpc *VpcV1) UpdateEndpointGatewayWithContext(ctx context.Context, updateEndpointGatewayOptions *UpdateEndpointGatewayOptions) (result *EndpointGateway, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateEndpointGatewayOptions, "updateEndpointGatewayOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateEndpointGatewayOptions, "updateEndpointGatewayOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -25563,6 +29209,7 @@ func (vpc *VpcV1) UpdateEndpointGatewayWithContext(ctx context.Context, updateEn builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/endpoint_gateways/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -25582,22 +29229,27 @@ func (vpc *VpcV1) UpdateEndpointGatewayWithContext(ctx context.Context, updateEn _, err = builder.SetBodyContentJSON(updateEndpointGatewayOptions.EndpointGatewayPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_endpoint_gateway", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalEndpointGateway) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -25610,13 +29262,16 @@ func (vpc *VpcV1) UpdateEndpointGatewayWithContext(ctx context.Context, updateEn // This request lists all flow log collectors in the region. A flow log collector summarizes data sent over the instance // network interfaces and instance network attachments contained within its target. func (vpc *VpcV1) ListFlowLogCollectors(listFlowLogCollectorsOptions *ListFlowLogCollectorsOptions) (result *FlowLogCollectorCollection, response *core.DetailedResponse, err error) { - return vpc.ListFlowLogCollectorsWithContext(context.Background(), listFlowLogCollectorsOptions) + result, response, err = vpc.ListFlowLogCollectorsWithContext(context.Background(), listFlowLogCollectorsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListFlowLogCollectorsWithContext is an alternate form of the ListFlowLogCollectors method which supports a Context parameter func (vpc *VpcV1) ListFlowLogCollectorsWithContext(ctx context.Context, listFlowLogCollectorsOptions *ListFlowLogCollectorsOptions) (result *FlowLogCollectorCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listFlowLogCollectorsOptions, "listFlowLogCollectorsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -25625,6 +29280,7 @@ func (vpc *VpcV1) ListFlowLogCollectorsWithContext(ctx context.Context, listFlow builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/flow_log_collectors`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -25670,17 +29326,21 @@ func (vpc *VpcV1) ListFlowLogCollectorsWithContext(ctx context.Context, listFlow request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_flow_log_collectors", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFlowLogCollectorCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -25694,17 +29354,21 @@ func (vpc *VpcV1) ListFlowLogCollectorsWithContext(ctx context.Context, listFlow // object is structured in the same way as a retrieved flow log collector, and contains the information necessary to // create and start the new flow log collector. func (vpc *VpcV1) CreateFlowLogCollector(createFlowLogCollectorOptions *CreateFlowLogCollectorOptions) (result *FlowLogCollector, response *core.DetailedResponse, err error) { - return vpc.CreateFlowLogCollectorWithContext(context.Background(), createFlowLogCollectorOptions) + result, response, err = vpc.CreateFlowLogCollectorWithContext(context.Background(), createFlowLogCollectorOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateFlowLogCollectorWithContext is an alternate form of the CreateFlowLogCollector method which supports a Context parameter func (vpc *VpcV1) CreateFlowLogCollectorWithContext(ctx context.Context, createFlowLogCollectorOptions *CreateFlowLogCollectorOptions) (result *FlowLogCollector, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createFlowLogCollectorOptions, "createFlowLogCollectorOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createFlowLogCollectorOptions, "createFlowLogCollectorOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -25713,6 +29377,7 @@ func (vpc *VpcV1) CreateFlowLogCollectorWithContext(ctx context.Context, createF builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/flow_log_collectors`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -25748,22 +29413,27 @@ func (vpc *VpcV1) CreateFlowLogCollectorWithContext(ctx context.Context, createF } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_flow_log_collector", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFlowLogCollector) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -25777,17 +29447,21 @@ func (vpc *VpcV1) CreateFlowLogCollectorWithContext(ctx context.Context, createF // // Collected flow logs remain available within the flow log collector's Cloud Object Storage bucket. func (vpc *VpcV1) DeleteFlowLogCollector(deleteFlowLogCollectorOptions *DeleteFlowLogCollectorOptions) (response *core.DetailedResponse, err error) { - return vpc.DeleteFlowLogCollectorWithContext(context.Background(), deleteFlowLogCollectorOptions) + response, err = vpc.DeleteFlowLogCollectorWithContext(context.Background(), deleteFlowLogCollectorOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteFlowLogCollectorWithContext is an alternate form of the DeleteFlowLogCollector method which supports a Context parameter func (vpc *VpcV1) DeleteFlowLogCollectorWithContext(ctx context.Context, deleteFlowLogCollectorOptions *DeleteFlowLogCollectorOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteFlowLogCollectorOptions, "deleteFlowLogCollectorOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteFlowLogCollectorOptions, "deleteFlowLogCollectorOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -25800,6 +29474,7 @@ func (vpc *VpcV1) DeleteFlowLogCollectorWithContext(ctx context.Context, deleteF builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/flow_log_collectors/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -25817,10 +29492,16 @@ func (vpc *VpcV1) DeleteFlowLogCollectorWithContext(ctx context.Context, deleteF request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_flow_log_collector", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -25828,17 +29509,21 @@ func (vpc *VpcV1) DeleteFlowLogCollectorWithContext(ctx context.Context, deleteF // GetFlowLogCollector : Retrieve a flow log collector // This request retrieves a single flow log collector specified by the identifier in the URL. func (vpc *VpcV1) GetFlowLogCollector(getFlowLogCollectorOptions *GetFlowLogCollectorOptions) (result *FlowLogCollector, response *core.DetailedResponse, err error) { - return vpc.GetFlowLogCollectorWithContext(context.Background(), getFlowLogCollectorOptions) + result, response, err = vpc.GetFlowLogCollectorWithContext(context.Background(), getFlowLogCollectorOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetFlowLogCollectorWithContext is an alternate form of the GetFlowLogCollector method which supports a Context parameter func (vpc *VpcV1) GetFlowLogCollectorWithContext(ctx context.Context, getFlowLogCollectorOptions *GetFlowLogCollectorOptions) (result *FlowLogCollector, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getFlowLogCollectorOptions, "getFlowLogCollectorOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getFlowLogCollectorOptions, "getFlowLogCollectorOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -25851,6 +29536,7 @@ func (vpc *VpcV1) GetFlowLogCollectorWithContext(ctx context.Context, getFlowLog builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/flow_log_collectors/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -25869,17 +29555,21 @@ func (vpc *VpcV1) GetFlowLogCollectorWithContext(ctx context.Context, getFlowLog request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_flow_log_collector", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFlowLogCollector) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -25893,17 +29583,21 @@ func (vpc *VpcV1) GetFlowLogCollectorWithContext(ctx context.Context, getFlowLog // collector patch object is structured in the same way as a retrieved flow log collector and contains only the // information to be updated. func (vpc *VpcV1) UpdateFlowLogCollector(updateFlowLogCollectorOptions *UpdateFlowLogCollectorOptions) (result *FlowLogCollector, response *core.DetailedResponse, err error) { - return vpc.UpdateFlowLogCollectorWithContext(context.Background(), updateFlowLogCollectorOptions) + result, response, err = vpc.UpdateFlowLogCollectorWithContext(context.Background(), updateFlowLogCollectorOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateFlowLogCollectorWithContext is an alternate form of the UpdateFlowLogCollector method which supports a Context parameter func (vpc *VpcV1) UpdateFlowLogCollectorWithContext(ctx context.Context, updateFlowLogCollectorOptions *UpdateFlowLogCollectorOptions) (result *FlowLogCollector, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateFlowLogCollectorOptions, "updateFlowLogCollectorOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateFlowLogCollectorOptions, "updateFlowLogCollectorOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -25916,6 +29610,7 @@ func (vpc *VpcV1) UpdateFlowLogCollectorWithContext(ctx context.Context, updateF builder.EnableGzipCompression = vpc.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/flow_log_collectors/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } @@ -25935,22 +29630,27 @@ func (vpc *VpcV1) UpdateFlowLogCollectorWithContext(ctx context.Context, updateF _, err = builder.SetBodyContentJSON(updateFlowLogCollectorOptions.FlowLogCollectorPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = vpc.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_flow_log_collector", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFlowLogCollector) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -25958,6 +29658,9 @@ func (vpc *VpcV1) UpdateFlowLogCollectorWithContext(ctx context.Context, updateF return } +func getServiceComponentInfo() *core.ProblemComponent { + return core.NewProblemComponent(DefaultServiceName, "today") +} // AccountReference : AccountReference struct type AccountReference struct { @@ -25979,10 +29682,12 @@ func UnmarshalAccountReference(m map[string]json.RawMessage, result interface{}) obj := new(AccountReference) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -26227,118 +29932,98 @@ func (options *AddVirtualNetworkInterfaceIPOptions) SetHeaders(param map[string] return options } -// AddVPNGatewayConnectionLocalCIDROptions : The AddVPNGatewayConnectionLocalCIDR options. -type AddVPNGatewayConnectionLocalCIDROptions struct { +// AddVPNGatewayConnectionsLocalCIDROptions : The AddVPNGatewayConnectionsLocalCIDR options. +type AddVPNGatewayConnectionsLocalCIDROptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // The VPN gateway connection identifier. ID *string `json:"id" validate:"required,ne="` - // The address prefix part of the CIDR. - CIDRPrefix *string `json:"cidr_prefix" validate:"required,ne="` - - // The prefix length part of the CIDR. - PrefixLength *string `json:"prefix_length" validate:"required,ne="` + // The IP address range in CIDR block notation. + CIDR *string `json:"cidr" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string } -// NewAddVPNGatewayConnectionLocalCIDROptions : Instantiate AddVPNGatewayConnectionLocalCIDROptions -func (*VpcV1) NewAddVPNGatewayConnectionLocalCIDROptions(vpnGatewayID string, id string, cidrPrefix string, prefixLength string) *AddVPNGatewayConnectionLocalCIDROptions { - return &AddVPNGatewayConnectionLocalCIDROptions{ +// NewAddVPNGatewayConnectionsLocalCIDROptions : Instantiate AddVPNGatewayConnectionsLocalCIDROptions +func (*VpcV1) NewAddVPNGatewayConnectionsLocalCIDROptions(vpnGatewayID string, id string, cidr string) *AddVPNGatewayConnectionsLocalCIDROptions { + return &AddVPNGatewayConnectionsLocalCIDROptions{ VPNGatewayID: core.StringPtr(vpnGatewayID), ID: core.StringPtr(id), - CIDRPrefix: core.StringPtr(cidrPrefix), - PrefixLength: core.StringPtr(prefixLength), + CIDR: core.StringPtr(cidr), } } // SetVPNGatewayID : Allow user to set VPNGatewayID -func (_options *AddVPNGatewayConnectionLocalCIDROptions) SetVPNGatewayID(vpnGatewayID string) *AddVPNGatewayConnectionLocalCIDROptions { +func (_options *AddVPNGatewayConnectionsLocalCIDROptions) SetVPNGatewayID(vpnGatewayID string) *AddVPNGatewayConnectionsLocalCIDROptions { _options.VPNGatewayID = core.StringPtr(vpnGatewayID) return _options } // SetID : Allow user to set ID -func (_options *AddVPNGatewayConnectionLocalCIDROptions) SetID(id string) *AddVPNGatewayConnectionLocalCIDROptions { +func (_options *AddVPNGatewayConnectionsLocalCIDROptions) SetID(id string) *AddVPNGatewayConnectionsLocalCIDROptions { _options.ID = core.StringPtr(id) return _options } -// SetCIDRPrefix : Allow user to set CIDRPrefix -func (_options *AddVPNGatewayConnectionLocalCIDROptions) SetCIDRPrefix(cidrPrefix string) *AddVPNGatewayConnectionLocalCIDROptions { - _options.CIDRPrefix = core.StringPtr(cidrPrefix) - return _options -} - -// SetPrefixLength : Allow user to set PrefixLength -func (_options *AddVPNGatewayConnectionLocalCIDROptions) SetPrefixLength(prefixLength string) *AddVPNGatewayConnectionLocalCIDROptions { - _options.PrefixLength = core.StringPtr(prefixLength) +// SetCIDR : Allow user to set CIDR +func (_options *AddVPNGatewayConnectionsLocalCIDROptions) SetCIDR(cidr string) *AddVPNGatewayConnectionsLocalCIDROptions { + _options.CIDR = core.StringPtr(cidr) return _options } // SetHeaders : Allow user to set Headers -func (options *AddVPNGatewayConnectionLocalCIDROptions) SetHeaders(param map[string]string) *AddVPNGatewayConnectionLocalCIDROptions { +func (options *AddVPNGatewayConnectionsLocalCIDROptions) SetHeaders(param map[string]string) *AddVPNGatewayConnectionsLocalCIDROptions { options.Headers = param return options } -// AddVPNGatewayConnectionPeerCIDROptions : The AddVPNGatewayConnectionPeerCIDR options. -type AddVPNGatewayConnectionPeerCIDROptions struct { +// AddVPNGatewayConnectionsPeerCIDROptions : The AddVPNGatewayConnectionsPeerCIDR options. +type AddVPNGatewayConnectionsPeerCIDROptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // The VPN gateway connection identifier. ID *string `json:"id" validate:"required,ne="` - // The address prefix part of the CIDR. - CIDRPrefix *string `json:"cidr_prefix" validate:"required,ne="` - - // The prefix length part of the CIDR. - PrefixLength *string `json:"prefix_length" validate:"required,ne="` + // The IP address range in CIDR block notation. + CIDR *string `json:"cidr" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string } -// NewAddVPNGatewayConnectionPeerCIDROptions : Instantiate AddVPNGatewayConnectionPeerCIDROptions -func (*VpcV1) NewAddVPNGatewayConnectionPeerCIDROptions(vpnGatewayID string, id string, cidrPrefix string, prefixLength string) *AddVPNGatewayConnectionPeerCIDROptions { - return &AddVPNGatewayConnectionPeerCIDROptions{ +// NewAddVPNGatewayConnectionsPeerCIDROptions : Instantiate AddVPNGatewayConnectionsPeerCIDROptions +func (*VpcV1) NewAddVPNGatewayConnectionsPeerCIDROptions(vpnGatewayID string, id string, cidr string) *AddVPNGatewayConnectionsPeerCIDROptions { + return &AddVPNGatewayConnectionsPeerCIDROptions{ VPNGatewayID: core.StringPtr(vpnGatewayID), ID: core.StringPtr(id), - CIDRPrefix: core.StringPtr(cidrPrefix), - PrefixLength: core.StringPtr(prefixLength), + CIDR: core.StringPtr(cidr), } } // SetVPNGatewayID : Allow user to set VPNGatewayID -func (_options *AddVPNGatewayConnectionPeerCIDROptions) SetVPNGatewayID(vpnGatewayID string) *AddVPNGatewayConnectionPeerCIDROptions { +func (_options *AddVPNGatewayConnectionsPeerCIDROptions) SetVPNGatewayID(vpnGatewayID string) *AddVPNGatewayConnectionsPeerCIDROptions { _options.VPNGatewayID = core.StringPtr(vpnGatewayID) return _options } // SetID : Allow user to set ID -func (_options *AddVPNGatewayConnectionPeerCIDROptions) SetID(id string) *AddVPNGatewayConnectionPeerCIDROptions { +func (_options *AddVPNGatewayConnectionsPeerCIDROptions) SetID(id string) *AddVPNGatewayConnectionsPeerCIDROptions { _options.ID = core.StringPtr(id) return _options } -// SetCIDRPrefix : Allow user to set CIDRPrefix -func (_options *AddVPNGatewayConnectionPeerCIDROptions) SetCIDRPrefix(cidrPrefix string) *AddVPNGatewayConnectionPeerCIDROptions { - _options.CIDRPrefix = core.StringPtr(cidrPrefix) - return _options -} - -// SetPrefixLength : Allow user to set PrefixLength -func (_options *AddVPNGatewayConnectionPeerCIDROptions) SetPrefixLength(prefixLength string) *AddVPNGatewayConnectionPeerCIDROptions { - _options.PrefixLength = core.StringPtr(prefixLength) +// SetCIDR : Allow user to set CIDR +func (_options *AddVPNGatewayConnectionsPeerCIDROptions) SetCIDR(cidr string) *AddVPNGatewayConnectionsPeerCIDROptions { + _options.CIDR = core.StringPtr(cidr) return _options } // SetHeaders : Allow user to set Headers -func (options *AddVPNGatewayConnectionPeerCIDROptions) SetHeaders(param map[string]string) *AddVPNGatewayConnectionPeerCIDROptions { +func (options *AddVPNGatewayConnectionsPeerCIDROptions) SetHeaders(param map[string]string) *AddVPNGatewayConnectionsPeerCIDROptions { options.Headers = param return options } @@ -26377,34 +30062,42 @@ func UnmarshalAddressPrefix(m map[string]json.RawMessage, result interface{}) (e obj := new(AddressPrefix) err = core.UnmarshalPrimitive(m, "cidr", &obj.CIDR) if err != nil { + err = core.SDKErrorf(err, "", "cidr-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "has_subnets", &obj.HasSubnets) if err != nil { + err = core.SDKErrorf(err, "", "has_subnets-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "is_default", &obj.IsDefault) if err != nil { + err = core.SDKErrorf(err, "", "is_default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -26435,22 +30128,27 @@ func UnmarshalAddressPrefixCollection(m map[string]json.RawMessage, result inter obj := new(AddressPrefixCollection) err = core.UnmarshalModel(m, "address_prefixes", &obj.AddressPrefixes, UnmarshalAddressPrefix) if err != nil { + err = core.SDKErrorf(err, "", "address_prefixes-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalAddressPrefixCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalAddressPrefixCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -26463,8 +30161,11 @@ func (resp *AddressPrefixCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -26480,6 +30181,7 @@ func UnmarshalAddressPrefixCollectionFirst(m map[string]json.RawMessage, result obj := new(AddressPrefixCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -26497,6 +30199,7 @@ func UnmarshalAddressPrefixCollectionNext(m map[string]json.RawMessage, result i obj := new(AddressPrefixCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -26519,10 +30222,12 @@ func UnmarshalAddressPrefixPatch(m map[string]json.RawMessage, result interface{ obj := new(AddressPrefixPatch) err = core.UnmarshalPrimitive(m, "is_default", &obj.IsDefault) if err != nil { + err = core.SDKErrorf(err, "", "is_default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -26536,6 +30241,9 @@ func (addressPrefixPatch *AddressPrefixPatch) AsPatch() (_patch map[string]inter if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -26675,66 +30383,82 @@ func UnmarshalBackupPolicy(m map[string]json.RawMessage, result interface{}) (er obj := new(BackupPolicy) err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "health_reasons", &obj.HealthReasons, UnmarshalBackupPolicyHealthReason) if err != nil { + err = core.SDKErrorf(err, "", "health_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "health_state", &obj.HealthState) if err != nil { + err = core.SDKErrorf(err, "", "health_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "last_job_completed_at", &obj.LastJobCompletedAt) if err != nil { + err = core.SDKErrorf(err, "", "last_job_completed_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "match_resource_type", &obj.MatchResourceType) if err != nil { + err = core.SDKErrorf(err, "", "match_resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "match_user_tags", &obj.MatchUserTags) if err != nil { + err = core.SDKErrorf(err, "", "match_user_tags-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "plans", &obj.Plans, UnmarshalBackupPolicyPlanReference) if err != nil { + err = core.SDKErrorf(err, "", "plans-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "scope", &obj.Scope, UnmarshalBackupPolicyScope) if err != nil { + err = core.SDKErrorf(err, "", "scope-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "included_content", &obj.IncludedContent) if err != nil { + err = core.SDKErrorf(err, "", "included_content-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -26765,22 +30489,27 @@ func UnmarshalBackupPolicyCollection(m map[string]json.RawMessage, result interf obj := new(BackupPolicyCollection) err = core.UnmarshalModel(m, "backup_policies", &obj.BackupPolicies, UnmarshalBackupPolicy) if err != nil { + err = core.SDKErrorf(err, "", "backup_policies-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalBackupPolicyCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalBackupPolicyCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -26793,8 +30522,11 @@ func (resp *BackupPolicyCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -26810,6 +30542,7 @@ func UnmarshalBackupPolicyCollectionFirst(m map[string]json.RawMessage, result i obj := new(BackupPolicyCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -26827,6 +30560,7 @@ func UnmarshalBackupPolicyCollectionNext(m map[string]json.RawMessage, result in obj := new(BackupPolicyCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -26856,14 +30590,17 @@ func UnmarshalBackupPolicyHealthReason(m map[string]json.RawMessage, result inte obj := new(BackupPolicyHealthReason) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "message", &obj.Message) if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -26957,54 +30694,67 @@ func UnmarshalBackupPolicyJob(m map[string]json.RawMessage, result interface{}) obj := new(BackupPolicyJob) err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { + err = core.SDKErrorf(err, "", "auto_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "auto_delete_after", &obj.AutoDeleteAfter) if err != nil { + err = core.SDKErrorf(err, "", "auto_delete_after-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "backup_policy_plan", &obj.BackupPolicyPlan, UnmarshalBackupPolicyPlanReference) if err != nil { + err = core.SDKErrorf(err, "", "backup_policy_plan-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "completed_at", &obj.CompletedAt) if err != nil { + err = core.SDKErrorf(err, "", "completed_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "job_type", &obj.JobType) if err != nil { + err = core.SDKErrorf(err, "", "job_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "source", &obj.Source, UnmarshalBackupPolicyJobSource) if err != nil { + err = core.SDKErrorf(err, "", "source-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "status_reasons", &obj.StatusReasons, UnmarshalBackupPolicyJobStatusReason) if err != nil { + err = core.SDKErrorf(err, "", "status_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "target_snapshots", &obj.TargetSnapshots, UnmarshalSnapshotReference) if err != nil { + err = core.SDKErrorf(err, "", "target_snapshots-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -27035,22 +30785,27 @@ func UnmarshalBackupPolicyJobCollection(m map[string]json.RawMessage, result int obj := new(BackupPolicyJobCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalBackupPolicyJobCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "jobs", &obj.Jobs, UnmarshalBackupPolicyJob) if err != nil { + err = core.SDKErrorf(err, "", "jobs-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalBackupPolicyJobCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -27063,8 +30818,11 @@ func (resp *BackupPolicyJobCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -27080,6 +30838,7 @@ func UnmarshalBackupPolicyJobCollectionFirst(m map[string]json.RawMessage, resul obj := new(BackupPolicyJobCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -27097,6 +30856,7 @@ func UnmarshalBackupPolicyJobCollectionNext(m map[string]json.RawMessage, result obj := new(BackupPolicyJobCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -27152,30 +30912,37 @@ func UnmarshalBackupPolicyJobSource(m map[string]json.RawMessage, result interfa obj := new(BackupPolicyJobSource) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVolumeReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalVolumeRemote) if err != nil { + err = core.SDKErrorf(err, "", "remote-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -27222,14 +30989,17 @@ func UnmarshalBackupPolicyJobStatusReason(m map[string]json.RawMessage, result i obj := new(BackupPolicyJobStatusReason) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "message", &obj.Message) if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -27263,14 +31033,17 @@ func UnmarshalBackupPolicyPatch(m map[string]json.RawMessage, result interface{} obj := new(BackupPolicyPatch) err = core.UnmarshalPrimitive(m, "included_content", &obj.IncludedContent) if err != nil { + err = core.SDKErrorf(err, "", "included_content-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "match_user_tags", &obj.MatchUserTags) if err != nil { + err = core.SDKErrorf(err, "", "match_user_tags-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -27284,6 +31057,9 @@ func (backupPolicyPatch *BackupPolicyPatch) AsPatch() (_patch map[string]interfa if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -27354,54 +31130,67 @@ func UnmarshalBackupPolicyPlan(m map[string]json.RawMessage, result interface{}) obj := new(BackupPolicyPlan) err = core.UnmarshalPrimitive(m, "active", &obj.Active) if err != nil { + err = core.SDKErrorf(err, "", "active-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "attach_user_tags", &obj.AttachUserTags) if err != nil { + err = core.SDKErrorf(err, "", "attach_user_tags-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "clone_policy", &obj.ClonePolicy, UnmarshalBackupPolicyPlanClonePolicy) if err != nil { + err = core.SDKErrorf(err, "", "clone_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "copy_user_tags", &obj.CopyUserTags) if err != nil { + err = core.SDKErrorf(err, "", "copy_user_tags-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec) if err != nil { + err = core.SDKErrorf(err, "", "cron_spec-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deletion_trigger", &obj.DeletionTrigger, UnmarshalBackupPolicyPlanDeletionTrigger) if err != nil { + err = core.SDKErrorf(err, "", "deletion_trigger-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "remote_region_policies", &obj.RemoteRegionPolicies, UnmarshalBackupPolicyPlanRemoteRegionPolicy) if err != nil { + err = core.SDKErrorf(err, "", "remote_region_policies-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -27422,10 +31211,12 @@ func UnmarshalBackupPolicyPlanClonePolicy(m map[string]json.RawMessage, result i obj := new(BackupPolicyPlanClonePolicy) err = core.UnmarshalPrimitive(m, "max_snapshots", &obj.MaxSnapshots) if err != nil { + err = core.SDKErrorf(err, "", "max_snapshots-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zones", &obj.Zones, UnmarshalZoneReference) if err != nil { + err = core.SDKErrorf(err, "", "zones-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -27447,10 +31238,12 @@ func UnmarshalBackupPolicyPlanClonePolicyPatch(m map[string]json.RawMessage, res obj := new(BackupPolicyPlanClonePolicyPatch) err = core.UnmarshalPrimitive(m, "max_snapshots", &obj.MaxSnapshots) if err != nil { + err = core.SDKErrorf(err, "", "max_snapshots-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zones", &obj.Zones, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zones-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -27472,6 +31265,9 @@ func (*VpcV1) NewBackupPolicyPlanClonePolicyPrototype(zones []ZoneIdentityIntf) Zones: zones, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -27480,10 +31276,12 @@ func UnmarshalBackupPolicyPlanClonePolicyPrototype(m map[string]json.RawMessage, obj := new(BackupPolicyPlanClonePolicyPrototype) err = core.UnmarshalPrimitive(m, "max_snapshots", &obj.MaxSnapshots) if err != nil { + err = core.SDKErrorf(err, "", "max_snapshots-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zones", &obj.Zones, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zones-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -27514,22 +31312,27 @@ func UnmarshalBackupPolicyPlanCollection(m map[string]json.RawMessage, result in obj := new(BackupPolicyPlanCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalBackupPolicyPlanCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalBackupPolicyPlanCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "plans", &obj.Plans, UnmarshalBackupPolicyPlan) if err != nil { + err = core.SDKErrorf(err, "", "plans-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -27547,6 +31350,7 @@ func UnmarshalBackupPolicyPlanCollectionFirst(m map[string]json.RawMessage, resu obj := new(BackupPolicyPlanCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -27564,6 +31368,7 @@ func UnmarshalBackupPolicyPlanCollectionNext(m map[string]json.RawMessage, resul obj := new(BackupPolicyPlanCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -27584,10 +31389,12 @@ func UnmarshalBackupPolicyPlanDeletionTrigger(m map[string]json.RawMessage, resu obj := new(BackupPolicyPlanDeletionTrigger) err = core.UnmarshalPrimitive(m, "delete_after", &obj.DeleteAfter) if err != nil { + err = core.SDKErrorf(err, "", "delete_after-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "delete_over_count", &obj.DeleteOverCount) if err != nil { + err = core.SDKErrorf(err, "", "delete_over_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -27608,10 +31415,12 @@ func UnmarshalBackupPolicyPlanDeletionTriggerPatch(m map[string]json.RawMessage, obj := new(BackupPolicyPlanDeletionTriggerPatch) err = core.UnmarshalPrimitive(m, "delete_after", &obj.DeleteAfter) if err != nil { + err = core.SDKErrorf(err, "", "delete_after-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "delete_over_count", &obj.DeleteOverCount) if err != nil { + err = core.SDKErrorf(err, "", "delete_over_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -27632,10 +31441,12 @@ func UnmarshalBackupPolicyPlanDeletionTriggerPrototype(m map[string]json.RawMess obj := new(BackupPolicyPlanDeletionTriggerPrototype) err = core.UnmarshalPrimitive(m, "delete_after", &obj.DeleteAfter) if err != nil { + err = core.SDKErrorf(err, "", "delete_after-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "delete_over_count", &obj.DeleteOverCount) if err != nil { + err = core.SDKErrorf(err, "", "delete_over_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -27677,34 +31488,42 @@ func UnmarshalBackupPolicyPlanPatch(m map[string]json.RawMessage, result interfa obj := new(BackupPolicyPlanPatch) err = core.UnmarshalPrimitive(m, "active", &obj.Active) if err != nil { + err = core.SDKErrorf(err, "", "active-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "attach_user_tags", &obj.AttachUserTags) if err != nil { + err = core.SDKErrorf(err, "", "attach_user_tags-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "clone_policy", &obj.ClonePolicy, UnmarshalBackupPolicyPlanClonePolicyPatch) if err != nil { + err = core.SDKErrorf(err, "", "clone_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "copy_user_tags", &obj.CopyUserTags) if err != nil { + err = core.SDKErrorf(err, "", "copy_user_tags-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec) if err != nil { + err = core.SDKErrorf(err, "", "cron_spec-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deletion_trigger", &obj.DeletionTrigger, UnmarshalBackupPolicyPlanDeletionTriggerPatch) if err != nil { + err = core.SDKErrorf(err, "", "deletion_trigger-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "remote_region_policies", &obj.RemoteRegionPolicies, UnmarshalBackupPolicyPlanRemoteRegionPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "remote_region_policies-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -27718,6 +31537,9 @@ func (backupPolicyPlanPatch *BackupPolicyPlanPatch) AsPatch() (_patch map[string if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -27757,6 +31579,9 @@ func (*VpcV1) NewBackupPolicyPlanPrototype(cronSpec string) (_model *BackupPolic CronSpec: core.StringPtr(cronSpec), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -27765,34 +31590,42 @@ func UnmarshalBackupPolicyPlanPrototype(m map[string]json.RawMessage, result int obj := new(BackupPolicyPlanPrototype) err = core.UnmarshalPrimitive(m, "active", &obj.Active) if err != nil { + err = core.SDKErrorf(err, "", "active-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "attach_user_tags", &obj.AttachUserTags) if err != nil { + err = core.SDKErrorf(err, "", "attach_user_tags-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "clone_policy", &obj.ClonePolicy, UnmarshalBackupPolicyPlanClonePolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "clone_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "copy_user_tags", &obj.CopyUserTags) if err != nil { + err = core.SDKErrorf(err, "", "copy_user_tags-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec) if err != nil { + err = core.SDKErrorf(err, "", "cron_spec-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deletion_trigger", &obj.DeletionTrigger, UnmarshalBackupPolicyPlanDeletionTriggerPrototype) if err != nil { + err = core.SDKErrorf(err, "", "deletion_trigger-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "remote_region_policies", &obj.RemoteRegionPolicies, UnmarshalBackupPolicyPlanRemoteRegionPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "remote_region_policies-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -27833,26 +31666,32 @@ func UnmarshalBackupPolicyPlanReference(m map[string]json.RawMessage, result int obj := new(BackupPolicyPlanReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalBackupPolicyPlanReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalBackupPolicyPlanRemote) if err != nil { + err = core.SDKErrorf(err, "", "remote-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -27871,6 +31710,7 @@ func UnmarshalBackupPolicyPlanReferenceDeleted(m map[string]json.RawMessage, res obj := new(BackupPolicyPlanReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -27890,6 +31730,7 @@ func UnmarshalBackupPolicyPlanRemote(m map[string]json.RawMessage, result interf obj := new(BackupPolicyPlanRemote) err = core.UnmarshalModel(m, "region", &obj.Region, UnmarshalRegionReference) if err != nil { + err = core.SDKErrorf(err, "", "region-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -27913,14 +31754,17 @@ func UnmarshalBackupPolicyPlanRemoteRegionPolicy(m map[string]json.RawMessage, r obj := new(BackupPolicyPlanRemoteRegionPolicy) err = core.UnmarshalPrimitive(m, "delete_over_count", &obj.DeleteOverCount) if err != nil { + err = core.SDKErrorf(err, "", "delete_over_count-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyReference) if err != nil { + err = core.SDKErrorf(err, "", "encryption_key-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "region", &obj.Region, UnmarshalRegionReference) if err != nil { + err = core.SDKErrorf(err, "", "region-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -27948,6 +31792,9 @@ func (*VpcV1) NewBackupPolicyPlanRemoteRegionPolicyPrototype(region RegionIdenti Region: region, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -27956,14 +31803,17 @@ func UnmarshalBackupPolicyPlanRemoteRegionPolicyPrototype(m map[string]json.RawM obj := new(BackupPolicyPlanRemoteRegionPolicyPrototype) err = core.UnmarshalPrimitive(m, "delete_over_count", &obj.DeleteOverCount) if err != nil { + err = core.SDKErrorf(err, "", "delete_over_count-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "encryption_key-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "region", &obj.Region, UnmarshalRegionIdentity) if err != nil { + err = core.SDKErrorf(err, "", "region-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -28033,30 +31883,37 @@ func UnmarshalBackupPolicyPrototype(m map[string]json.RawMessage, result interfa obj := new(BackupPolicyPrototype) err = core.UnmarshalPrimitive(m, "match_resource_type", &obj.MatchResourceType) if err != nil { + err = core.SDKErrorf(err, "", "match_resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "match_user_tags", &obj.MatchUserTags) if err != nil { + err = core.SDKErrorf(err, "", "match_user_tags-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "plans", &obj.Plans, UnmarshalBackupPolicyPlanPrototype) if err != nil { + err = core.SDKErrorf(err, "", "plans-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "scope", &obj.Scope, UnmarshalBackupPolicyScopePrototype) if err != nil { + err = core.SDKErrorf(err, "", "scope-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "included_content", &obj.IncludedContent) if err != nil { + err = core.SDKErrorf(err, "", "included_content-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -28097,14 +31954,17 @@ func UnmarshalBackupPolicyScope(m map[string]json.RawMessage, result interface{} obj := new(BackupPolicyScope) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -28134,6 +31994,7 @@ func UnmarshalBackupPolicyScopePrototype(m map[string]json.RawMessage, result in obj := new(BackupPolicyScopePrototype) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -28218,7 +32079,18 @@ type BareMetalServer struct { // The resource type. ResourceType *string `json:"resource_type" validate:"required"` - // The status of the bare metal server. + // The status of this bare metal server: + // - `deleting`: server is undergoing deletion + // - `failed`: server is failed and not usable (see `status_reasons`) + // - `maintenance`: server is undergoing maintenance (not usable) + // - `pending`: server is being provisioned and not yet usable + // - `restarting`: server is restarting and not yet usable + // - `running`: server is powered on + // - `starting`: server is starting and not yet usable + // - `stopped`: server is powered off + // + // The enumerated values for this property may + // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. Status *string `json:"status" validate:"required"` // The reasons for the current status (if any). @@ -28252,7 +32124,18 @@ const ( ) // Constants associated with the BareMetalServer.Status property. -// The status of the bare metal server. +// The status of this bare metal server: +// - `deleting`: server is undergoing deletion +// - `failed`: server is failed and not usable (see `status_reasons`) +// - `maintenance`: server is undergoing maintenance (not usable) +// - `pending`: server is being provisioned and not yet usable +// - `restarting`: server is restarting and not yet usable +// - `running`: server is powered on +// - `starting`: server is starting and not yet usable +// - `stopped`: server is powered off +// +// The enumerated values for this property may +// [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. const ( BareMetalServerStatusDeletingConst = "deleting" BareMetalServerStatusFailedConst = "failed" @@ -28262,7 +32145,6 @@ const ( BareMetalServerStatusRunningConst = "running" BareMetalServerStatusStartingConst = "starting" BareMetalServerStatusStoppedConst = "stopped" - BareMetalServerStatusStoppingConst = "stopping" ) // UnmarshalBareMetalServer unmarshals an instance of BareMetalServer from the specified map of raw messages. @@ -28270,102 +32152,127 @@ func UnmarshalBareMetalServer(m map[string]json.RawMessage, result interface{}) obj := new(BareMetalServer) err = core.UnmarshalPrimitive(m, "bandwidth", &obj.Bandwidth) if err != nil { + err = core.SDKErrorf(err, "", "bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_target", &obj.BootTarget, UnmarshalBareMetalServerBootTarget) if err != nil { + err = core.SDKErrorf(err, "", "boot_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "cpu", &obj.Cpu, UnmarshalBareMetalServerCpu) if err != nil { + err = core.SDKErrorf(err, "", "cpu-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "disks", &obj.Disks, UnmarshalBareMetalServerDisk) if err != nil { + err = core.SDKErrorf(err, "", "disks-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "enable_secure_boot", &obj.EnableSecureBoot) if err != nil { + err = core.SDKErrorf(err, "", "enable_secure_boot-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "lifecycle_reasons", &obj.LifecycleReasons, UnmarshalBareMetalServerLifecycleReason) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "memory", &obj.Memory) if err != nil { + err = core.SDKErrorf(err, "", "memory-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalBareMetalServerNetworkAttachmentReference) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfaceBareMetalServerContextReference) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalBareMetalServerNetworkAttachmentReference) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfaceBareMetalServerContextReference) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_interface-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalBareMetalServerProfileReference) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "status_reasons", &obj.StatusReasons, UnmarshalBareMetalServerStatusReason) if err != nil { + err = core.SDKErrorf(err, "", "status_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "trusted_platform_module", &obj.TrustedPlatformModule, UnmarshalBareMetalServerTrustedPlatformModule) if err != nil { + err = core.SDKErrorf(err, "", "trusted_platform_module-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -28415,22 +32322,27 @@ func UnmarshalBareMetalServerBootTarget(m map[string]json.RawMessage, result int obj := new(BareMetalServerBootTarget) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalBareMetalServerDiskReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -28457,18 +32369,22 @@ func UnmarshalBareMetalServerCpu(m map[string]json.RawMessage, result interface{ obj := new(BareMetalServerCpu) err = core.UnmarshalPrimitive(m, "architecture", &obj.Architecture) if err != nil { + err = core.SDKErrorf(err, "", "architecture-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "core_count", &obj.CoreCount) if err != nil { + err = core.SDKErrorf(err, "", "core_count-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "socket_count", &obj.SocketCount) if err != nil { + err = core.SDKErrorf(err, "", "socket_count-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "threads_per_core", &obj.ThreadsPerCore) if err != nil { + err = core.SDKErrorf(err, "", "threads_per_core-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -28499,22 +32415,27 @@ func UnmarshalBareMetalServerCollection(m map[string]json.RawMessage, result int obj := new(BareMetalServerCollection) err = core.UnmarshalModel(m, "bare_metal_servers", &obj.BareMetalServers, UnmarshalBareMetalServer) if err != nil { + err = core.SDKErrorf(err, "", "bare_metal_servers-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalBareMetalServerCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalBareMetalServerCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -28527,8 +32448,11 @@ func (resp *BareMetalServerCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -28544,6 +32468,7 @@ func UnmarshalBareMetalServerCollectionFirst(m map[string]json.RawMessage, resul obj := new(BareMetalServerCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -28561,6 +32486,7 @@ func UnmarshalBareMetalServerCollectionNext(m map[string]json.RawMessage, result obj := new(BareMetalServerCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -28601,26 +32527,32 @@ func UnmarshalBareMetalServerConsoleAccessToken(m map[string]json.RawMessage, re obj := new(BareMetalServerConsoleAccessToken) err = core.UnmarshalPrimitive(m, "access_token", &obj.AccessToken) if err != nil { + err = core.SDKErrorf(err, "", "access_token-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "console_type", &obj.ConsoleType) if err != nil { + err = core.SDKErrorf(err, "", "console_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "expires_at", &obj.ExpiresAt) if err != nil { + err = core.SDKErrorf(err, "", "expires_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "force", &obj.Force) if err != nil { + err = core.SDKErrorf(err, "", "force-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -28682,30 +32614,37 @@ func UnmarshalBareMetalServerDisk(m map[string]json.RawMessage, result interface obj := new(BareMetalServerDisk) err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType) if err != nil { + err = core.SDKErrorf(err, "", "interface_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "size", &obj.Size) if err != nil { + err = core.SDKErrorf(err, "", "size-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -28723,6 +32662,7 @@ func UnmarshalBareMetalServerDiskCollection(m map[string]json.RawMessage, result obj := new(BareMetalServerDiskCollection) err = core.UnmarshalModel(m, "disks", &obj.Disks, UnmarshalBareMetalServerDisk) if err != nil { + err = core.SDKErrorf(err, "", "disks-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -28740,6 +32680,7 @@ func UnmarshalBareMetalServerDiskPatch(m map[string]json.RawMessage, result inte obj := new(BareMetalServerDiskPatch) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -28753,6 +32694,9 @@ func (bareMetalServerDiskPatch *BareMetalServerDiskPatch) AsPatch() (_patch map[ if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -28768,6 +32712,7 @@ func UnmarshalBareMetalServerDiskReferenceDeleted(m map[string]json.RawMessage, obj := new(BareMetalServerDiskReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -28792,14 +32737,17 @@ func UnmarshalBareMetalServerInitialization(m map[string]json.RawMessage, result obj := new(BareMetalServerInitialization) err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageReference) if err != nil { + err = core.SDKErrorf(err, "", "image-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyReference) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "user_accounts", &obj.UserAccounts, UnmarshalBareMetalServerInitializationUserAccount) if err != nil { + err = core.SDKErrorf(err, "", "user_accounts-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -28831,6 +32779,9 @@ func (*VpcV1) NewBareMetalServerInitializationPrototype(image ImageIdentityIntf, Keys: keys, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -28839,14 +32790,17 @@ func UnmarshalBareMetalServerInitializationPrototype(m map[string]json.RawMessag obj := new(BareMetalServerInitializationPrototype) err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity) if err != nil { + err = core.SDKErrorf(err, "", "image-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -28889,18 +32843,22 @@ func UnmarshalBareMetalServerInitializationUserAccount(m map[string]json.RawMess obj := new(BareMetalServerInitializationUserAccount) err = core.UnmarshalPrimitive(m, "encrypted_password", &obj.EncryptedPassword) if err != nil { + err = core.SDKErrorf(err, "", "encrypted_password-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalKeyReference) if err != nil { + err = core.SDKErrorf(err, "", "encryption_key-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "username", &obj.Username) if err != nil { + err = core.SDKErrorf(err, "", "username-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -28910,6 +32868,7 @@ func UnmarshalBareMetalServerInitializationUserAccount(m map[string]json.RawMess // BareMetalServerLifecycleReason : BareMetalServerLifecycleReason struct type BareMetalServerLifecycleReason struct { // A reason code for this lifecycle state: + // - `internal_error`: internal error (contact IBM support) // - `resource_suspended_by_provider`: The resource has been suspended (contact IBM // support) // @@ -28926,12 +32885,14 @@ type BareMetalServerLifecycleReason struct { // Constants associated with the BareMetalServerLifecycleReason.Code property. // A reason code for this lifecycle state: +// - `internal_error`: internal error (contact IBM support) // - `resource_suspended_by_provider`: The resource has been suspended (contact IBM // support) // // The enumerated values for this property may // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. const ( + BareMetalServerLifecycleReasonCodeInternalErrorConst = "internal_error" BareMetalServerLifecycleReasonCodeResourceSuspendedByProviderConst = "resource_suspended_by_provider" ) @@ -28940,14 +32901,17 @@ func UnmarshalBareMetalServerLifecycleReason(m map[string]json.RawMessage, resul obj := new(BareMetalServerLifecycleReason) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "message", &obj.Message) if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -29085,62 +33049,77 @@ func UnmarshalBareMetalServerNetworkAttachment(m map[string]json.RawMessage, res obj := new(BareMetalServerNetworkAttachment) err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType) if err != nil { + err = core.SDKErrorf(err, "", "interface_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "port_speed", &obj.PortSpeed) if err != nil { + err = core.SDKErrorf(err, "", "port_speed-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "virtual_network_interface", &obj.VirtualNetworkInterface, UnmarshalVirtualNetworkInterfaceReferenceAttachmentContext) if err != nil { + err = core.SDKErrorf(err, "", "virtual_network_interface-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "allowed_vlans", &obj.AllowedVlans) if err != nil { + err = core.SDKErrorf(err, "", "allowed_vlans-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "allow_to_float", &obj.AllowToFloat) if err != nil { + err = core.SDKErrorf(err, "", "allow_to_float-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "vlan", &obj.Vlan) if err != nil { + err = core.SDKErrorf(err, "", "vlan-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -29171,22 +33150,27 @@ func UnmarshalBareMetalServerNetworkAttachmentCollection(m map[string]json.RawMe obj := new(BareMetalServerNetworkAttachmentCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalBareMetalServerNetworkAttachmentCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalBareMetalServerNetworkAttachment) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalBareMetalServerNetworkAttachmentCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -29199,8 +33183,11 @@ func (resp *BareMetalServerNetworkAttachmentCollection) GetNextStart() (*string, return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -29216,6 +33203,7 @@ func UnmarshalBareMetalServerNetworkAttachmentCollectionFirst(m map[string]json. obj := new(BareMetalServerNetworkAttachmentCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -29233,6 +33221,7 @@ func UnmarshalBareMetalServerNetworkAttachmentCollectionNext(m map[string]json.R obj := new(BareMetalServerNetworkAttachmentCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -29255,10 +33244,12 @@ func UnmarshalBareMetalServerNetworkAttachmentPatch(m map[string]json.RawMessage obj := new(BareMetalServerNetworkAttachmentPatch) err = core.UnmarshalPrimitive(m, "allowed_vlans", &obj.AllowedVlans) if err != nil { + err = core.SDKErrorf(err, "", "allowed_vlans-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -29272,6 +33263,9 @@ func (bareMetalServerNetworkAttachmentPatch *BareMetalServerNetworkAttachmentPat if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -29355,26 +33349,32 @@ func UnmarshalBareMetalServerNetworkAttachmentPrototype(m map[string]json.RawMes obj := new(BareMetalServerNetworkAttachmentPrototype) err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType) if err != nil { + err = core.SDKErrorf(err, "", "interface_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "virtual_network_interface", &obj.VirtualNetworkInterface, UnmarshalBareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface) if err != nil { + err = core.SDKErrorf(err, "", "virtual_network_interface-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "allowed_vlans", &obj.AllowedVlans) if err != nil { + err = core.SDKErrorf(err, "", "allowed_vlans-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "allow_to_float", &obj.AllowToFloat) if err != nil { + err = core.SDKErrorf(err, "", "allow_to_float-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "vlan", &obj.Vlan) if err != nil { + err = core.SDKErrorf(err, "", "vlan-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -29471,50 +33471,62 @@ func UnmarshalBareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface(m obj := new(BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface) err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing) if err != nil { + err = core.SDKErrorf(err, "", "allow_ip_spoofing-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { + err = core.SDKErrorf(err, "", "auto_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "enable_infrastructure_nat", &obj.EnableInfrastructureNat) if err != nil { + err = core.SDKErrorf(err, "", "enable_infrastructure_nat-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "ips", &obj.Ips, UnmarshalVirtualNetworkInterfaceIPPrototype) if err != nil { + err = core.SDKErrorf(err, "", "ips-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalVirtualNetworkInterfacePrimaryIPPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "security_groups-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -29560,30 +33572,37 @@ func UnmarshalBareMetalServerNetworkAttachmentReference(m map[string]json.RawMes obj := new(BareMetalServerNetworkAttachmentReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalBareMetalServerNetworkAttachmentReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -29602,6 +33621,7 @@ func UnmarshalBareMetalServerNetworkAttachmentReferenceDeleted(m map[string]json obj := new(BareMetalServerNetworkAttachmentReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -29854,21 +33874,32 @@ func UnmarshalBareMetalServerNetworkInterface(m map[string]json.RawMessage, resu var discValue string err = core.UnmarshalPrimitive(m, "interface_type", &discValue) if err != nil { - err = fmt.Errorf("error unmarshalling discriminator property 'interface_type': %s", err.Error()) + errMsg := fmt.Sprintf("error unmarshalling discriminator property 'interface_type': %s", err.Error()) + err = core.SDKErrorf(err, errMsg, "discriminator-unmarshal-error", common.GetComponentInfo()) return } if discValue == "" { - err = fmt.Errorf("required discriminator property 'interface_type' not found in JSON object") + err = core.SDKErrorf(err, "required discriminator property 'interface_type' not found in JSON object", "missing-discriminator", common.GetComponentInfo()) return } if discValue == "hipersocket" { err = core.UnmarshalModel(m, "", result, UnmarshalBareMetalServerNetworkInterfaceByHiperSocket) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-BareMetalServerNetworkInterfaceByHiperSocket-error", common.GetComponentInfo()) + } } else if discValue == "pci" { err = core.UnmarshalModel(m, "", result, UnmarshalBareMetalServerNetworkInterfaceByPci) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-BareMetalServerNetworkInterfaceByPci-error", common.GetComponentInfo()) + } } else if discValue == "vlan" { err = core.UnmarshalModel(m, "", result, UnmarshalBareMetalServerNetworkInterfaceByVlan) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-BareMetalServerNetworkInterfaceByVlan-error", common.GetComponentInfo()) + } } else { - err = fmt.Errorf("unrecognized value for discriminator property 'interface_type': %s", discValue) + errMsg := fmt.Sprintf("unrecognized value for discriminator property 'interface_type': %s", discValue) + err = core.SDKErrorf(err, errMsg, "invalid-discriminator", common.GetComponentInfo()) } return } @@ -29897,22 +33928,27 @@ func UnmarshalBareMetalServerNetworkInterfaceCollection(m map[string]json.RawMes obj := new(BareMetalServerNetworkInterfaceCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalBareMetalServerNetworkInterfaceCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalBareMetalServerNetworkInterface) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalBareMetalServerNetworkInterfaceCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -29925,8 +33961,11 @@ func (resp *BareMetalServerNetworkInterfaceCollection) GetNextStart() (*string, return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -29942,6 +33981,7 @@ func UnmarshalBareMetalServerNetworkInterfaceCollectionFirst(m map[string]json.R obj := new(BareMetalServerNetworkInterfaceCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -29959,6 +33999,7 @@ func UnmarshalBareMetalServerNetworkInterfaceCollectionNext(m map[string]json.Ra obj := new(BareMetalServerNetworkInterfaceCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -30005,18 +34046,22 @@ func UnmarshalBareMetalServerNetworkInterfacePatch(m map[string]json.RawMessage, obj := new(BareMetalServerNetworkInterfacePatch) err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing) if err != nil { + err = core.SDKErrorf(err, "", "allow_ip_spoofing-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "allowed_vlans", &obj.AllowedVlans) if err != nil { + err = core.SDKErrorf(err, "", "allowed_vlans-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "enable_infrastructure_nat", &obj.EnableInfrastructureNat) if err != nil { + err = core.SDKErrorf(err, "", "enable_infrastructure_nat-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -30030,6 +34075,9 @@ func (bareMetalServerNetworkInterfacePatch *BareMetalServerNetworkInterfacePatch if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -30166,21 +34214,32 @@ func UnmarshalBareMetalServerNetworkInterfacePrototype(m map[string]json.RawMess var discValue string err = core.UnmarshalPrimitive(m, "interface_type", &discValue) if err != nil { - err = fmt.Errorf("error unmarshalling discriminator property 'interface_type': %s", err.Error()) + errMsg := fmt.Sprintf("error unmarshalling discriminator property 'interface_type': %s", err.Error()) + err = core.SDKErrorf(err, errMsg, "discriminator-unmarshal-error", common.GetComponentInfo()) return } if discValue == "" { - err = fmt.Errorf("required discriminator property 'interface_type' not found in JSON object") + err = core.SDKErrorf(err, "required discriminator property 'interface_type' not found in JSON object", "missing-discriminator", common.GetComponentInfo()) return } if discValue == "hipersocket" { err = core.UnmarshalModel(m, "", result, UnmarshalBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype-error", common.GetComponentInfo()) + } } else if discValue == "pci" { err = core.UnmarshalModel(m, "", result, UnmarshalBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype-error", common.GetComponentInfo()) + } } else if discValue == "vlan" { err = core.UnmarshalModel(m, "", result, UnmarshalBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype-error", common.GetComponentInfo()) + } } else { - err = fmt.Errorf("unrecognized value for discriminator property 'interface_type': %s", discValue) + errMsg := fmt.Sprintf("unrecognized value for discriminator property 'interface_type': %s", discValue) + err = core.SDKErrorf(err, errMsg, "invalid-discriminator", common.GetComponentInfo()) } return } @@ -30197,6 +34256,7 @@ func UnmarshalBareMetalServerNetworkInterfaceReferenceDeleted(m map[string]json. obj := new(BareMetalServerNetworkInterfaceReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -30215,6 +34275,7 @@ func UnmarshalBareMetalServerNetworkInterfaceReferenceTargetContextDeleted(m map obj := new(BareMetalServerNetworkInterfaceReferenceTargetContextDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -30242,14 +34303,17 @@ func UnmarshalBareMetalServerPatch(m map[string]json.RawMessage, result interfac obj := new(BareMetalServerPatch) err = core.UnmarshalPrimitive(m, "enable_secure_boot", &obj.EnableSecureBoot) if err != nil { + err = core.SDKErrorf(err, "", "enable_secure_boot-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "trusted_platform_module", &obj.TrustedPlatformModule, UnmarshalBareMetalServerTrustedPlatformModulePatch) if err != nil { + err = core.SDKErrorf(err, "", "trusted_platform_module-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -30263,6 +34327,9 @@ func (bareMetalServerPatch *BareMetalServerPatch) AsPatch() (_patch map[string]i if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -30320,18 +34387,22 @@ func UnmarshalBareMetalServerPrimaryNetworkAttachmentPrototype(m map[string]json obj := new(BareMetalServerPrimaryNetworkAttachmentPrototype) err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType) if err != nil { + err = core.SDKErrorf(err, "", "interface_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "virtual_network_interface", &obj.VirtualNetworkInterface, UnmarshalBareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface) if err != nil { + err = core.SDKErrorf(err, "", "virtual_network_interface-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "allowed_vlans", &obj.AllowedVlans) if err != nil { + err = core.SDKErrorf(err, "", "allowed_vlans-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -30426,6 +34497,9 @@ func (*VpcV1) NewBareMetalServerPrimaryNetworkInterfacePrototype(subnet SubnetId Subnet: subnet, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -30434,34 +34508,42 @@ func UnmarshalBareMetalServerPrimaryNetworkInterfacePrototype(m map[string]json. obj := new(BareMetalServerPrimaryNetworkInterfacePrototype) err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing) if err != nil { + err = core.SDKErrorf(err, "", "allow_ip_spoofing-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "allowed_vlans", &obj.AllowedVlans) if err != nil { + err = core.SDKErrorf(err, "", "allowed_vlans-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "enable_infrastructure_nat", &obj.EnableInfrastructureNat) if err != nil { + err = core.SDKErrorf(err, "", "enable_infrastructure_nat-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType) if err != nil { + err = core.SDKErrorf(err, "", "interface_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalNetworkInterfaceIPPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "security_groups-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -30522,66 +34604,82 @@ func UnmarshalBareMetalServerProfile(m map[string]json.RawMessage, result interf obj := new(BareMetalServerProfile) err = core.UnmarshalModel(m, "bandwidth", &obj.Bandwidth, UnmarshalBareMetalServerProfileBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "console_types", &obj.ConsoleTypes, UnmarshalBareMetalServerProfileConsoleTypes) if err != nil { + err = core.SDKErrorf(err, "", "console_types-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "cpu_architecture", &obj.CpuArchitecture, UnmarshalBareMetalServerProfileCpuArchitecture) if err != nil { + err = core.SDKErrorf(err, "", "cpu_architecture-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "cpu_core_count", &obj.CpuCoreCount, UnmarshalBareMetalServerProfileCpuCoreCount) if err != nil { + err = core.SDKErrorf(err, "", "cpu_core_count-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "cpu_socket_count", &obj.CpuSocketCount, UnmarshalBareMetalServerProfileCpuSocketCount) if err != nil { + err = core.SDKErrorf(err, "", "cpu_socket_count-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "disks", &obj.Disks, UnmarshalBareMetalServerProfileDisk) if err != nil { + err = core.SDKErrorf(err, "", "disks-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "family", &obj.Family) if err != nil { + err = core.SDKErrorf(err, "", "family-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "memory", &obj.Memory, UnmarshalBareMetalServerProfileMemory) if err != nil { + err = core.SDKErrorf(err, "", "memory-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachment_count", &obj.NetworkAttachmentCount, UnmarshalBareMetalServerProfileNetworkAttachmentCount) if err != nil { + err = core.SDKErrorf(err, "", "network_attachment_count-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interface_count", &obj.NetworkInterfaceCount, UnmarshalBareMetalServerProfileNetworkInterfaceCount) if err != nil { + err = core.SDKErrorf(err, "", "network_interface_count-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "os_architecture", &obj.OsArchitecture, UnmarshalBareMetalServerProfileOsArchitecture) if err != nil { + err = core.SDKErrorf(err, "", "os_architecture-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "supported_trusted_platform_module_modes", &obj.SupportedTrustedPlatformModuleModes, UnmarshalBareMetalServerProfileSupportedTrustedPlatformModuleModes) if err != nil { + err = core.SDKErrorf(err, "", "supported_trusted_platform_module_modes-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "virtual_network_interfaces_supported", &obj.VirtualNetworkInterfacesSupported, UnmarshalBareMetalServerProfileVirtualNetworkInterfacesSupported) if err != nil { + err = core.SDKErrorf(err, "", "virtual_network_interfaces_supported-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -30636,30 +34734,37 @@ func UnmarshalBareMetalServerProfileBandwidth(m map[string]json.RawMessage, resu obj := new(BareMetalServerProfileBandwidth) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -30689,14 +34794,17 @@ func UnmarshalBareMetalServerProfileCpuArchitecture(m map[string]json.RawMessage obj := new(BareMetalServerProfileCpuArchitecture) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -30751,30 +34859,37 @@ func UnmarshalBareMetalServerProfileCpuCoreCount(m map[string]json.RawMessage, r obj := new(BareMetalServerProfileCpuCoreCount) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -30829,30 +34944,37 @@ func UnmarshalBareMetalServerProfileCpuSocketCount(m map[string]json.RawMessage, obj := new(BareMetalServerProfileCpuSocketCount) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -30883,22 +35005,27 @@ func UnmarshalBareMetalServerProfileCollection(m map[string]json.RawMessage, res obj := new(BareMetalServerProfileCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalBareMetalServerProfileCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalBareMetalServerProfileCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profiles", &obj.Profiles, UnmarshalBareMetalServerProfile) if err != nil { + err = core.SDKErrorf(err, "", "profiles-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -30911,8 +35038,11 @@ func (resp *BareMetalServerProfileCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -30928,6 +35058,7 @@ func UnmarshalBareMetalServerProfileCollectionFirst(m map[string]json.RawMessage obj := new(BareMetalServerProfileCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -30945,6 +35076,7 @@ func UnmarshalBareMetalServerProfileCollectionNext(m map[string]json.RawMessage, obj := new(BareMetalServerProfileCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -30978,10 +35110,12 @@ func UnmarshalBareMetalServerProfileConsoleTypes(m map[string]json.RawMessage, r obj := new(BareMetalServerProfileConsoleTypes) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -31002,14 +35136,17 @@ func UnmarshalBareMetalServerProfileDisk(m map[string]json.RawMessage, result in obj := new(BareMetalServerProfileDisk) err = core.UnmarshalModel(m, "quantity", &obj.Quantity, UnmarshalBareMetalServerProfileDiskQuantity) if err != nil { + err = core.SDKErrorf(err, "", "quantity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "size", &obj.Size, UnmarshalBareMetalServerProfileDiskSize) if err != nil { + err = core.SDKErrorf(err, "", "size-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "supported_interface_types", &obj.SupportedInterfaceTypes, UnmarshalBareMetalServerProfileDiskSupportedInterfaces) if err != nil { + err = core.SDKErrorf(err, "", "supported_interface_types-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -31064,30 +35201,37 @@ func UnmarshalBareMetalServerProfileDiskQuantity(m map[string]json.RawMessage, r obj := new(BareMetalServerProfileDiskQuantity) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -31142,30 +35286,37 @@ func UnmarshalBareMetalServerProfileDiskSize(m map[string]json.RawMessage, resul obj := new(BareMetalServerProfileDiskSize) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -31229,14 +35380,17 @@ func UnmarshalBareMetalServerProfileDiskSupportedInterfaces(m map[string]json.Ra obj := new(BareMetalServerProfileDiskSupportedInterfaces) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -31268,10 +35422,12 @@ func UnmarshalBareMetalServerProfileIdentity(m map[string]json.RawMessage, resul obj := new(BareMetalServerProfileIdentity) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -31326,30 +35482,37 @@ func UnmarshalBareMetalServerProfileMemory(m map[string]json.RawMessage, result obj := new(BareMetalServerProfileMemory) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -31390,14 +35553,17 @@ func UnmarshalBareMetalServerProfileNetworkAttachmentCount(m map[string]json.Raw obj := new(BareMetalServerProfileNetworkAttachmentCount) err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -31438,14 +35604,17 @@ func UnmarshalBareMetalServerProfileNetworkInterfaceCount(m map[string]json.RawM obj := new(BareMetalServerProfileNetworkInterfaceCount) err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -31475,14 +35644,17 @@ func UnmarshalBareMetalServerProfileOsArchitecture(m map[string]json.RawMessage, obj := new(BareMetalServerProfileOsArchitecture) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -31512,14 +35684,17 @@ func UnmarshalBareMetalServerProfileReference(m map[string]json.RawMessage, resu obj := new(BareMetalServerProfileReference) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -31558,10 +35733,12 @@ func UnmarshalBareMetalServerProfileSupportedTrustedPlatformModuleModes(m map[st obj := new(BareMetalServerProfileSupportedTrustedPlatformModuleModes) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -31588,10 +35765,12 @@ func UnmarshalBareMetalServerProfileVirtualNetworkInterfacesSupported(m map[stri obj := new(BareMetalServerProfileVirtualNetworkInterfacesSupported) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -31660,50 +35839,62 @@ func UnmarshalBareMetalServerPrototype(m map[string]json.RawMessage, result inte obj := new(BareMetalServerPrototype) err = core.UnmarshalPrimitive(m, "enable_secure_boot", &obj.EnableSecureBoot) if err != nil { + err = core.SDKErrorf(err, "", "enable_secure_boot-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "initialization", &obj.Initialization, UnmarshalBareMetalServerInitializationPrototype) if err != nil { + err = core.SDKErrorf(err, "", "initialization-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalBareMetalServerProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "trusted_platform_module", &obj.TrustedPlatformModule, UnmarshalBareMetalServerTrustedPlatformModulePrototype) if err != nil { + err = core.SDKErrorf(err, "", "trusted_platform_module-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalBareMetalServerNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalBareMetalServerPrimaryNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalBareMetalServerNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalBareMetalServerPrimaryNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_interface-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -31753,14 +35944,17 @@ func UnmarshalBareMetalServerStatusReason(m map[string]json.RawMessage, result i obj := new(BareMetalServerStatusReason) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "message", &obj.Message) if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -31813,14 +36007,17 @@ func UnmarshalBareMetalServerTrustedPlatformModule(m map[string]json.RawMessage, obj := new(BareMetalServerTrustedPlatformModule) err = core.UnmarshalPrimitive(m, "enabled", &obj.Enabled) if err != nil { + err = core.SDKErrorf(err, "", "enabled-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "mode", &obj.Mode) if err != nil { + err = core.SDKErrorf(err, "", "mode-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "supported_modes", &obj.SupportedModes) if err != nil { + err = core.SDKErrorf(err, "", "supported_modes-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -31851,6 +36048,7 @@ func UnmarshalBareMetalServerTrustedPlatformModulePatch(m map[string]json.RawMes obj := new(BareMetalServerTrustedPlatformModulePatch) err = core.UnmarshalPrimitive(m, "mode", &obj.Mode) if err != nil { + err = core.SDKErrorf(err, "", "mode-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -31877,6 +36075,7 @@ func UnmarshalBareMetalServerTrustedPlatformModulePrototype(m map[string]json.Ra obj := new(BareMetalServerTrustedPlatformModulePrototype) err = core.UnmarshalPrimitive(m, "mode", &obj.Mode) if err != nil { + err = core.SDKErrorf(err, "", "mode-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -31906,6 +36105,7 @@ func UnmarshalCatalogOfferingIdentity(m map[string]json.RawMessage, result inter obj := new(CatalogOfferingIdentity) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -31935,6 +36135,7 @@ func UnmarshalCatalogOfferingVersionIdentity(m map[string]json.RawMessage, resul obj := new(CatalogOfferingVersionIdentity) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -31953,6 +36154,7 @@ func UnmarshalCatalogOfferingVersionReference(m map[string]json.RawMessage, resu obj := new(CatalogOfferingVersionReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -31980,6 +36182,7 @@ func UnmarshalCertificateInstanceIdentity(m map[string]json.RawMessage, result i obj := new(CertificateInstanceIdentity) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -31997,124 +36200,105 @@ func UnmarshalCertificateInstanceReference(m map[string]json.RawMessage, result obj := new(CertificateInstanceReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } -// CheckVPNGatewayConnectionLocalCIDROptions : The CheckVPNGatewayConnectionLocalCIDR options. -type CheckVPNGatewayConnectionLocalCIDROptions struct { +// CheckVPNGatewayConnectionsLocalCIDROptions : The CheckVPNGatewayConnectionsLocalCIDR options. +type CheckVPNGatewayConnectionsLocalCIDROptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // The VPN gateway connection identifier. ID *string `json:"id" validate:"required,ne="` - // The address prefix part of the CIDR. - CIDRPrefix *string `json:"cidr_prefix" validate:"required,ne="` - - // The prefix length part of the CIDR. - PrefixLength *string `json:"prefix_length" validate:"required,ne="` + // The IP address range in CIDR block notation. + CIDR *string `json:"cidr" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string } -// NewCheckVPNGatewayConnectionLocalCIDROptions : Instantiate CheckVPNGatewayConnectionLocalCIDROptions -func (*VpcV1) NewCheckVPNGatewayConnectionLocalCIDROptions(vpnGatewayID string, id string, cidrPrefix string, prefixLength string) *CheckVPNGatewayConnectionLocalCIDROptions { - return &CheckVPNGatewayConnectionLocalCIDROptions{ +// NewCheckVPNGatewayConnectionsLocalCIDROptions : Instantiate CheckVPNGatewayConnectionsLocalCIDROptions +func (*VpcV1) NewCheckVPNGatewayConnectionsLocalCIDROptions(vpnGatewayID string, id string, cidr string) *CheckVPNGatewayConnectionsLocalCIDROptions { + return &CheckVPNGatewayConnectionsLocalCIDROptions{ VPNGatewayID: core.StringPtr(vpnGatewayID), ID: core.StringPtr(id), - CIDRPrefix: core.StringPtr(cidrPrefix), - PrefixLength: core.StringPtr(prefixLength), + CIDR: core.StringPtr(cidr), } } // SetVPNGatewayID : Allow user to set VPNGatewayID -func (_options *CheckVPNGatewayConnectionLocalCIDROptions) SetVPNGatewayID(vpnGatewayID string) *CheckVPNGatewayConnectionLocalCIDROptions { +func (_options *CheckVPNGatewayConnectionsLocalCIDROptions) SetVPNGatewayID(vpnGatewayID string) *CheckVPNGatewayConnectionsLocalCIDROptions { _options.VPNGatewayID = core.StringPtr(vpnGatewayID) return _options } // SetID : Allow user to set ID -func (_options *CheckVPNGatewayConnectionLocalCIDROptions) SetID(id string) *CheckVPNGatewayConnectionLocalCIDROptions { +func (_options *CheckVPNGatewayConnectionsLocalCIDROptions) SetID(id string) *CheckVPNGatewayConnectionsLocalCIDROptions { _options.ID = core.StringPtr(id) return _options } -// SetCIDRPrefix : Allow user to set CIDRPrefix -func (_options *CheckVPNGatewayConnectionLocalCIDROptions) SetCIDRPrefix(cidrPrefix string) *CheckVPNGatewayConnectionLocalCIDROptions { - _options.CIDRPrefix = core.StringPtr(cidrPrefix) - return _options -} - -// SetPrefixLength : Allow user to set PrefixLength -func (_options *CheckVPNGatewayConnectionLocalCIDROptions) SetPrefixLength(prefixLength string) *CheckVPNGatewayConnectionLocalCIDROptions { - _options.PrefixLength = core.StringPtr(prefixLength) +// SetCIDR : Allow user to set CIDR +func (_options *CheckVPNGatewayConnectionsLocalCIDROptions) SetCIDR(cidr string) *CheckVPNGatewayConnectionsLocalCIDROptions { + _options.CIDR = core.StringPtr(cidr) return _options } // SetHeaders : Allow user to set Headers -func (options *CheckVPNGatewayConnectionLocalCIDROptions) SetHeaders(param map[string]string) *CheckVPNGatewayConnectionLocalCIDROptions { +func (options *CheckVPNGatewayConnectionsLocalCIDROptions) SetHeaders(param map[string]string) *CheckVPNGatewayConnectionsLocalCIDROptions { options.Headers = param return options } -// CheckVPNGatewayConnectionPeerCIDROptions : The CheckVPNGatewayConnectionPeerCIDR options. -type CheckVPNGatewayConnectionPeerCIDROptions struct { +// CheckVPNGatewayConnectionsPeerCIDROptions : The CheckVPNGatewayConnectionsPeerCIDR options. +type CheckVPNGatewayConnectionsPeerCIDROptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // The VPN gateway connection identifier. ID *string `json:"id" validate:"required,ne="` - // The address prefix part of the CIDR. - CIDRPrefix *string `json:"cidr_prefix" validate:"required,ne="` - - // The prefix length part of the CIDR. - PrefixLength *string `json:"prefix_length" validate:"required,ne="` + // The IP address range in CIDR block notation. + CIDR *string `json:"cidr" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string } -// NewCheckVPNGatewayConnectionPeerCIDROptions : Instantiate CheckVPNGatewayConnectionPeerCIDROptions -func (*VpcV1) NewCheckVPNGatewayConnectionPeerCIDROptions(vpnGatewayID string, id string, cidrPrefix string, prefixLength string) *CheckVPNGatewayConnectionPeerCIDROptions { - return &CheckVPNGatewayConnectionPeerCIDROptions{ +// NewCheckVPNGatewayConnectionsPeerCIDROptions : Instantiate CheckVPNGatewayConnectionsPeerCIDROptions +func (*VpcV1) NewCheckVPNGatewayConnectionsPeerCIDROptions(vpnGatewayID string, id string, cidr string) *CheckVPNGatewayConnectionsPeerCIDROptions { + return &CheckVPNGatewayConnectionsPeerCIDROptions{ VPNGatewayID: core.StringPtr(vpnGatewayID), ID: core.StringPtr(id), - CIDRPrefix: core.StringPtr(cidrPrefix), - PrefixLength: core.StringPtr(prefixLength), + CIDR: core.StringPtr(cidr), } } // SetVPNGatewayID : Allow user to set VPNGatewayID -func (_options *CheckVPNGatewayConnectionPeerCIDROptions) SetVPNGatewayID(vpnGatewayID string) *CheckVPNGatewayConnectionPeerCIDROptions { +func (_options *CheckVPNGatewayConnectionsPeerCIDROptions) SetVPNGatewayID(vpnGatewayID string) *CheckVPNGatewayConnectionsPeerCIDROptions { _options.VPNGatewayID = core.StringPtr(vpnGatewayID) return _options } // SetID : Allow user to set ID -func (_options *CheckVPNGatewayConnectionPeerCIDROptions) SetID(id string) *CheckVPNGatewayConnectionPeerCIDROptions { +func (_options *CheckVPNGatewayConnectionsPeerCIDROptions) SetID(id string) *CheckVPNGatewayConnectionsPeerCIDROptions { _options.ID = core.StringPtr(id) return _options } -// SetCIDRPrefix : Allow user to set CIDRPrefix -func (_options *CheckVPNGatewayConnectionPeerCIDROptions) SetCIDRPrefix(cidrPrefix string) *CheckVPNGatewayConnectionPeerCIDROptions { - _options.CIDRPrefix = core.StringPtr(cidrPrefix) - return _options -} - -// SetPrefixLength : Allow user to set PrefixLength -func (_options *CheckVPNGatewayConnectionPeerCIDROptions) SetPrefixLength(prefixLength string) *CheckVPNGatewayConnectionPeerCIDROptions { - _options.PrefixLength = core.StringPtr(prefixLength) +// SetCIDR : Allow user to set CIDR +func (_options *CheckVPNGatewayConnectionsPeerCIDROptions) SetCIDR(cidr string) *CheckVPNGatewayConnectionsPeerCIDROptions { + _options.CIDR = core.StringPtr(cidr) return _options } // SetHeaders : Allow user to set Headers -func (options *CheckVPNGatewayConnectionPeerCIDROptions) SetHeaders(param map[string]string) *CheckVPNGatewayConnectionPeerCIDROptions { +func (options *CheckVPNGatewayConnectionsPeerCIDROptions) SetHeaders(param map[string]string) *CheckVPNGatewayConnectionsPeerCIDROptions { options.Headers = param return options } @@ -32144,10 +36328,12 @@ func UnmarshalCloudObjectStorageBucketIdentity(m map[string]json.RawMessage, res obj := new(CloudObjectStorageBucketIdentity) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -32168,10 +36354,12 @@ func UnmarshalCloudObjectStorageBucketReference(m map[string]json.RawMessage, re obj := new(CloudObjectStorageBucketReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -32189,6 +36377,7 @@ func UnmarshalCloudObjectStorageObjectReference(m map[string]json.RawMessage, re obj := new(CloudObjectStorageObjectReference) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -36380,6 +40569,7 @@ func UnmarshalDnsInstanceIdentity(m map[string]json.RawMessage, result interface obj := new(DnsInstanceIdentity) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -36397,6 +40587,7 @@ func UnmarshalDnsInstanceReference(m map[string]json.RawMessage, result interfac obj := new(DnsInstanceReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -36420,10 +40611,12 @@ func UnmarshalDnsServer(m map[string]json.RawMessage, result interface{}) (err e obj := new(DnsServer) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone_affinity", &obj.ZoneAffinity, UnmarshalZoneReference) if err != nil { + err = core.SDKErrorf(err, "", "zone_affinity-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -36448,6 +40641,9 @@ func (*VpcV1) NewDnsServerPrototype(address string) (_model *DnsServerPrototype, Address: core.StringPtr(address), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -36456,10 +40652,12 @@ func UnmarshalDnsServerPrototype(m map[string]json.RawMessage, result interface{ obj := new(DnsServerPrototype) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone_affinity", &obj.ZoneAffinity, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone_affinity-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -36486,6 +40684,7 @@ func UnmarshalDnsZoneIdentity(m map[string]json.RawMessage, result interface{}) obj := new(DnsZoneIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -36502,6 +40701,7 @@ func UnmarshalDnsZoneReference(m map[string]json.RawMessage, result interface{}) obj := new(DnsZoneReference) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -36619,94 +40819,117 @@ func UnmarshalDedicatedHost(m map[string]json.RawMessage, result interface{}) (e obj := new(DedicatedHost) err = core.UnmarshalPrimitive(m, "available_memory", &obj.AvailableMemory) if err != nil { + err = core.SDKErrorf(err, "", "available_memory-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "available_vcpu", &obj.AvailableVcpu, UnmarshalVcpu) if err != nil { + err = core.SDKErrorf(err, "", "available_vcpu-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "disks", &obj.Disks, UnmarshalDedicatedHostDisk) if err != nil { + err = core.SDKErrorf(err, "", "disks-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalDedicatedHostGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "instance_placement_enabled", &obj.InstancePlacementEnabled) if err != nil { + err = core.SDKErrorf(err, "", "instance_placement_enabled-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "instances", &obj.Instances, UnmarshalInstanceReference) if err != nil { + err = core.SDKErrorf(err, "", "instances-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "memory", &obj.Memory) if err != nil { + err = core.SDKErrorf(err, "", "memory-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "numa", &obj.Numa, UnmarshalDedicatedHostNuma) if err != nil { + err = core.SDKErrorf(err, "", "numa-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalDedicatedHostProfileReference) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "provisionable", &obj.Provisionable) if err != nil { + err = core.SDKErrorf(err, "", "provisionable-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "socket_count", &obj.SocketCount) if err != nil { + err = core.SDKErrorf(err, "", "socket_count-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "state", &obj.State) if err != nil { + err = core.SDKErrorf(err, "", "state-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "supported_instance_profiles", &obj.SupportedInstanceProfiles, UnmarshalInstanceProfileReference) if err != nil { + err = core.SDKErrorf(err, "", "supported_instance_profiles-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vcpu", &obj.Vcpu, UnmarshalVcpu) if err != nil { + err = core.SDKErrorf(err, "", "vcpu-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -36737,22 +40960,27 @@ func UnmarshalDedicatedHostCollection(m map[string]json.RawMessage, result inter obj := new(DedicatedHostCollection) err = core.UnmarshalModel(m, "dedicated_hosts", &obj.DedicatedHosts, UnmarshalDedicatedHost) if err != nil { + err = core.SDKErrorf(err, "", "dedicated_hosts-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalDedicatedHostCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalDedicatedHostCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -36765,8 +40993,11 @@ func (resp *DedicatedHostCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -36782,6 +41013,7 @@ func UnmarshalDedicatedHostCollectionFirst(m map[string]json.RawMessage, result obj := new(DedicatedHostCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -36799,6 +41031,7 @@ func UnmarshalDedicatedHostCollectionNext(m map[string]json.RawMessage, result i obj := new(DedicatedHostCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -36889,50 +41122,62 @@ func UnmarshalDedicatedHostDisk(m map[string]json.RawMessage, result interface{} obj := new(DedicatedHostDisk) err = core.UnmarshalPrimitive(m, "available", &obj.Available) if err != nil { + err = core.SDKErrorf(err, "", "available-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "instance_disks", &obj.InstanceDisks, UnmarshalInstanceDiskReference) if err != nil { + err = core.SDKErrorf(err, "", "instance_disks-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType) if err != nil { + err = core.SDKErrorf(err, "", "interface_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "provisionable", &obj.Provisionable) if err != nil { + err = core.SDKErrorf(err, "", "provisionable-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "size", &obj.Size) if err != nil { + err = core.SDKErrorf(err, "", "size-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "supported_instance_interface_types", &obj.SupportedInstanceInterfaceTypes) if err != nil { + err = core.SDKErrorf(err, "", "supported_instance_interface_types-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -36950,6 +41195,7 @@ func UnmarshalDedicatedHostDiskCollection(m map[string]json.RawMessage, result i obj := new(DedicatedHostDiskCollection) err = core.UnmarshalModel(m, "disks", &obj.Disks, UnmarshalDedicatedHostDisk) if err != nil { + err = core.SDKErrorf(err, "", "disks-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -36967,6 +41213,7 @@ func UnmarshalDedicatedHostDiskPatch(m map[string]json.RawMessage, result interf obj := new(DedicatedHostDiskPatch) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -36980,6 +41227,9 @@ func (dedicatedHostDiskPatch *DedicatedHostDiskPatch) AsPatch() (_patch map[stri if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -37041,50 +41291,62 @@ func UnmarshalDedicatedHostGroup(m map[string]json.RawMessage, result interface{ obj := new(DedicatedHostGroup) err = core.UnmarshalPrimitive(m, "class", &obj.Class) if err != nil { + err = core.SDKErrorf(err, "", "class-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "dedicated_hosts", &obj.DedicatedHosts, UnmarshalDedicatedHostReference) if err != nil { + err = core.SDKErrorf(err, "", "dedicated_hosts-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "family", &obj.Family) if err != nil { + err = core.SDKErrorf(err, "", "family-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "supported_instance_profiles", &obj.SupportedInstanceProfiles, UnmarshalInstanceProfileReference) if err != nil { + err = core.SDKErrorf(err, "", "supported_instance_profiles-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -37115,22 +41377,27 @@ func UnmarshalDedicatedHostGroupCollection(m map[string]json.RawMessage, result obj := new(DedicatedHostGroupCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalDedicatedHostGroupCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "groups", &obj.Groups, UnmarshalDedicatedHostGroup) if err != nil { + err = core.SDKErrorf(err, "", "groups-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalDedicatedHostGroupCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -37143,8 +41410,11 @@ func (resp *DedicatedHostGroupCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -37160,6 +41430,7 @@ func UnmarshalDedicatedHostGroupCollectionFirst(m map[string]json.RawMessage, re obj := new(DedicatedHostGroupCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -37177,6 +41448,7 @@ func UnmarshalDedicatedHostGroupCollectionNext(m map[string]json.RawMessage, res obj := new(DedicatedHostGroupCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -37212,14 +41484,17 @@ func UnmarshalDedicatedHostGroupIdentity(m map[string]json.RawMessage, result in obj := new(DedicatedHostGroupIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -37237,6 +41512,7 @@ func UnmarshalDedicatedHostGroupPatch(m map[string]json.RawMessage, result inter obj := new(DedicatedHostGroupPatch) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -37250,6 +41526,9 @@ func (dedicatedHostGroupPatch *DedicatedHostGroupPatch) AsPatch() (_patch map[st if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -37268,10 +41547,12 @@ func UnmarshalDedicatedHostGroupPrototypeDedicatedHostByZoneContext(m map[string obj := new(DedicatedHostGroupPrototypeDedicatedHostByZoneContext) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -37311,26 +41592,32 @@ func UnmarshalDedicatedHostGroupReference(m map[string]json.RawMessage, result i obj := new(DedicatedHostGroupReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalDedicatedHostGroupReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -37349,6 +41636,7 @@ func UnmarshalDedicatedHostGroupReferenceDeleted(m map[string]json.RawMessage, r obj := new(DedicatedHostGroupReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -37369,10 +41657,12 @@ func UnmarshalDedicatedHostNuma(m map[string]json.RawMessage, result interface{} obj := new(DedicatedHostNuma) err = core.UnmarshalPrimitive(m, "count", &obj.Count) if err != nil { + err = core.SDKErrorf(err, "", "count-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "nodes", &obj.Nodes, UnmarshalDedicatedHostNumaNode) if err != nil { + err = core.SDKErrorf(err, "", "nodes-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -37393,10 +41683,12 @@ func UnmarshalDedicatedHostNumaNode(m map[string]json.RawMessage, result interfa obj := new(DedicatedHostNumaNode) err = core.UnmarshalPrimitive(m, "available_vcpu", &obj.AvailableVcpu) if err != nil { + err = core.SDKErrorf(err, "", "available_vcpu-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "vcpu", &obj.Vcpu) if err != nil { + err = core.SDKErrorf(err, "", "vcpu-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -37417,10 +41709,12 @@ func UnmarshalDedicatedHostPatch(m map[string]json.RawMessage, result interface{ obj := new(DedicatedHostPatch) err = core.UnmarshalPrimitive(m, "instance_placement_enabled", &obj.InstancePlacementEnabled) if err != nil { + err = core.SDKErrorf(err, "", "instance_placement_enabled-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -37434,6 +41728,9 @@ func (dedicatedHostPatch *DedicatedHostPatch) AsPatch() (_patch map[string]inter if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -37517,50 +41814,62 @@ func UnmarshalDedicatedHostProfile(m map[string]json.RawMessage, result interfac obj := new(DedicatedHostProfile) err = core.UnmarshalPrimitive(m, "class", &obj.Class) if err != nil { + err = core.SDKErrorf(err, "", "class-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "disks", &obj.Disks, UnmarshalDedicatedHostProfileDisk) if err != nil { + err = core.SDKErrorf(err, "", "disks-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "family", &obj.Family) if err != nil { + err = core.SDKErrorf(err, "", "family-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "memory", &obj.Memory, UnmarshalDedicatedHostProfileMemory) if err != nil { + err = core.SDKErrorf(err, "", "memory-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "socket_count", &obj.SocketCount, UnmarshalDedicatedHostProfileSocket) if err != nil { + err = core.SDKErrorf(err, "", "socket_count-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "supported_instance_profiles", &obj.SupportedInstanceProfiles, UnmarshalInstanceProfileReference) if err != nil { + err = core.SDKErrorf(err, "", "supported_instance_profiles-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vcpu_architecture", &obj.VcpuArchitecture, UnmarshalDedicatedHostProfileVcpuArchitecture) if err != nil { + err = core.SDKErrorf(err, "", "vcpu_architecture-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vcpu_count", &obj.VcpuCount, UnmarshalDedicatedHostProfileVcpu) if err != nil { + err = core.SDKErrorf(err, "", "vcpu_count-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vcpu_manufacturer", &obj.VcpuManufacturer, UnmarshalDedicatedHostProfileVcpuManufacturer) if err != nil { + err = core.SDKErrorf(err, "", "vcpu_manufacturer-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -37591,22 +41900,27 @@ func UnmarshalDedicatedHostProfileCollection(m map[string]json.RawMessage, resul obj := new(DedicatedHostProfileCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalDedicatedHostProfileCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalDedicatedHostProfileCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profiles", &obj.Profiles, UnmarshalDedicatedHostProfile) if err != nil { + err = core.SDKErrorf(err, "", "profiles-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -37619,8 +41933,11 @@ func (resp *DedicatedHostProfileCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -37636,6 +41953,7 @@ func UnmarshalDedicatedHostProfileCollectionFirst(m map[string]json.RawMessage, obj := new(DedicatedHostProfileCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -37653,6 +41971,7 @@ func UnmarshalDedicatedHostProfileCollectionNext(m map[string]json.RawMessage, r obj := new(DedicatedHostProfileCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -37677,18 +41996,22 @@ func UnmarshalDedicatedHostProfileDisk(m map[string]json.RawMessage, result inte obj := new(DedicatedHostProfileDisk) err = core.UnmarshalModel(m, "interface_type", &obj.InterfaceType, UnmarshalDedicatedHostProfileDiskInterface) if err != nil { + err = core.SDKErrorf(err, "", "interface_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "quantity", &obj.Quantity, UnmarshalDedicatedHostProfileDiskQuantity) if err != nil { + err = core.SDKErrorf(err, "", "quantity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "size", &obj.Size, UnmarshalDedicatedHostProfileDiskSize) if err != nil { + err = core.SDKErrorf(err, "", "size-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "supported_instance_interface_types", &obj.SupportedInstanceInterfaceTypes, UnmarshalDedicatedHostProfileDiskSupportedInterfaces) if err != nil { + err = core.SDKErrorf(err, "", "supported_instance_interface_types-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -37727,10 +42050,12 @@ func UnmarshalDedicatedHostProfileDiskInterface(m map[string]json.RawMessage, re obj := new(DedicatedHostProfileDiskInterface) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -37757,10 +42082,12 @@ func UnmarshalDedicatedHostProfileDiskQuantity(m map[string]json.RawMessage, res obj := new(DedicatedHostProfileDiskQuantity) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -37787,10 +42114,12 @@ func UnmarshalDedicatedHostProfileDiskSize(m map[string]json.RawMessage, result obj := new(DedicatedHostProfileDiskSize) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -37827,10 +42156,12 @@ func UnmarshalDedicatedHostProfileDiskSupportedInterfaces(m map[string]json.RawM obj := new(DedicatedHostProfileDiskSupportedInterfaces) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -37862,10 +42193,12 @@ func UnmarshalDedicatedHostProfileIdentity(m map[string]json.RawMessage, result obj := new(DedicatedHostProfileIdentity) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -37920,30 +42253,37 @@ func UnmarshalDedicatedHostProfileMemory(m map[string]json.RawMessage, result in obj := new(DedicatedHostProfileMemory) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -37964,10 +42304,12 @@ func UnmarshalDedicatedHostProfileReference(m map[string]json.RawMessage, result obj := new(DedicatedHostProfileReference) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -38022,30 +42364,37 @@ func UnmarshalDedicatedHostProfileSocket(m map[string]json.RawMessage, result in obj := new(DedicatedHostProfileSocket) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -38100,30 +42449,37 @@ func UnmarshalDedicatedHostProfileVcpu(m map[string]json.RawMessage, result inte obj := new(DedicatedHostProfileVcpu) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -38150,10 +42506,12 @@ func UnmarshalDedicatedHostProfileVcpuArchitecture(m map[string]json.RawMessage, obj := new(DedicatedHostProfileVcpuArchitecture) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -38180,10 +42538,12 @@ func UnmarshalDedicatedHostProfileVcpuManufacturer(m map[string]json.RawMessage, obj := new(DedicatedHostProfileVcpuManufacturer) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -38230,26 +42590,32 @@ func UnmarshalDedicatedHostPrototype(m map[string]json.RawMessage, result interf obj := new(DedicatedHostPrototype) err = core.UnmarshalPrimitive(m, "instance_placement_enabled", &obj.InstancePlacementEnabled) if err != nil { + err = core.SDKErrorf(err, "", "instance_placement_enabled-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalDedicatedHostProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalDedicatedHostGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -38289,26 +42655,32 @@ func UnmarshalDedicatedHostReference(m map[string]json.RawMessage, result interf obj := new(DedicatedHostReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalDedicatedHostReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -38327,6 +42699,7 @@ func UnmarshalDedicatedHostReferenceDeleted(m map[string]json.RawMessage, result obj := new(DedicatedHostReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -38371,38 +42744,47 @@ func UnmarshalDefaultNetworkACL(m map[string]json.RawMessage, result interface{} obj := new(DefaultNetworkACL) err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "rules", &obj.Rules, UnmarshalNetworkACLRuleItem) if err != nil { + err = core.SDKErrorf(err, "", "rules-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnets", &obj.Subnets, UnmarshalSubnetReference) if err != nil { + err = core.SDKErrorf(err, "", "subnets-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -38413,8 +42795,8 @@ func UnmarshalDefaultNetworkACL(m map[string]json.RawMessage, result interface{} type DefaultRoutingTable struct { // The filters specifying the resources that may create routes in this routing table. // - // At present, only the `resource_type` filter is permitted, and only the `vpn_server` value is supported, but filter - // support is expected to expand in the future. + // At present, only the `resource_type` filter is permitted, and only the values + // `vpn_gateway` and `vpn_server` are supported, but filter support is expected to expand in the future. AcceptRoutesFrom []ResourceFilter `json:"accept_routes_from" validate:"required"` // The ingress sources to advertise routes to. Routes in the table with `advertise` enabled will be advertised to these @@ -38525,62 +42907,77 @@ func UnmarshalDefaultRoutingTable(m map[string]json.RawMessage, result interface obj := new(DefaultRoutingTable) err = core.UnmarshalModel(m, "accept_routes_from", &obj.AcceptRoutesFrom, UnmarshalResourceFilter) if err != nil { + err = core.SDKErrorf(err, "", "accept_routes_from-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "advertise_routes_to", &obj.AdvertiseRoutesTo) if err != nil { + err = core.SDKErrorf(err, "", "advertise_routes_to-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "is_default", &obj.IsDefault) if err != nil { + err = core.SDKErrorf(err, "", "is_default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "route_direct_link_ingress", &obj.RouteDirectLinkIngress) if err != nil { + err = core.SDKErrorf(err, "", "route_direct_link_ingress-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "route_internet_ingress", &obj.RouteInternetIngress) if err != nil { + err = core.SDKErrorf(err, "", "route_internet_ingress-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "route_transit_gateway_ingress", &obj.RouteTransitGatewayIngress) if err != nil { + err = core.SDKErrorf(err, "", "route_transit_gateway_ingress-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "route_vpc_zone_ingress", &obj.RouteVPCZoneIngress) if err != nil { + err = core.SDKErrorf(err, "", "route_vpc_zone_ingress-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "routes", &obj.Routes, UnmarshalRouteReference) if err != nil { + err = core.SDKErrorf(err, "", "routes-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnets", &obj.Subnets, UnmarshalSubnetReference) if err != nil { + err = core.SDKErrorf(err, "", "subnets-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -38625,38 +43022,47 @@ func UnmarshalDefaultSecurityGroup(m map[string]json.RawMessage, result interfac obj := new(DefaultSecurityGroup) err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "rules", &obj.Rules, UnmarshalSecurityGroupRule) if err != nil { + err = core.SDKErrorf(err, "", "rules-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "targets", &obj.Targets, UnmarshalSecurityGroupTargetReference) if err != nil { + err = core.SDKErrorf(err, "", "targets-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -40976,6 +45382,7 @@ func UnmarshalEncryptionKeyIdentity(m map[string]json.RawMessage, result interfa obj := new(EncryptionKeyIdentity) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -40995,6 +45402,7 @@ func UnmarshalEncryptionKeyReference(m map[string]json.RawMessage, result interf obj := new(EncryptionKeyReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -41101,70 +45509,87 @@ func UnmarshalEndpointGateway(m map[string]json.RawMessage, result interface{}) obj := new(EndpointGateway) err = core.UnmarshalPrimitive(m, "allow_dns_resolution_binding", &obj.AllowDnsResolutionBinding) if err != nil { + err = core.SDKErrorf(err, "", "allow_dns_resolution_binding-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "health_state", &obj.HealthState) if err != nil { + err = core.SDKErrorf(err, "", "health_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "ips", &obj.Ips, UnmarshalReservedIPReference) if err != nil { + err = core.SDKErrorf(err, "", "ips-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "lifecycle_reasons", &obj.LifecycleReasons, UnmarshalEndpointGatewayLifecycleReason) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "security_groups-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "service_endpoint", &obj.ServiceEndpoint) if err != nil { + err = core.SDKErrorf(err, "", "service_endpoint-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "service_endpoints", &obj.ServiceEndpoints) if err != nil { + err = core.SDKErrorf(err, "", "service_endpoints-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalEndpointGatewayTarget) if err != nil { + err = core.SDKErrorf(err, "", "target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -41195,22 +45620,27 @@ func UnmarshalEndpointGatewayCollection(m map[string]json.RawMessage, result int obj := new(EndpointGatewayCollection) err = core.UnmarshalModel(m, "endpoint_gateways", &obj.EndpointGateways, UnmarshalEndpointGateway) if err != nil { + err = core.SDKErrorf(err, "", "endpoint_gateways-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalEndpointGatewayCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalEndpointGatewayCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -41223,8 +45653,11 @@ func (resp *EndpointGatewayCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -41240,6 +45673,7 @@ func UnmarshalEndpointGatewayCollectionFirst(m map[string]json.RawMessage, resul obj := new(EndpointGatewayCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -41257,6 +45691,7 @@ func UnmarshalEndpointGatewayCollectionNext(m map[string]json.RawMessage, result obj := new(EndpointGatewayCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -41267,6 +45702,9 @@ func UnmarshalEndpointGatewayCollectionNext(m map[string]json.RawMessage, result type EndpointGatewayLifecycleReason struct { // A reason code for this lifecycle state: // - `dns_resolution_binding_pending`: the DNS resolution binding is being set up + // - `internal_error`: internal error (contact IBM support) + // - `resource_suspended_by_provider`: The resource has been suspended (contact IBM + // support) // // The enumerated values for this property may // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. @@ -41281,12 +45719,16 @@ type EndpointGatewayLifecycleReason struct { // Constants associated with the EndpointGatewayLifecycleReason.Code property. // A reason code for this lifecycle state: -// - `dns_resolution_binding_pending`: the DNS resolution binding is being set up +// - `dns_resolution_binding_pending`: the DNS resolution binding is being set up +// - `internal_error`: internal error (contact IBM support) +// - `resource_suspended_by_provider`: The resource has been suspended (contact IBM +// support) // // The enumerated values for this property may // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. const ( EndpointGatewayLifecycleReasonCodeDnsResolutionBindingPendingConst = "dns_resolution_binding_pending" + EndpointGatewayLifecycleReasonCodeInternalErrorConst = "internal_error" EndpointGatewayLifecycleReasonCodeResourceSuspendedByProviderConst = "resource_suspended_by_provider" ) @@ -41295,14 +45737,17 @@ func UnmarshalEndpointGatewayLifecycleReason(m map[string]json.RawMessage, resul obj := new(EndpointGatewayLifecycleReason) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "message", &obj.Message) if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -41327,10 +45772,12 @@ func UnmarshalEndpointGatewayPatch(m map[string]json.RawMessage, result interfac obj := new(EndpointGatewayPatch) err = core.UnmarshalPrimitive(m, "allow_dns_resolution_binding", &obj.AllowDnsResolutionBinding) if err != nil { + err = core.SDKErrorf(err, "", "allow_dns_resolution_binding-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -41344,6 +45791,9 @@ func (endpointGatewayPatch *EndpointGatewayPatch) AsPatch() (_patch map[string]i if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -41359,6 +45809,7 @@ func UnmarshalEndpointGatewayReferenceDeleted(m map[string]json.RawMessage, resu obj := new(EndpointGatewayReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -41398,26 +45849,32 @@ func UnmarshalEndpointGatewayReferenceRemote(m map[string]json.RawMessage, resul obj := new(EndpointGatewayReferenceRemote) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalEndpointGatewayRemote) if err != nil { + err = core.SDKErrorf(err, "", "remote-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -41441,10 +45898,12 @@ func UnmarshalEndpointGatewayRemote(m map[string]json.RawMessage, result interfa obj := new(EndpointGatewayRemote) err = core.UnmarshalModel(m, "account", &obj.Account, UnmarshalAccountReference) if err != nil { + err = core.SDKErrorf(err, "", "account-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "region", &obj.Region, UnmarshalRegionReference) if err != nil { + err = core.SDKErrorf(err, "", "region-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -41495,26 +45954,32 @@ func UnmarshalEndpointGatewayReservedIP(m map[string]json.RawMessage, result int obj := new(EndpointGatewayReservedIP) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { + err = core.SDKErrorf(err, "", "auto_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -41556,14 +46021,17 @@ func UnmarshalEndpointGatewayTarget(m map[string]json.RawMessage, result interfa obj := new(EndpointGatewayTarget) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -41607,19 +46075,27 @@ func UnmarshalEndpointGatewayTargetPrototype(m map[string]json.RawMessage, resul var discValue string err = core.UnmarshalPrimitive(m, "resource_type", &discValue) if err != nil { - err = fmt.Errorf("error unmarshalling discriminator property 'resource_type': %s", err.Error()) + errMsg := fmt.Sprintf("error unmarshalling discriminator property 'resource_type': %s", err.Error()) + err = core.SDKErrorf(err, errMsg, "discriminator-unmarshal-error", common.GetComponentInfo()) return } if discValue == "" { - err = fmt.Errorf("required discriminator property 'resource_type' not found in JSON object") + err = core.SDKErrorf(err, "required discriminator property 'resource_type' not found in JSON object", "missing-discriminator", common.GetComponentInfo()) return } if discValue == "provider_cloud_service" { err = core.UnmarshalModel(m, "", result, UnmarshalEndpointGatewayTargetPrototypeProviderCloudServiceIdentity) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-EndpointGatewayTargetPrototypeProviderCloudServiceIdentity-error", common.GetComponentInfo()) + } } else if discValue == "provider_infrastructure_service" { err = core.UnmarshalModel(m, "", result, UnmarshalEndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity-error", common.GetComponentInfo()) + } } else { - err = fmt.Errorf("unrecognized value for discriminator property 'resource_type': %s", discValue) + errMsg := fmt.Sprintf("unrecognized value for discriminator property 'resource_type': %s", discValue) + err = core.SDKErrorf(err, errMsg, "invalid-discriminator", common.GetComponentInfo()) } return } @@ -41736,42 +46212,52 @@ func UnmarshalFloatingIP(m map[string]json.RawMessage, result interface{}) (err obj := new(FloatingIP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalFloatingIPTarget) if err != nil { + err = core.SDKErrorf(err, "", "target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -41802,22 +46288,27 @@ func UnmarshalFloatingIPCollection(m map[string]json.RawMessage, result interfac obj := new(FloatingIPCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalFloatingIPCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "floating_ips", &obj.FloatingIps, UnmarshalFloatingIP) if err != nil { + err = core.SDKErrorf(err, "", "floating_ips-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalFloatingIPCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -41830,8 +46321,11 @@ func (resp *FloatingIPCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -41847,6 +46341,7 @@ func UnmarshalFloatingIPCollectionFirst(m map[string]json.RawMessage, result int obj := new(FloatingIPCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -41864,6 +46359,7 @@ func UnmarshalFloatingIPCollectionNext(m map[string]json.RawMessage, result inte obj := new(FloatingIPCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -41894,22 +46390,27 @@ func UnmarshalFloatingIPCollectionVirtualNetworkInterfaceContext(m map[string]js obj := new(FloatingIPCollectionVirtualNetworkInterfaceContext) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalFloatingIPCollectionVirtualNetworkInterfaceContextFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "floating_ips", &obj.FloatingIps, UnmarshalFloatingIPReference) if err != nil { + err = core.SDKErrorf(err, "", "floating_ips-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalFloatingIPCollectionVirtualNetworkInterfaceContextNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -41922,8 +46423,11 @@ func (resp *FloatingIPCollectionVirtualNetworkInterfaceContext) GetNextStart() ( return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -41939,6 +46443,7 @@ func UnmarshalFloatingIPCollectionVirtualNetworkInterfaceContextFirst(m map[stri obj := new(FloatingIPCollectionVirtualNetworkInterfaceContextFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -41956,6 +46461,7 @@ func UnmarshalFloatingIPCollectionVirtualNetworkInterfaceContextNext(m map[strin obj := new(FloatingIPCollectionVirtualNetworkInterfaceContextNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -41986,10 +46492,12 @@ func UnmarshalFloatingIPPatch(m map[string]json.RawMessage, result interface{}) obj := new(FloatingIPPatch) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalFloatingIPTargetPatch) if err != nil { + err = core.SDKErrorf(err, "", "target-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -42003,6 +46511,9 @@ func (floatingIPPatch *FloatingIPPatch) AsPatch() (_patch map[string]interface{} if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -42046,18 +46557,22 @@ func UnmarshalFloatingIPPrototype(m map[string]json.RawMessage, result interface obj := new(FloatingIPPrototype) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalFloatingIPTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "target-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -42091,26 +46606,32 @@ func UnmarshalFloatingIPReference(m map[string]json.RawMessage, result interface obj := new(FloatingIPReference) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalFloatingIPReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -42129,6 +46650,7 @@ func UnmarshalFloatingIPReferenceDeleted(m map[string]json.RawMessage, result in obj := new(FloatingIPReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -42195,34 +46717,42 @@ func UnmarshalFloatingIPTarget(m map[string]json.RawMessage, result interface{}) obj := new(FloatingIPTarget) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalNetworkInterfaceReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -42276,14 +46806,17 @@ func UnmarshalFloatingIPTargetPatch(m map[string]json.RawMessage, result interfa obj := new(FloatingIPTargetPatch) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -42334,14 +46867,17 @@ func UnmarshalFloatingIPTargetPrototype(m map[string]json.RawMessage, result int obj := new(FloatingIPTargetPrototype) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -42359,6 +46895,7 @@ func UnmarshalFloatingIPUnpaginatedCollection(m map[string]json.RawMessage, resu obj := new(FloatingIPUnpaginatedCollection) err = core.UnmarshalModel(m, "floating_ips", &obj.FloatingIps, UnmarshalFloatingIP) if err != nil { + err = core.SDKErrorf(err, "", "floating_ips-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -42443,50 +46980,62 @@ func UnmarshalFlowLogCollector(m map[string]json.RawMessage, result interface{}) obj := new(FlowLogCollector) err = core.UnmarshalPrimitive(m, "active", &obj.Active) if err != nil { + err = core.SDKErrorf(err, "", "active-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { + err = core.SDKErrorf(err, "", "auto_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "storage_bucket", &obj.StorageBucket, UnmarshalLegacyCloudObjectStorageBucketReference) if err != nil { + err = core.SDKErrorf(err, "", "storage_bucket-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalFlowLogCollectorTarget) if err != nil { + err = core.SDKErrorf(err, "", "target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -42517,22 +47066,27 @@ func UnmarshalFlowLogCollectorCollection(m map[string]json.RawMessage, result in obj := new(FlowLogCollectorCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalFlowLogCollectorCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "flow_log_collectors", &obj.FlowLogCollectors, UnmarshalFlowLogCollector) if err != nil { + err = core.SDKErrorf(err, "", "flow_log_collectors-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalFlowLogCollectorCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -42545,8 +47099,11 @@ func (resp *FlowLogCollectorCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -42562,6 +47119,7 @@ func UnmarshalFlowLogCollectorCollectionFirst(m map[string]json.RawMessage, resu obj := new(FlowLogCollectorCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -42579,6 +47137,7 @@ func UnmarshalFlowLogCollectorCollectionNext(m map[string]json.RawMessage, resul obj := new(FlowLogCollectorCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -42600,10 +47159,12 @@ func UnmarshalFlowLogCollectorPatch(m map[string]json.RawMessage, result interfa obj := new(FlowLogCollectorPatch) err = core.UnmarshalPrimitive(m, "active", &obj.Active) if err != nil { + err = core.SDKErrorf(err, "", "active-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -42617,6 +47178,9 @@ func (flowLogCollectorPatch *FlowLogCollectorPatch) AsPatch() (_patch map[string if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -42702,34 +47266,42 @@ func UnmarshalFlowLogCollectorTarget(m map[string]json.RawMessage, result interf obj := new(FlowLogCollectorTarget) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalNetworkInterfaceReferenceTargetContextDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -42784,14 +47356,17 @@ func UnmarshalFlowLogCollectorTargetPrototype(m map[string]json.RawMessage, resu obj := new(FlowLogCollectorTargetPrototype) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -42810,6 +47385,7 @@ func UnmarshalGenericResourceReferenceDeleted(m map[string]json.RawMessage, resu obj := new(GenericResourceReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -45954,54 +50530,67 @@ func UnmarshalIkePolicy(m map[string]json.RawMessage, result interface{}) (err e obj := new(IkePolicy) err = core.UnmarshalPrimitive(m, "authentication_algorithm", &obj.AuthenticationAlgorithm) if err != nil { + err = core.SDKErrorf(err, "", "authentication_algorithm-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "connections", &obj.Connections, UnmarshalVPNGatewayConnectionReference) if err != nil { + err = core.SDKErrorf(err, "", "connections-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "dh_group", &obj.DhGroup) if err != nil { + err = core.SDKErrorf(err, "", "dh_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "encryption_algorithm", &obj.EncryptionAlgorithm) if err != nil { + err = core.SDKErrorf(err, "", "encryption_algorithm-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "ike_version", &obj.IkeVersion) if err != nil { + err = core.SDKErrorf(err, "", "ike_version-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "key_lifetime", &obj.KeyLifetime) if err != nil { + err = core.SDKErrorf(err, "", "key_lifetime-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "negotiation_mode", &obj.NegotiationMode) if err != nil { + err = core.SDKErrorf(err, "", "negotiation_mode-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -46032,22 +50621,27 @@ func UnmarshalIkePolicyCollection(m map[string]json.RawMessage, result interface obj := new(IkePolicyCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalIkePolicyCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "ike_policies", &obj.IkePolicies, UnmarshalIkePolicy) if err != nil { + err = core.SDKErrorf(err, "", "ike_policies-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalIkePolicyCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -46060,8 +50654,11 @@ func (resp *IkePolicyCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -46108,26 +50705,32 @@ func UnmarshalIkePolicyPatch(m map[string]json.RawMessage, result interface{}) ( obj := new(IkePolicyPatch) err = core.UnmarshalPrimitive(m, "authentication_algorithm", &obj.AuthenticationAlgorithm) if err != nil { + err = core.SDKErrorf(err, "", "authentication_algorithm-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "dh_group", &obj.DhGroup) if err != nil { + err = core.SDKErrorf(err, "", "dh_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "encryption_algorithm", &obj.EncryptionAlgorithm) if err != nil { + err = core.SDKErrorf(err, "", "encryption_algorithm-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "ike_version", &obj.IkeVersion) if err != nil { + err = core.SDKErrorf(err, "", "ike_version-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "key_lifetime", &obj.KeyLifetime) if err != nil { + err = core.SDKErrorf(err, "", "key_lifetime-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -46141,6 +50744,9 @@ func (ikePolicyPatch *IkePolicyPatch) AsPatch() (_patch map[string]interface{}, if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -46174,22 +50780,27 @@ func UnmarshalIkePolicyReference(m map[string]json.RawMessage, result interface{ obj := new(IkePolicyReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalIkePolicyReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -46211,6 +50822,9 @@ func (*VpcV1) NewIP(address string) (_model *IP, err error) { Address: core.StringPtr(address), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -46219,6 +50833,7 @@ func UnmarshalIP(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(IP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -46359,54 +50974,67 @@ func UnmarshalIPsecPolicy(m map[string]json.RawMessage, result interface{}) (err obj := new(IPsecPolicy) err = core.UnmarshalPrimitive(m, "authentication_algorithm", &obj.AuthenticationAlgorithm) if err != nil { + err = core.SDKErrorf(err, "", "authentication_algorithm-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "connections", &obj.Connections, UnmarshalVPNGatewayConnectionReference) if err != nil { + err = core.SDKErrorf(err, "", "connections-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "encapsulation_mode", &obj.EncapsulationMode) if err != nil { + err = core.SDKErrorf(err, "", "encapsulation_mode-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "encryption_algorithm", &obj.EncryptionAlgorithm) if err != nil { + err = core.SDKErrorf(err, "", "encryption_algorithm-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "key_lifetime", &obj.KeyLifetime) if err != nil { + err = core.SDKErrorf(err, "", "key_lifetime-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "pfs", &obj.Pfs) if err != nil { + err = core.SDKErrorf(err, "", "pfs-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "transform_protocol", &obj.TransformProtocol) if err != nil { + err = core.SDKErrorf(err, "", "transform_protocol-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -46437,22 +51065,27 @@ func UnmarshalIPsecPolicyCollection(m map[string]json.RawMessage, result interfa obj := new(IPsecPolicyCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalIPsecPolicyCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "ipsec_policies", &obj.IpsecPolicies, UnmarshalIPsecPolicy) if err != nil { + err = core.SDKErrorf(err, "", "ipsec_policies-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalIPsecPolicyCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -46465,8 +51098,11 @@ func (resp *IPsecPolicyCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -46482,6 +51118,7 @@ func UnmarshalIPsecPolicyCollectionFirst(m map[string]json.RawMessage, result in obj := new(IPsecPolicyCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -46499,6 +51136,7 @@ func UnmarshalIPsecPolicyCollectionNext(m map[string]json.RawMessage, result int obj := new(IPsecPolicyCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -46580,22 +51218,27 @@ func UnmarshalIPsecPolicyPatch(m map[string]json.RawMessage, result interface{}) obj := new(IPsecPolicyPatch) err = core.UnmarshalPrimitive(m, "authentication_algorithm", &obj.AuthenticationAlgorithm) if err != nil { + err = core.SDKErrorf(err, "", "authentication_algorithm-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "encryption_algorithm", &obj.EncryptionAlgorithm) if err != nil { + err = core.SDKErrorf(err, "", "encryption_algorithm-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "key_lifetime", &obj.KeyLifetime) if err != nil { + err = core.SDKErrorf(err, "", "key_lifetime-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "pfs", &obj.Pfs) if err != nil { + err = core.SDKErrorf(err, "", "pfs-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -46609,6 +51252,9 @@ func (iPsecPolicyPatch *IPsecPolicyPatch) AsPatch() (_patch map[string]interface if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -46642,22 +51288,27 @@ func UnmarshalIPsecPolicyReference(m map[string]json.RawMessage, result interfac obj := new(IPsecPolicyReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalIPsecPolicyReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -46676,6 +51327,7 @@ func UnmarshalIPsecPolicyReferenceDeleted(m map[string]json.RawMessage, result i obj := new(IPsecPolicyReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -46693,6 +51345,7 @@ func UnmarshalIkePolicyCollectionFirst(m map[string]json.RawMessage, result inte obj := new(IkePolicyCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -46710,6 +51363,7 @@ func UnmarshalIkePolicyCollectionNext(m map[string]json.RawMessage, result inter obj := new(IkePolicyCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -46728,6 +51382,7 @@ func UnmarshalIkePolicyReferenceDeleted(m map[string]json.RawMessage, result int obj := new(IkePolicyReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -46866,78 +51521,97 @@ func UnmarshalImage(m map[string]json.RawMessage, result interface{}) (err error obj := new(Image) err = core.UnmarshalModel(m, "catalog_offering", &obj.CatalogOffering, UnmarshalImageCatalogOffering) if err != nil { + err = core.SDKErrorf(err, "", "catalog_offering-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "deprecation_at", &obj.DeprecationAt) if err != nil { + err = core.SDKErrorf(err, "", "deprecation_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "encryption", &obj.Encryption) if err != nil { + err = core.SDKErrorf(err, "", "encryption-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyReference) if err != nil { + err = core.SDKErrorf(err, "", "encryption_key-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "file", &obj.File, UnmarshalImageFile) if err != nil { + err = core.SDKErrorf(err, "", "file-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "minimum_provisioned_size", &obj.MinimumProvisionedSize) if err != nil { + err = core.SDKErrorf(err, "", "minimum_provisioned_size-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "obsolescence_at", &obj.ObsolescenceAt) if err != nil { + err = core.SDKErrorf(err, "", "obsolescence_at-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "operating_system", &obj.OperatingSystem, UnmarshalOperatingSystem) if err != nil { + err = core.SDKErrorf(err, "", "operating_system-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "source_volume", &obj.SourceVolume, UnmarshalVolumeReference) if err != nil { + err = core.SDKErrorf(err, "", "source_volume-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "status_reasons", &obj.StatusReasons, UnmarshalImageStatusReason) if err != nil { + err = core.SDKErrorf(err, "", "status_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "visibility", &obj.Visibility) if err != nil { + err = core.SDKErrorf(err, "", "visibility-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -46964,10 +51638,12 @@ func UnmarshalImageCatalogOffering(m map[string]json.RawMessage, result interfac obj := new(ImageCatalogOffering) err = core.UnmarshalPrimitive(m, "managed", &obj.Managed) if err != nil { + err = core.SDKErrorf(err, "", "managed-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "version", &obj.Version, UnmarshalCatalogOfferingVersionReference) if err != nil { + err = core.SDKErrorf(err, "", "version-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -46998,22 +51674,27 @@ func UnmarshalImageCollection(m map[string]json.RawMessage, result interface{}) obj := new(ImageCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalImageCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "images", &obj.Images, UnmarshalImage) if err != nil { + err = core.SDKErrorf(err, "", "images-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalImageCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -47026,8 +51707,11 @@ func (resp *ImageCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -47043,6 +51727,7 @@ func UnmarshalImageCollectionFirst(m map[string]json.RawMessage, result interfac obj := new(ImageCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -47060,6 +51745,7 @@ func UnmarshalImageCollectionNext(m map[string]json.RawMessage, result interface obj := new(ImageCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -47168,58 +51854,72 @@ func UnmarshalImageExportJob(m map[string]json.RawMessage, result interface{}) ( obj := new(ImageExportJob) err = core.UnmarshalPrimitive(m, "completed_at", &obj.CompletedAt) if err != nil { + err = core.SDKErrorf(err, "", "completed_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "encrypted_data_key", &obj.EncryptedDataKey) if err != nil { + err = core.SDKErrorf(err, "", "encrypted_data_key-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "format", &obj.Format) if err != nil { + err = core.SDKErrorf(err, "", "format-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "started_at", &obj.StartedAt) if err != nil { + err = core.SDKErrorf(err, "", "started_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "status_reasons", &obj.StatusReasons, UnmarshalImageExportJobStatusReason) if err != nil { + err = core.SDKErrorf(err, "", "status_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "storage_bucket", &obj.StorageBucket, UnmarshalCloudObjectStorageBucketReference) if err != nil { + err = core.SDKErrorf(err, "", "storage_bucket-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "storage_href", &obj.StorageHref) if err != nil { + err = core.SDKErrorf(err, "", "storage_href-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "storage_object", &obj.StorageObject, UnmarshalCloudObjectStorageObjectReference) if err != nil { + err = core.SDKErrorf(err, "", "storage_object-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -47239,6 +51939,7 @@ func UnmarshalImageExportJobPatch(m map[string]json.RawMessage, result interface obj := new(ImageExportJobPatch) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -47252,6 +51953,9 @@ func (imageExportJobPatch *ImageExportJobPatch) AsPatch() (_patch map[string]int if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -47285,14 +51989,17 @@ func UnmarshalImageExportJobStatusReason(m map[string]json.RawMessage, result in obj := new(ImageExportJobStatusReason) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "message", &obj.Message) if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -47310,6 +52017,7 @@ func UnmarshalImageExportJobUnpaginatedCollection(m map[string]json.RawMessage, obj := new(ImageExportJobUnpaginatedCollection) err = core.UnmarshalModel(m, "export_jobs", &obj.ExportJobs, UnmarshalImageExportJob) if err != nil { + err = core.SDKErrorf(err, "", "export_jobs-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -47336,10 +52044,12 @@ func UnmarshalImageFile(m map[string]json.RawMessage, result interface{}) (err e obj := new(ImageFile) err = core.UnmarshalModel(m, "checksums", &obj.Checksums, UnmarshalImageFileChecksums) if err != nil { + err = core.SDKErrorf(err, "", "checksums-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "size", &obj.Size) if err != nil { + err = core.SDKErrorf(err, "", "size-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -47357,6 +52067,7 @@ func UnmarshalImageFileChecksums(m map[string]json.RawMessage, result interface{ obj := new(ImageFileChecksums) err = core.UnmarshalPrimitive(m, "sha256", &obj.Sha256) if err != nil { + err = core.SDKErrorf(err, "", "sha256-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -47378,6 +52089,9 @@ func (*VpcV1) NewImageFilePrototype(href string) (_model *ImageFilePrototype, er Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -47386,6 +52100,7 @@ func UnmarshalImageFilePrototype(m map[string]json.RawMessage, result interface{ obj := new(ImageFilePrototype) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -47421,14 +52136,17 @@ func UnmarshalImageIdentity(m map[string]json.RawMessage, result interface{}) (e obj := new(ImageIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -47480,14 +52198,17 @@ func UnmarshalImagePatch(m map[string]json.RawMessage, result interface{}) (err obj := new(ImagePatch) err = core.UnmarshalPrimitive(m, "deprecation_at", &obj.DeprecationAt) if err != nil { + err = core.SDKErrorf(err, "", "deprecation_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "obsolescence_at", &obj.ObsolescenceAt) if err != nil { + err = core.SDKErrorf(err, "", "obsolescence_at-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -47501,6 +52222,9 @@ func (imagePatch *ImagePatch) AsPatch() (_patch map[string]interface{}, err erro if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -47588,38 +52312,47 @@ func UnmarshalImagePrototype(m map[string]json.RawMessage, result interface{}) ( obj := new(ImagePrototype) err = core.UnmarshalPrimitive(m, "deprecation_at", &obj.DeprecationAt) if err != nil { + err = core.SDKErrorf(err, "", "deprecation_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "obsolescence_at", &obj.ObsolescenceAt) if err != nil { + err = core.SDKErrorf(err, "", "obsolescence_at-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "encrypted_data_key", &obj.EncryptedDataKey) if err != nil { + err = core.SDKErrorf(err, "", "encrypted_data_key-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "encryption_key-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "file", &obj.File, UnmarshalImageFilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "file-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "operating_system", &obj.OperatingSystem, UnmarshalOperatingSystemIdentity) if err != nil { + err = core.SDKErrorf(err, "", "operating_system-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "source_volume", &obj.SourceVolume, UnmarshalVolumeIdentity) if err != nil { + err = core.SDKErrorf(err, "", "source_volume-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -47663,30 +52396,37 @@ func UnmarshalImageReference(m map[string]json.RawMessage, result interface{}) ( obj := new(ImageReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalImageReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalImageRemote) if err != nil { + err = core.SDKErrorf(err, "", "remote-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -47705,6 +52445,7 @@ func UnmarshalImageReferenceDeleted(m map[string]json.RawMessage, result interfa obj := new(ImageReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -47728,10 +52469,12 @@ func UnmarshalImageRemote(m map[string]json.RawMessage, result interface{}) (err obj := new(ImageRemote) err = core.UnmarshalModel(m, "account", &obj.Account, UnmarshalAccountReference) if err != nil { + err = core.SDKErrorf(err, "", "account-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "region", &obj.Region, UnmarshalRegionReference) if err != nil { + err = core.SDKErrorf(err, "", "region-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -47795,14 +52538,17 @@ func UnmarshalImageStatusReason(m map[string]json.RawMessage, result interface{} obj := new(ImageStatusReason) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "message", &obj.Message) if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -48010,158 +52756,197 @@ func UnmarshalInstance(m map[string]json.RawMessage, result interface{}) (err er obj := new(Instance) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicy) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "bandwidth", &obj.Bandwidth) if err != nil { + err = core.SDKErrorf(err, "", "bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentReferenceInstanceContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "catalog_offering", &obj.CatalogOffering, UnmarshalInstanceCatalogOffering) if err != nil { + err = core.SDKErrorf(err, "", "catalog_offering-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "dedicated_host", &obj.DedicatedHost, UnmarshalDedicatedHostReference) if err != nil { + err = core.SDKErrorf(err, "", "dedicated_host-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "disks", &obj.Disks, UnmarshalInstanceDisk) if err != nil { + err = core.SDKErrorf(err, "", "disks-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "gpu", &obj.Gpu, UnmarshalInstanceGpu) if err != nil { + err = core.SDKErrorf(err, "", "gpu-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "health_reasons", &obj.HealthReasons, UnmarshalInstanceHealthReason) if err != nil { + err = core.SDKErrorf(err, "", "health_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "health_state", &obj.HealthState) if err != nil { + err = core.SDKErrorf(err, "", "health_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageReference) if err != nil { + err = core.SDKErrorf(err, "", "image-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "lifecycle_reasons", &obj.LifecycleReasons, UnmarshalInstanceLifecycleReason) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "memory", &obj.Memory) if err != nil { + err = core.SDKErrorf(err, "", "memory-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataService) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalInstanceNetworkAttachmentReference) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfaceInstanceContextReference) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "numa_count", &obj.NumaCount) if err != nil { + err = core.SDKErrorf(err, "", "numa_count-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTarget) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalInstanceNetworkAttachmentReference) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfaceInstanceContextReference) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_interface-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileReference) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation", &obj.Reservation, UnmarshalReservationReference) if err != nil { + err = core.SDKErrorf(err, "", "reservation-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinity) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "startable", &obj.Startable) if err != nil { + err = core.SDKErrorf(err, "", "startable-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "status_reasons", &obj.StatusReasons, UnmarshalInstanceStatusReason) if err != nil { + err = core.SDKErrorf(err, "", "status_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_network_bandwidth", &obj.TotalNetworkBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_network_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vcpu", &obj.Vcpu, UnmarshalInstanceVcpu) if err != nil { + err = core.SDKErrorf(err, "", "vcpu-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentReferenceInstanceContext) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -48222,34 +53007,42 @@ func UnmarshalInstanceAction(m map[string]json.RawMessage, result interface{}) ( obj := new(InstanceAction) err = core.UnmarshalPrimitive(m, "completed_at", &obj.CompletedAt) if err != nil { + err = core.SDKErrorf(err, "", "completed_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "force", &obj.Force) if err != nil { + err = core.SDKErrorf(err, "", "force-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "started_at", &obj.StartedAt) if err != nil { + err = core.SDKErrorf(err, "", "started_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -48284,6 +53077,7 @@ func UnmarshalInstanceAvailabilityPolicy(m map[string]json.RawMessage, result in obj := new(InstanceAvailabilityPolicy) err = core.UnmarshalPrimitive(m, "host_failure", &obj.HostFailure) if err != nil { + err = core.SDKErrorf(err, "", "host_failure-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -48312,6 +53106,7 @@ func UnmarshalInstanceAvailabilityPolicyPatch(m map[string]json.RawMessage, resu obj := new(InstanceAvailabilityPolicyPatch) err = core.UnmarshalPrimitive(m, "host_failure", &obj.HostFailure) if err != nil { + err = core.SDKErrorf(err, "", "host_failure-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -48340,6 +53135,7 @@ func UnmarshalInstanceAvailabilityPolicyPrototype(m map[string]json.RawMessage, obj := new(InstanceAvailabilityPolicyPrototype) err = core.UnmarshalPrimitive(m, "host_failure", &obj.HostFailure) if err != nil { + err = core.SDKErrorf(err, "", "host_failure-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -48362,6 +53158,7 @@ func UnmarshalInstanceCatalogOffering(m map[string]json.RawMessage, result inter obj := new(InstanceCatalogOffering) err = core.UnmarshalModel(m, "version", &obj.Version, UnmarshalCatalogOfferingVersionReference) if err != nil { + err = core.SDKErrorf(err, "", "version-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -48401,10 +53198,12 @@ func UnmarshalInstanceCatalogOfferingPrototype(m map[string]json.RawMessage, res obj := new(InstanceCatalogOfferingPrototype) err = core.UnmarshalModel(m, "offering", &obj.Offering, UnmarshalCatalogOfferingIdentity) if err != nil { + err = core.SDKErrorf(err, "", "offering-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "version", &obj.Version, UnmarshalCatalogOfferingVersionIdentity) if err != nil { + err = core.SDKErrorf(err, "", "version-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -48435,22 +53234,27 @@ func UnmarshalInstanceCollection(m map[string]json.RawMessage, result interface{ obj := new(InstanceCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalInstanceCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "instances", &obj.Instances, UnmarshalInstance) if err != nil { + err = core.SDKErrorf(err, "", "instances-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalInstanceCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -48463,8 +53267,11 @@ func (resp *InstanceCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -48480,6 +53287,7 @@ func UnmarshalInstanceCollectionFirst(m map[string]json.RawMessage, result inter obj := new(InstanceCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -48497,6 +53305,7 @@ func UnmarshalInstanceCollectionNext(m map[string]json.RawMessage, result interf obj := new(InstanceCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -48537,26 +53346,32 @@ func UnmarshalInstanceConsoleAccessToken(m map[string]json.RawMessage, result in obj := new(InstanceConsoleAccessToken) err = core.UnmarshalPrimitive(m, "access_token", &obj.AccessToken) if err != nil { + err = core.SDKErrorf(err, "", "access_token-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "console_type", &obj.ConsoleType) if err != nil { + err = core.SDKErrorf(err, "", "console_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "expires_at", &obj.ExpiresAt) if err != nil { + err = core.SDKErrorf(err, "", "expires_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "force", &obj.Force) if err != nil { + err = core.SDKErrorf(err, "", "force-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -48580,6 +53395,9 @@ func (*VpcV1) NewInstanceDefaultTrustedProfilePrototype(target TrustedProfileIde Target: target, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -48588,10 +53406,12 @@ func UnmarshalInstanceDefaultTrustedProfilePrototype(m map[string]json.RawMessag obj := new(InstanceDefaultTrustedProfilePrototype) err = core.UnmarshalPrimitive(m, "auto_link", &obj.AutoLink) if err != nil { + err = core.SDKErrorf(err, "", "auto_link-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalTrustedProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "target-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -48646,30 +53466,37 @@ func UnmarshalInstanceDisk(m map[string]json.RawMessage, result interface{}) (er obj := new(InstanceDisk) err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType) if err != nil { + err = core.SDKErrorf(err, "", "interface_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "size", &obj.Size) if err != nil { + err = core.SDKErrorf(err, "", "size-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -48687,6 +53514,7 @@ func UnmarshalInstanceDiskCollection(m map[string]json.RawMessage, result interf obj := new(InstanceDiskCollection) err = core.UnmarshalModel(m, "disks", &obj.Disks, UnmarshalInstanceDisk) if err != nil { + err = core.SDKErrorf(err, "", "disks-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -48704,6 +53532,7 @@ func UnmarshalInstanceDiskPatch(m map[string]json.RawMessage, result interface{} obj := new(InstanceDiskPatch) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -48717,6 +53546,9 @@ func (instanceDiskPatch *InstanceDiskPatch) AsPatch() (_patch map[string]interfa if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -48750,22 +53582,27 @@ func UnmarshalInstanceDiskReference(m map[string]json.RawMessage, result interfa obj := new(InstanceDiskReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceDiskReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -48784,6 +53621,7 @@ func UnmarshalInstanceDiskReferenceDeleted(m map[string]json.RawMessage, result obj := new(InstanceDiskReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -48810,18 +53648,22 @@ func UnmarshalInstanceGpu(m map[string]json.RawMessage, result interface{}) (err obj := new(InstanceGpu) err = core.UnmarshalPrimitive(m, "count", &obj.Count) if err != nil { + err = core.SDKErrorf(err, "", "count-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "manufacturer", &obj.Manufacturer) if err != nil { + err = core.SDKErrorf(err, "", "manufacturer-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "memory", &obj.Memory) if err != nil { + err = core.SDKErrorf(err, "", "memory-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "model", &obj.Model) if err != nil { + err = core.SDKErrorf(err, "", "model-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -48920,70 +53762,87 @@ func UnmarshalInstanceGroup(m map[string]json.RawMessage, result interface{}) (e obj := new(InstanceGroup) err = core.UnmarshalPrimitive(m, "application_port", &obj.ApplicationPort) if err != nil { + err = core.SDKErrorf(err, "", "application_port-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "instance_template", &obj.InstanceTemplate, UnmarshalInstanceTemplateReference) if err != nil { + err = core.SDKErrorf(err, "", "instance_template-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "lifecycle_reasons", &obj.LifecycleReasons, UnmarshalInstanceGroupLifecycleReason) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "load_balancer_pool", &obj.LoadBalancerPool, UnmarshalLoadBalancerPoolReference) if err != nil { + err = core.SDKErrorf(err, "", "load_balancer_pool-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "managers", &obj.Managers, UnmarshalInstanceGroupManagerReference) if err != nil { + err = core.SDKErrorf(err, "", "managers-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "membership_count", &obj.MembershipCount) if err != nil { + err = core.SDKErrorf(err, "", "membership_count-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnets", &obj.Subnets, UnmarshalSubnetReference) if err != nil { + err = core.SDKErrorf(err, "", "subnets-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt) if err != nil { + err = core.SDKErrorf(err, "", "updated_at-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -49014,22 +53873,27 @@ func UnmarshalInstanceGroupCollection(m map[string]json.RawMessage, result inter obj := new(InstanceGroupCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalInstanceGroupCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "instance_groups", &obj.InstanceGroups, UnmarshalInstanceGroup) if err != nil { + err = core.SDKErrorf(err, "", "instance_groups-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalInstanceGroupCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -49042,8 +53906,11 @@ func (resp *InstanceGroupCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -49059,6 +53926,7 @@ func UnmarshalInstanceGroupCollectionFirst(m map[string]json.RawMessage, result obj := new(InstanceGroupCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -49076,6 +53944,7 @@ func UnmarshalInstanceGroupCollectionNext(m map[string]json.RawMessage, result i obj := new(InstanceGroupCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -49085,6 +53954,7 @@ func UnmarshalInstanceGroupCollectionNext(m map[string]json.RawMessage, result i // InstanceGroupLifecycleReason : InstanceGroupLifecycleReason struct type InstanceGroupLifecycleReason struct { // A reason code for this lifecycle state: + // - `internal_error`: internal error (contact IBM support) // - `resource_suspended_by_provider`: The resource has been suspended (contact IBM // support) // @@ -49101,12 +53971,14 @@ type InstanceGroupLifecycleReason struct { // Constants associated with the InstanceGroupLifecycleReason.Code property. // A reason code for this lifecycle state: +// - `internal_error`: internal error (contact IBM support) // - `resource_suspended_by_provider`: The resource has been suspended (contact IBM // support) // // The enumerated values for this property may // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. const ( + InstanceGroupLifecycleReasonCodeInternalErrorConst = "internal_error" InstanceGroupLifecycleReasonCodeResourceSuspendedByProviderConst = "resource_suspended_by_provider" ) @@ -49115,14 +53987,17 @@ func UnmarshalInstanceGroupLifecycleReason(m map[string]json.RawMessage, result obj := new(InstanceGroupLifecycleReason) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "message", &obj.Message) if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -49193,54 +54068,67 @@ func UnmarshalInstanceGroupManager(m map[string]json.RawMessage, result interfac obj := new(InstanceGroupManager) err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "management_enabled", &obj.ManagementEnabled) if err != nil { + err = core.SDKErrorf(err, "", "management_enabled-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt) if err != nil { + err = core.SDKErrorf(err, "", "updated_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "aggregation_window", &obj.AggregationWindow) if err != nil { + err = core.SDKErrorf(err, "", "aggregation_window-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "cooldown", &obj.Cooldown) if err != nil { + err = core.SDKErrorf(err, "", "cooldown-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "manager_type", &obj.ManagerType) if err != nil { + err = core.SDKErrorf(err, "", "manager_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount) if err != nil { + err = core.SDKErrorf(err, "", "max_membership_count-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount) if err != nil { + err = core.SDKErrorf(err, "", "min_membership_count-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "policies", &obj.Policies, UnmarshalInstanceGroupManagerPolicyReference) if err != nil { + err = core.SDKErrorf(err, "", "policies-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "actions", &obj.Actions, UnmarshalInstanceGroupManagerActionReference) if err != nil { + err = core.SDKErrorf(err, "", "actions-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -49347,62 +54235,77 @@ func UnmarshalInstanceGroupManagerAction(m map[string]json.RawMessage, result in obj := new(InstanceGroupManagerAction) err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { + err = core.SDKErrorf(err, "", "auto_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "auto_delete_timeout", &obj.AutoDeleteTimeout) if err != nil { + err = core.SDKErrorf(err, "", "auto_delete_timeout-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt) if err != nil { + err = core.SDKErrorf(err, "", "updated_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "action_type", &obj.ActionType) if err != nil { + err = core.SDKErrorf(err, "", "action_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec) if err != nil { + err = core.SDKErrorf(err, "", "cron_spec-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "last_applied_at", &obj.LastAppliedAt) if err != nil { + err = core.SDKErrorf(err, "", "last_applied_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "next_run_at", &obj.NextRunAt) if err != nil { + err = core.SDKErrorf(err, "", "next_run_at-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroup) if err != nil { + err = core.SDKErrorf(err, "", "group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManager) if err != nil { + err = core.SDKErrorf(err, "", "manager-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -49420,6 +54323,7 @@ func UnmarshalInstanceGroupManagerActionGroupPatch(m map[string]json.RawMessage, obj := new(InstanceGroupManagerActionGroupPatch) err = core.UnmarshalPrimitive(m, "membership_count", &obj.MembershipCount) if err != nil { + err = core.SDKErrorf(err, "", "membership_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -49440,10 +54344,12 @@ func UnmarshalInstanceGroupManagerActionManagerPatch(m map[string]json.RawMessag obj := new(InstanceGroupManagerActionManagerPatch) err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount) if err != nil { + err = core.SDKErrorf(err, "", "max_membership_count-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount) if err != nil { + err = core.SDKErrorf(err, "", "min_membership_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -49473,22 +54379,27 @@ func UnmarshalInstanceGroupManagerActionPatch(m map[string]json.RawMessage, resu obj := new(InstanceGroupManagerActionPatch) err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec) if err != nil { + err = core.SDKErrorf(err, "", "cron_spec-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerActionGroupPatch) if err != nil { + err = core.SDKErrorf(err, "", "group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerActionManagerPatch) if err != nil { + err = core.SDKErrorf(err, "", "manager-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "run_at", &obj.RunAt) if err != nil { + err = core.SDKErrorf(err, "", "run_at-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -49502,6 +54413,9 @@ func (instanceGroupManagerActionPatch *InstanceGroupManagerActionPatch) AsPatch( if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -49538,22 +54452,27 @@ func UnmarshalInstanceGroupManagerActionPrototype(m map[string]json.RawMessage, obj := new(InstanceGroupManagerActionPrototype) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "run_at", &obj.RunAt) if err != nil { + err = core.SDKErrorf(err, "", "run_at-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupPrototype) if err != nil { + err = core.SDKErrorf(err, "", "group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManagerPrototype) if err != nil { + err = core.SDKErrorf(err, "", "manager-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec) if err != nil { + err = core.SDKErrorf(err, "", "cron_spec-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -49591,22 +54510,27 @@ func UnmarshalInstanceGroupManagerActionReference(m map[string]json.RawMessage, obj := new(InstanceGroupManagerActionReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceGroupManagerActionReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -49625,6 +54549,7 @@ func UnmarshalInstanceGroupManagerActionReferenceDeleted(m map[string]json.RawMe obj := new(InstanceGroupManagerActionReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -49655,22 +54580,27 @@ func UnmarshalInstanceGroupManagerActionsCollection(m map[string]json.RawMessage obj := new(InstanceGroupManagerActionsCollection) err = core.UnmarshalModel(m, "actions", &obj.Actions, UnmarshalInstanceGroupManagerAction) if err != nil { + err = core.SDKErrorf(err, "", "actions-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalInstanceGroupManagerActionsCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalInstanceGroupManagerActionsCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -49683,8 +54613,11 @@ func (resp *InstanceGroupManagerActionsCollection) GetNextStart() (*string, erro return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -49700,6 +54633,7 @@ func UnmarshalInstanceGroupManagerActionsCollectionFirst(m map[string]json.RawMe obj := new(InstanceGroupManagerActionsCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -49717,6 +54651,7 @@ func UnmarshalInstanceGroupManagerActionsCollectionNext(m map[string]json.RawMes obj := new(InstanceGroupManagerActionsCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -49747,22 +54682,27 @@ func UnmarshalInstanceGroupManagerCollection(m map[string]json.RawMessage, resul obj := new(InstanceGroupManagerCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalInstanceGroupManagerCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "managers", &obj.Managers, UnmarshalInstanceGroupManager) if err != nil { + err = core.SDKErrorf(err, "", "managers-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalInstanceGroupManagerCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -49775,8 +54715,11 @@ func (resp *InstanceGroupManagerCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -49792,6 +54735,7 @@ func UnmarshalInstanceGroupManagerCollectionFirst(m map[string]json.RawMessage, obj := new(InstanceGroupManagerCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -49809,6 +54753,7 @@ func UnmarshalInstanceGroupManagerCollectionNext(m map[string]json.RawMessage, r obj := new(InstanceGroupManagerCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -49841,26 +54786,32 @@ func UnmarshalInstanceGroupManagerPatch(m map[string]json.RawMessage, result int obj := new(InstanceGroupManagerPatch) err = core.UnmarshalPrimitive(m, "aggregation_window", &obj.AggregationWindow) if err != nil { + err = core.SDKErrorf(err, "", "aggregation_window-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "cooldown", &obj.Cooldown) if err != nil { + err = core.SDKErrorf(err, "", "cooldown-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "management_enabled", &obj.ManagementEnabled) if err != nil { + err = core.SDKErrorf(err, "", "management_enabled-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount) if err != nil { + err = core.SDKErrorf(err, "", "max_membership_count-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount) if err != nil { + err = core.SDKErrorf(err, "", "min_membership_count-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -49874,6 +54825,9 @@ func (instanceGroupManagerPatch *InstanceGroupManagerPatch) AsPatch() (_patch ma if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -49935,34 +54889,42 @@ func UnmarshalInstanceGroupManagerPolicy(m map[string]json.RawMessage, result in obj := new(InstanceGroupManagerPolicy) err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt) if err != nil { + err = core.SDKErrorf(err, "", "updated_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "metric_type", &obj.MetricType) if err != nil { + err = core.SDKErrorf(err, "", "metric_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "metric_value", &obj.MetricValue) if err != nil { + err = core.SDKErrorf(err, "", "metric_value-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "policy_type", &obj.PolicyType) if err != nil { + err = core.SDKErrorf(err, "", "policy_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -49993,22 +54955,27 @@ func UnmarshalInstanceGroupManagerPolicyCollection(m map[string]json.RawMessage, obj := new(InstanceGroupManagerPolicyCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalInstanceGroupManagerPolicyCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalInstanceGroupManagerPolicyCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "policies", &obj.Policies, UnmarshalInstanceGroupManagerPolicy) if err != nil { + err = core.SDKErrorf(err, "", "policies-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -50021,8 +54988,11 @@ func (resp *InstanceGroupManagerPolicyCollection) GetNextStart() (*string, error return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -50038,6 +55008,7 @@ func UnmarshalInstanceGroupManagerPolicyCollectionFirst(m map[string]json.RawMes obj := new(InstanceGroupManagerPolicyCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -50055,6 +55026,7 @@ func UnmarshalInstanceGroupManagerPolicyCollectionNext(m map[string]json.RawMess obj := new(InstanceGroupManagerPolicyCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -50088,14 +55060,17 @@ func UnmarshalInstanceGroupManagerPolicyPatch(m map[string]json.RawMessage, resu obj := new(InstanceGroupManagerPolicyPatch) err = core.UnmarshalPrimitive(m, "metric_type", &obj.MetricType) if err != nil { + err = core.SDKErrorf(err, "", "metric_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "metric_value", &obj.MetricValue) if err != nil { + err = core.SDKErrorf(err, "", "metric_value-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -50109,6 +55084,9 @@ func (instanceGroupManagerPolicyPatch *InstanceGroupManagerPolicyPatch) AsPatch( if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -50158,18 +55136,22 @@ func UnmarshalInstanceGroupManagerPolicyPrototype(m map[string]json.RawMessage, obj := new(InstanceGroupManagerPolicyPrototype) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "metric_type", &obj.MetricType) if err != nil { + err = core.SDKErrorf(err, "", "metric_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "metric_value", &obj.MetricValue) if err != nil { + err = core.SDKErrorf(err, "", "metric_value-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "policy_type", &obj.PolicyType) if err != nil { + err = core.SDKErrorf(err, "", "policy_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -50198,18 +55180,22 @@ func UnmarshalInstanceGroupManagerPolicyReference(m map[string]json.RawMessage, obj := new(InstanceGroupManagerPolicyReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceGroupManagerPolicyReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -50228,6 +55214,7 @@ func UnmarshalInstanceGroupManagerPolicyReferenceDeleted(m map[string]json.RawMe obj := new(InstanceGroupManagerPolicyReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -50281,30 +55268,37 @@ func UnmarshalInstanceGroupManagerPrototype(m map[string]json.RawMessage, result obj := new(InstanceGroupManagerPrototype) err = core.UnmarshalPrimitive(m, "management_enabled", &obj.ManagementEnabled) if err != nil { + err = core.SDKErrorf(err, "", "management_enabled-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "aggregation_window", &obj.AggregationWindow) if err != nil { + err = core.SDKErrorf(err, "", "aggregation_window-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "cooldown", &obj.Cooldown) if err != nil { + err = core.SDKErrorf(err, "", "cooldown-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "manager_type", &obj.ManagerType) if err != nil { + err = core.SDKErrorf(err, "", "manager_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount) if err != nil { + err = core.SDKErrorf(err, "", "max_membership_count-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount) if err != nil { + err = core.SDKErrorf(err, "", "min_membership_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -50332,18 +55326,22 @@ func UnmarshalInstanceGroupManagerReference(m map[string]json.RawMessage, result obj := new(InstanceGroupManagerReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceGroupManagerReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -50362,6 +55360,7 @@ func UnmarshalInstanceGroupManagerReferenceDeleted(m map[string]json.RawMessage, obj := new(InstanceGroupManagerReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -50379,6 +55378,7 @@ func UnmarshalInstanceGroupManagerScheduledActionGroup(m map[string]json.RawMess obj := new(InstanceGroupManagerScheduledActionGroup) err = core.UnmarshalPrimitive(m, "membership_count", &obj.MembershipCount) if err != nil { + err = core.SDKErrorf(err, "", "membership_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -50397,6 +55397,9 @@ func (*VpcV1) NewInstanceGroupManagerScheduledActionGroupPrototype(membershipCou MembershipCount: core.Int64Ptr(membershipCount), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -50405,6 +55408,7 @@ func UnmarshalInstanceGroupManagerScheduledActionGroupPrototype(m map[string]jso obj := new(InstanceGroupManagerScheduledActionGroupPrototype) err = core.UnmarshalPrimitive(m, "membership_count", &obj.MembershipCount) if err != nil { + err = core.SDKErrorf(err, "", "membership_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -50448,26 +55452,32 @@ func UnmarshalInstanceGroupManagerScheduledActionManager(m map[string]json.RawMe obj := new(InstanceGroupManagerScheduledActionManager) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceGroupManagerReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount) if err != nil { + err = core.SDKErrorf(err, "", "max_membership_count-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount) if err != nil { + err = core.SDKErrorf(err, "", "min_membership_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -50504,18 +55514,22 @@ func UnmarshalInstanceGroupManagerScheduledActionManagerPrototype(m map[string]j obj := new(InstanceGroupManagerScheduledActionManagerPrototype) err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount) if err != nil { + err = core.SDKErrorf(err, "", "max_membership_count-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount) if err != nil { + err = core.SDKErrorf(err, "", "min_membership_count-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -50577,42 +55591,52 @@ func UnmarshalInstanceGroupMembership(m map[string]json.RawMessage, result inter obj := new(InstanceGroupMembership) err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "delete_instance_on_membership_delete", &obj.DeleteInstanceOnMembershipDelete) if err != nil { + err = core.SDKErrorf(err, "", "delete_instance_on_membership_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "instance", &obj.Instance, UnmarshalInstanceReference) if err != nil { + err = core.SDKErrorf(err, "", "instance-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "instance_template", &obj.InstanceTemplate, UnmarshalInstanceTemplateReference) if err != nil { + err = core.SDKErrorf(err, "", "instance_template-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "pool_member", &obj.PoolMember, UnmarshalLoadBalancerPoolMemberReference) if err != nil { + err = core.SDKErrorf(err, "", "pool_member-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt) if err != nil { + err = core.SDKErrorf(err, "", "updated_at-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -50643,22 +55667,27 @@ func UnmarshalInstanceGroupMembershipCollection(m map[string]json.RawMessage, re obj := new(InstanceGroupMembershipCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalInstanceGroupMembershipCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "memberships", &obj.Memberships, UnmarshalInstanceGroupMembership) if err != nil { + err = core.SDKErrorf(err, "", "memberships-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalInstanceGroupMembershipCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -50671,8 +55700,11 @@ func (resp *InstanceGroupMembershipCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -50688,6 +55720,7 @@ func UnmarshalInstanceGroupMembershipCollectionFirst(m map[string]json.RawMessag obj := new(InstanceGroupMembershipCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -50705,6 +55738,7 @@ func UnmarshalInstanceGroupMembershipCollectionNext(m map[string]json.RawMessage obj := new(InstanceGroupMembershipCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -50723,6 +55757,7 @@ func UnmarshalInstanceGroupMembershipPatch(m map[string]json.RawMessage, result obj := new(InstanceGroupMembershipPatch) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -50736,6 +55771,9 @@ func (instanceGroupMembershipPatch *InstanceGroupMembershipPatch) AsPatch() (_pa if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -50780,30 +55818,37 @@ func UnmarshalInstanceGroupPatch(m map[string]json.RawMessage, result interface{ obj := new(InstanceGroupPatch) err = core.UnmarshalPrimitive(m, "application_port", &obj.ApplicationPort) if err != nil { + err = core.SDKErrorf(err, "", "application_port-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "instance_template", &obj.InstanceTemplate, UnmarshalInstanceTemplateIdentity) if err != nil { + err = core.SDKErrorf(err, "", "instance_template-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "load_balancer", &obj.LoadBalancer, UnmarshalLoadBalancerIdentity) if err != nil { + err = core.SDKErrorf(err, "", "load_balancer-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "load_balancer_pool", &obj.LoadBalancerPool, UnmarshalLoadBalancerPoolIdentity) if err != nil { + err = core.SDKErrorf(err, "", "load_balancer_pool-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "membership_count", &obj.MembershipCount) if err != nil { + err = core.SDKErrorf(err, "", "membership_count-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnets", &obj.Subnets, UnmarshalSubnetIdentity) if err != nil { + err = core.SDKErrorf(err, "", "subnets-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -50817,6 +55862,9 @@ func (instanceGroupPatch *InstanceGroupPatch) AsPatch() (_patch map[string]inter if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -50844,22 +55892,27 @@ func UnmarshalInstanceGroupReference(m map[string]json.RawMessage, result interf obj := new(InstanceGroupReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceGroupReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -50878,6 +55931,7 @@ func UnmarshalInstanceGroupReferenceDeleted(m map[string]json.RawMessage, result obj := new(InstanceGroupReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -50926,14 +55980,17 @@ func UnmarshalInstanceHealthReason(m map[string]json.RawMessage, result interfac obj := new(InstanceHealthReason) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "message", &obj.Message) if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -50957,14 +56014,17 @@ func UnmarshalInstanceInitialization(m map[string]json.RawMessage, result interf obj := new(InstanceInitialization) err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceInitializationDefaultTrustedProfile) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyReference) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "password", &obj.Password, UnmarshalInstanceInitializationPassword) if err != nil { + err = core.SDKErrorf(err, "", "password-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -50987,10 +56047,12 @@ func UnmarshalInstanceInitializationDefaultTrustedProfile(m map[string]json.RawM obj := new(InstanceInitializationDefaultTrustedProfile) err = core.UnmarshalPrimitive(m, "auto_link", &obj.AutoLink) if err != nil { + err = core.SDKErrorf(err, "", "auto_link-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalTrustedProfileReference) if err != nil { + err = core.SDKErrorf(err, "", "target-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -51011,10 +56073,12 @@ func UnmarshalInstanceInitializationPassword(m map[string]json.RawMessage, resul obj := new(InstanceInitializationPassword) err = core.UnmarshalPrimitive(m, "encrypted_password", &obj.EncryptedPassword) if err != nil { + err = core.SDKErrorf(err, "", "encrypted_password-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalKeyIdentityByFingerprint) if err != nil { + err = core.SDKErrorf(err, "", "encryption_key-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -51024,6 +56088,7 @@ func UnmarshalInstanceInitializationPassword(m map[string]json.RawMessage, resul // InstanceLifecycleReason : InstanceLifecycleReason struct type InstanceLifecycleReason struct { // A reason code for this lifecycle state: + // - `internal_error`: internal error (contact IBM support) // - `resource_suspended_by_provider`: The resource has been suspended (contact IBM // support) // @@ -51040,12 +56105,14 @@ type InstanceLifecycleReason struct { // Constants associated with the InstanceLifecycleReason.Code property. // A reason code for this lifecycle state: +// - `internal_error`: internal error (contact IBM support) // - `resource_suspended_by_provider`: The resource has been suspended (contact IBM // support) // // The enumerated values for this property may // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. const ( + InstanceLifecycleReasonCodeInternalErrorConst = "internal_error" InstanceLifecycleReasonCodeResourceSuspendedByProviderConst = "resource_suspended_by_provider" ) @@ -51054,14 +56121,17 @@ func UnmarshalInstanceLifecycleReason(m map[string]json.RawMessage, result inter obj := new(InstanceLifecycleReason) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "message", &obj.Message) if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -51099,14 +56169,17 @@ func UnmarshalInstanceMetadataService(m map[string]json.RawMessage, result inter obj := new(InstanceMetadataService) err = core.UnmarshalPrimitive(m, "enabled", &obj.Enabled) if err != nil { + err = core.SDKErrorf(err, "", "enabled-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { + err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "response_hop_limit", &obj.ResponseHopLimit) if err != nil { + err = core.SDKErrorf(err, "", "response_hop_limit-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -51144,14 +56217,17 @@ func UnmarshalInstanceMetadataServicePatch(m map[string]json.RawMessage, result obj := new(InstanceMetadataServicePatch) err = core.UnmarshalPrimitive(m, "enabled", &obj.Enabled) if err != nil { + err = core.SDKErrorf(err, "", "enabled-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { + err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "response_hop_limit", &obj.ResponseHopLimit) if err != nil { + err = core.SDKErrorf(err, "", "response_hop_limit-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -51189,14 +56265,17 @@ func UnmarshalInstanceMetadataServicePrototype(m map[string]json.RawMessage, res obj := new(InstanceMetadataServicePrototype) err = core.UnmarshalPrimitive(m, "enabled", &obj.Enabled) if err != nil { + err = core.SDKErrorf(err, "", "enabled-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { + err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "response_hop_limit", &obj.ResponseHopLimit) if err != nil { + err = core.SDKErrorf(err, "", "response_hop_limit-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -51270,46 +56349,57 @@ func UnmarshalInstanceNetworkAttachment(m map[string]json.RawMessage, result int obj := new(InstanceNetworkAttachment) err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "port_speed", &obj.PortSpeed) if err != nil { + err = core.SDKErrorf(err, "", "port_speed-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "virtual_network_interface", &obj.VirtualNetworkInterface, UnmarshalVirtualNetworkInterfaceReferenceAttachmentContext) if err != nil { + err = core.SDKErrorf(err, "", "virtual_network_interface-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -51327,6 +56417,7 @@ func UnmarshalInstanceNetworkAttachmentCollection(m map[string]json.RawMessage, obj := new(InstanceNetworkAttachmentCollection) err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalInstanceNetworkAttachment) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -51344,6 +56435,7 @@ func UnmarshalInstanceNetworkAttachmentPatch(m map[string]json.RawMessage, resul obj := new(InstanceNetworkAttachmentPatch) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -51357,6 +56449,9 @@ func (instanceNetworkAttachmentPatch *InstanceNetworkAttachmentPatch) AsPatch() if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -51381,6 +56476,9 @@ func (*VpcV1) NewInstanceNetworkAttachmentPrototype(virtualNetworkInterface Inst VirtualNetworkInterface: virtualNetworkInterface, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -51389,10 +56487,12 @@ func UnmarshalInstanceNetworkAttachmentPrototype(m map[string]json.RawMessage, r obj := new(InstanceNetworkAttachmentPrototype) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "virtual_network_interface", &obj.VirtualNetworkInterface, UnmarshalInstanceNetworkAttachmentPrototypeVirtualNetworkInterface) if err != nil { + err = core.SDKErrorf(err, "", "virtual_network_interface-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -51490,50 +56590,62 @@ func UnmarshalInstanceNetworkAttachmentPrototypeVirtualNetworkInterface(m map[st obj := new(InstanceNetworkAttachmentPrototypeVirtualNetworkInterface) err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing) if err != nil { + err = core.SDKErrorf(err, "", "allow_ip_spoofing-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { + err = core.SDKErrorf(err, "", "auto_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "enable_infrastructure_nat", &obj.EnableInfrastructureNat) if err != nil { + err = core.SDKErrorf(err, "", "enable_infrastructure_nat-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "ips", &obj.Ips, UnmarshalVirtualNetworkInterfaceIPPrototype) if err != nil { + err = core.SDKErrorf(err, "", "ips-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalVirtualNetworkInterfacePrimaryIPPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "security_groups-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -51577,30 +56689,37 @@ func UnmarshalInstanceNetworkAttachmentReference(m map[string]json.RawMessage, r obj := new(InstanceNetworkAttachmentReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceNetworkAttachmentReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -51619,6 +56738,7 @@ func UnmarshalInstanceNetworkAttachmentReferenceDeleted(m map[string]json.RawMes obj := new(InstanceNetworkAttachmentReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -51670,30 +56790,37 @@ func UnmarshalInstancePatch(m map[string]json.RawMessage, result interface{}) (e obj := new(InstancePatch) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPatch) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePatch) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPatch) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstancePatchProfile) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPatch) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -51707,6 +56834,9 @@ func (instancePatch *InstancePatch) AsPatch() (_patch map[string]interface{}, er if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -51746,10 +56876,12 @@ func UnmarshalInstancePatchProfile(m map[string]json.RawMessage, result interfac obj := new(InstancePatchProfile) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -51801,26 +56933,32 @@ func UnmarshalInstancePlacementTarget(m map[string]json.RawMessage, result inter obj := new(InstancePlacementTarget) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalDedicatedHostGroupReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -51855,14 +56993,17 @@ func UnmarshalInstancePlacementTargetPatch(m map[string]json.RawMessage, result obj := new(InstancePlacementTargetPatch) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -51898,14 +57039,17 @@ func UnmarshalInstancePlacementTargetPrototype(m map[string]json.RawMessage, res obj := new(InstancePlacementTargetPrototype) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -52003,90 +57147,112 @@ func UnmarshalInstanceProfile(m map[string]json.RawMessage, result interface{}) obj := new(InstanceProfile) err = core.UnmarshalModel(m, "bandwidth", &obj.Bandwidth, UnmarshalInstanceProfileBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "disks", &obj.Disks, UnmarshalInstanceProfileDisk) if err != nil { + err = core.SDKErrorf(err, "", "disks-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "family", &obj.Family) if err != nil { + err = core.SDKErrorf(err, "", "family-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "gpu_count", &obj.GpuCount, UnmarshalInstanceProfileGpu) if err != nil { + err = core.SDKErrorf(err, "", "gpu_count-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "gpu_manufacturer", &obj.GpuManufacturer, UnmarshalInstanceProfileGpuManufacturer) if err != nil { + err = core.SDKErrorf(err, "", "gpu_manufacturer-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "gpu_memory", &obj.GpuMemory, UnmarshalInstanceProfileGpuMemory) if err != nil { + err = core.SDKErrorf(err, "", "gpu_memory-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "gpu_model", &obj.GpuModel, UnmarshalInstanceProfileGpuModel) if err != nil { + err = core.SDKErrorf(err, "", "gpu_model-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "memory", &obj.Memory, UnmarshalInstanceProfileMemory) if err != nil { + err = core.SDKErrorf(err, "", "memory-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachment_count", &obj.NetworkAttachmentCount, UnmarshalInstanceProfileNetworkAttachmentCount) if err != nil { + err = core.SDKErrorf(err, "", "network_attachment_count-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interface_count", &obj.NetworkInterfaceCount, UnmarshalInstanceProfileNetworkInterfaceCount) if err != nil { + err = core.SDKErrorf(err, "", "network_interface_count-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "numa_count", &obj.NumaCount, UnmarshalInstanceProfileNumaCount) if err != nil { + err = core.SDKErrorf(err, "", "numa_count-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "os_architecture", &obj.OsArchitecture, UnmarshalInstanceProfileOsArchitecture) if err != nil { + err = core.SDKErrorf(err, "", "os_architecture-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "port_speed", &obj.PortSpeed, UnmarshalInstanceProfilePortSpeed) if err != nil { + err = core.SDKErrorf(err, "", "port_speed-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_terms", &obj.ReservationTerms, UnmarshalInstanceProfileReservationTerms) if err != nil { + err = core.SDKErrorf(err, "", "reservation_terms-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth, UnmarshalInstanceProfileVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vcpu_architecture", &obj.VcpuArchitecture, UnmarshalInstanceProfileVcpuArchitecture) if err != nil { + err = core.SDKErrorf(err, "", "vcpu_architecture-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vcpu_count", &obj.VcpuCount, UnmarshalInstanceProfileVcpu) if err != nil { + err = core.SDKErrorf(err, "", "vcpu_count-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vcpu_manufacturer", &obj.VcpuManufacturer, UnmarshalInstanceProfileVcpuManufacturer) if err != nil { + err = core.SDKErrorf(err, "", "vcpu_manufacturer-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -52141,30 +57307,37 @@ func UnmarshalInstanceProfileBandwidth(m map[string]json.RawMessage, result inte obj := new(InstanceProfileBandwidth) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -52182,6 +57355,7 @@ func UnmarshalInstanceProfileCollection(m map[string]json.RawMessage, result int obj := new(InstanceProfileCollection) err = core.UnmarshalModel(m, "profiles", &obj.Profiles, UnmarshalInstanceProfile) if err != nil { + err = core.SDKErrorf(err, "", "profiles-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -52202,14 +57376,17 @@ func UnmarshalInstanceProfileDisk(m map[string]json.RawMessage, result interface obj := new(InstanceProfileDisk) err = core.UnmarshalModel(m, "quantity", &obj.Quantity, UnmarshalInstanceProfileDiskQuantity) if err != nil { + err = core.SDKErrorf(err, "", "quantity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "size", &obj.Size, UnmarshalInstanceProfileDiskSize) if err != nil { + err = core.SDKErrorf(err, "", "size-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "supported_interface_types", &obj.SupportedInterfaceTypes, UnmarshalInstanceProfileDiskSupportedInterfaces) if err != nil { + err = core.SDKErrorf(err, "", "supported_interface_types-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -52264,30 +57441,37 @@ func UnmarshalInstanceProfileDiskQuantity(m map[string]json.RawMessage, result i obj := new(InstanceProfileDiskQuantity) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -52342,30 +57526,37 @@ func UnmarshalInstanceProfileDiskSize(m map[string]json.RawMessage, result inter obj := new(InstanceProfileDiskSize) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -52418,14 +57609,17 @@ func UnmarshalInstanceProfileDiskSupportedInterfaces(m map[string]json.RawMessag obj := new(InstanceProfileDiskSupportedInterfaces) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -52480,30 +57674,37 @@ func UnmarshalInstanceProfileGpu(m map[string]json.RawMessage, result interface{ obj := new(InstanceProfileGpu) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -52530,10 +57731,12 @@ func UnmarshalInstanceProfileGpuManufacturer(m map[string]json.RawMessage, resul obj := new(InstanceProfileGpuManufacturer) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -52588,30 +57791,37 @@ func UnmarshalInstanceProfileGpuMemory(m map[string]json.RawMessage, result inte obj := new(InstanceProfileGpuMemory) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -52638,10 +57848,12 @@ func UnmarshalInstanceProfileGpuModel(m map[string]json.RawMessage, result inter obj := new(InstanceProfileGpuModel) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -52673,10 +57885,12 @@ func UnmarshalInstanceProfileIdentity(m map[string]json.RawMessage, result inter obj := new(InstanceProfileIdentity) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -52731,30 +57945,37 @@ func UnmarshalInstanceProfileMemory(m map[string]json.RawMessage, result interfa obj := new(InstanceProfileMemory) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -52792,10 +58013,12 @@ func UnmarshalInstanceProfileNumaCount(m map[string]json.RawMessage, result inte obj := new(InstanceProfileNumaCount) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -52836,14 +58059,17 @@ func UnmarshalInstanceProfileNetworkAttachmentCount(m map[string]json.RawMessage obj := new(InstanceProfileNetworkAttachmentCount) err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -52884,14 +58110,17 @@ func UnmarshalInstanceProfileNetworkInterfaceCount(m map[string]json.RawMessage, obj := new(InstanceProfileNetworkInterfaceCount) err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -52921,14 +58150,17 @@ func UnmarshalInstanceProfileOsArchitecture(m map[string]json.RawMessage, result obj := new(InstanceProfileOsArchitecture) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -52966,10 +58198,12 @@ func UnmarshalInstanceProfilePortSpeed(m map[string]json.RawMessage, result inte obj := new(InstanceProfilePortSpeed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -52999,14 +58233,17 @@ func UnmarshalInstanceProfileReference(m map[string]json.RawMessage, result inte obj := new(InstanceProfileReference) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -53039,10 +58276,12 @@ func UnmarshalInstanceProfileReservationTerms(m map[string]json.RawMessage, resu obj := new(InstanceProfileReservationTerms) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -53097,30 +58336,37 @@ func UnmarshalInstanceProfileVcpu(m map[string]json.RawMessage, result interface obj := new(InstanceProfileVcpu) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -53150,14 +58396,17 @@ func UnmarshalInstanceProfileVcpuArchitecture(m map[string]json.RawMessage, resu obj := new(InstanceProfileVcpuArchitecture) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -53187,14 +58436,17 @@ func UnmarshalInstanceProfileVcpuManufacturer(m map[string]json.RawMessage, resu obj := new(InstanceProfileVcpuManufacturer) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -53249,30 +58501,37 @@ func UnmarshalInstanceProfileVolumeBandwidth(m map[string]json.RawMessage, resul obj := new(InstanceProfileVolumeBandwidth) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -53404,90 +58663,112 @@ func UnmarshalInstancePrototype(m map[string]json.RawMessage, result interface{} obj := new(InstancePrototype) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity) if err != nil { + err = core.SDKErrorf(err, "", "image-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_interface-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "catalog_offering", &obj.CatalogOffering, UnmarshalInstanceCatalogOfferingPrototype) if err != nil { + err = core.SDKErrorf(err, "", "catalog_offering-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "source_template", &obj.SourceTemplate, UnmarshalInstanceTemplateIdentity) if err != nil { + err = core.SDKErrorf(err, "", "source_template-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -53518,22 +58799,27 @@ func UnmarshalInstanceReference(m map[string]json.RawMessage, result interface{} obj := new(InstanceReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -53552,6 +58838,7 @@ func UnmarshalInstanceReferenceDeleted(m map[string]json.RawMessage, result inte obj := new(InstanceReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -53583,10 +58870,12 @@ func UnmarshalInstanceReservationAffinity(m map[string]json.RawMessage, result i obj := new(InstanceReservationAffinity) err = core.UnmarshalPrimitive(m, "policy", &obj.Policy) if err != nil { + err = core.SDKErrorf(err, "", "policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "pool", &obj.Pool, UnmarshalReservationReference) if err != nil { + err = core.SDKErrorf(err, "", "pool-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -53625,10 +58914,12 @@ func UnmarshalInstanceReservationAffinityPatch(m map[string]json.RawMessage, res obj := new(InstanceReservationAffinityPatch) err = core.UnmarshalPrimitive(m, "policy", &obj.Policy) if err != nil { + err = core.SDKErrorf(err, "", "policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "pool", &obj.Pool, UnmarshalReservationIdentity) if err != nil { + err = core.SDKErrorf(err, "", "pool-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -53670,10 +58961,12 @@ func UnmarshalInstanceReservationAffinityPrototype(m map[string]json.RawMessage, obj := new(InstanceReservationAffinityPrototype) err = core.UnmarshalPrimitive(m, "policy", &obj.Policy) if err != nil { + err = core.SDKErrorf(err, "", "policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "pool", &obj.Pool, UnmarshalReservationIdentity) if err != nil { + err = core.SDKErrorf(err, "", "pool-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -53720,14 +59013,17 @@ func UnmarshalInstanceStatusReason(m map[string]json.RawMessage, result interfac obj := new(InstanceStatusReason) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "message", &obj.Message) if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -53862,102 +59158,127 @@ func UnmarshalInstanceTemplate(m map[string]json.RawMessage, result interface{}) obj := new(InstanceTemplate) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity) if err != nil { + err = core.SDKErrorf(err, "", "image-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_interface-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "catalog_offering", &obj.CatalogOffering, UnmarshalInstanceCatalogOfferingPrototype) if err != nil { + err = core.SDKErrorf(err, "", "catalog_offering-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -53988,22 +59309,27 @@ func UnmarshalInstanceTemplateCollection(m map[string]json.RawMessage, result in obj := new(InstanceTemplateCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalInstanceTemplateCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalInstanceTemplateCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "templates", &obj.Templates, UnmarshalInstanceTemplate) if err != nil { + err = core.SDKErrorf(err, "", "templates-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -54021,6 +59347,7 @@ func UnmarshalInstanceTemplateCollectionFirst(m map[string]json.RawMessage, resu obj := new(InstanceTemplateCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -54038,6 +59365,7 @@ func UnmarshalInstanceTemplateCollectionNext(m map[string]json.RawMessage, resul obj := new(InstanceTemplateCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -54073,14 +59401,17 @@ func UnmarshalInstanceTemplateIdentity(m map[string]json.RawMessage, result inte obj := new(InstanceTemplateIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -54098,6 +59429,7 @@ func UnmarshalInstanceTemplatePatch(m map[string]json.RawMessage, result interfa obj := new(InstanceTemplatePatch) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -54111,6 +59443,9 @@ func (instanceTemplatePatch *InstanceTemplatePatch) AsPatch() (_patch map[string if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -54238,90 +59573,112 @@ func UnmarshalInstanceTemplatePrototype(m map[string]json.RawMessage, result int obj := new(InstanceTemplatePrototype) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity) if err != nil { + err = core.SDKErrorf(err, "", "image-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_interface-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "catalog_offering", &obj.CatalogOffering, UnmarshalInstanceCatalogOfferingPrototype) if err != nil { + err = core.SDKErrorf(err, "", "catalog_offering-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "source_template", &obj.SourceTemplate, UnmarshalInstanceTemplateIdentity) if err != nil { + err = core.SDKErrorf(err, "", "source_template-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -54352,22 +59709,27 @@ func UnmarshalInstanceTemplateReference(m map[string]json.RawMessage, result int obj := new(InstanceTemplateReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceTemplateReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -54386,6 +59748,7 @@ func UnmarshalInstanceTemplateReferenceDeleted(m map[string]json.RawMessage, res obj := new(InstanceTemplateReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -54409,14 +59772,17 @@ func UnmarshalInstanceVcpu(m map[string]json.RawMessage, result interface{}) (er obj := new(InstanceVcpu) err = core.UnmarshalPrimitive(m, "architecture", &obj.Architecture) if err != nil { + err = core.SDKErrorf(err, "", "architecture-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "count", &obj.Count) if err != nil { + err = core.SDKErrorf(err, "", "count-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "manufacturer", &obj.Manufacturer) if err != nil { + err = core.SDKErrorf(err, "", "manufacturer-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -54470,42 +59836,52 @@ func UnmarshalKey(m map[string]json.RawMessage, result interface{}) (err error) obj := new(Key) err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "fingerprint", &obj.Fingerprint) if err != nil { + err = core.SDKErrorf(err, "", "fingerprint-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "length", &obj.Length) if err != nil { + err = core.SDKErrorf(err, "", "length-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "public_key", &obj.PublicKey) if err != nil { + err = core.SDKErrorf(err, "", "public_key-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -54536,22 +59912,27 @@ func UnmarshalKeyCollection(m map[string]json.RawMessage, result interface{}) (e obj := new(KeyCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalKeyCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKey) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalKeyCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -54564,8 +59945,11 @@ func (resp *KeyCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -54581,6 +59965,7 @@ func UnmarshalKeyCollectionFirst(m map[string]json.RawMessage, result interface{ obj := new(KeyCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -54598,6 +59983,7 @@ func UnmarshalKeyCollectionNext(m map[string]json.RawMessage, result interface{} obj := new(KeyCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -54638,18 +60024,22 @@ func UnmarshalKeyIdentity(m map[string]json.RawMessage, result interface{}) (err obj := new(KeyIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "fingerprint", &obj.Fingerprint) if err != nil { + err = core.SDKErrorf(err, "", "fingerprint-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -54667,6 +60057,7 @@ func UnmarshalKeyPatch(m map[string]json.RawMessage, result interface{}) (err er obj := new(KeyPatch) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -54680,6 +60071,9 @@ func (keyPatch *KeyPatch) AsPatch() (_patch map[string]interface{}, err error) { if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -54711,26 +60105,32 @@ func UnmarshalKeyReference(m map[string]json.RawMessage, result interface{}) (er obj := new(KeyReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalKeyReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "fingerprint", &obj.Fingerprint) if err != nil { + err = core.SDKErrorf(err, "", "fingerprint-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -54749,6 +60149,7 @@ func UnmarshalKeyReferenceDeleted(m map[string]json.RawMessage, result interface obj := new(KeyReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -54776,6 +60177,7 @@ func UnmarshalLegacyCloudObjectStorageBucketIdentity(m map[string]json.RawMessag obj := new(LegacyCloudObjectStorageBucketIdentity) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -54793,6 +60195,7 @@ func UnmarshalLegacyCloudObjectStorageBucketReference(m map[string]json.RawMessa obj := new(LegacyCloudObjectStorageBucketReference) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -56566,45 +61969,45 @@ type ListInstancesOptions struct { // Filters the collection to resources with a `name` property matching the exact specified name. Name *string `json:"name,omitempty"` - // Filters the collection to resources with a `vpc.id` property matching the specified identifier. - VPCID *string `json:"vpc.id,omitempty"` - - // Filters the collection to resources with a `vpc.crn` property matching the specified CRN. - VPCCRN *string `json:"vpc.crn,omitempty"` - - // Filters the collection to resources with a `vpc.name` property matching the exact specified name. - VPCName *string `json:"vpc.name,omitempty"` - - // Filters the collection to instances with a `dedicated_host.id` property matching the specified identifier. + // Filters the collection to resources with a `dedicated_host.id` property matching the specified identifier. DedicatedHostID *string `json:"dedicated_host.id,omitempty"` - // Filters the collection to instances with a `dedicated_host.crn` property matching the specified CRN. + // Filters the collection to resources with a `dedicated_host.crn` property matching the specified CRN. DedicatedHostCRN *string `json:"dedicated_host.crn,omitempty"` - // Filters the collection to instances with a `dedicated_host.name` property matching the exact specified name. + // Filters the collection to resources with a `dedicated_host.name` property matching the exact specified name. DedicatedHostName *string `json:"dedicated_host.name,omitempty"` - // Filters the collection to instances with a `placement_target.id` property matching the specified placement group + // Filters the collection to resources with a `placement_target.id` property matching the specified placement group // identifier. PlacementGroupID *string `json:"placement_group.id,omitempty"` - // Filters the collection to instances with a `placement_target.crn` property matching the specified placement group + // Filters the collection to resources with a `placement_target.crn` property matching the specified placement group // CRN. PlacementGroupCRN *string `json:"placement_group.crn,omitempty"` - // Filters the collection to instances with a `placement_target.name` property matching the exact specified placement + // Filters the collection to resources with a `placement_target.name` property matching the exact specified placement // group name. PlacementGroupName *string `json:"placement_group.name,omitempty"` - // Filters the collection to instances with a `reservation.id` property matching the specified identifier. + // Filters the collection to resources with a `reservation.id` property matching the specified identifier. ReservationID *string `json:"reservation.id,omitempty"` - // Filters the collection to instances with a `reservation.crn` property matching the specified CRN. + // Filters the collection to resources with a `reservation.crn` property matching the specified CRN. ReservationCRN *string `json:"reservation.crn,omitempty"` // Filters the collection to resources with a `reservation.name` property matching the exact specified name. ReservationName *string `json:"reservation.name,omitempty"` + // Filters the collection to resources with a `vpc.id` property matching the specified identifier. + VPCID *string `json:"vpc.id,omitempty"` + + // Filters the collection to resources with a `vpc.crn` property matching the specified CRN. + VPCCRN *string `json:"vpc.crn,omitempty"` + + // Filters the collection to resources with a `vpc.name` property matching the exact specified name. + VPCName *string `json:"vpc.name,omitempty"` + // Allows users to set headers on API requests Headers map[string]string } @@ -56638,24 +62041,6 @@ func (_options *ListInstancesOptions) SetName(name string) *ListInstancesOptions return _options } -// SetVPCID : Allow user to set VPCID -func (_options *ListInstancesOptions) SetVPCID(vpcID string) *ListInstancesOptions { - _options.VPCID = core.StringPtr(vpcID) - return _options -} - -// SetVPCCRN : Allow user to set VPCCRN -func (_options *ListInstancesOptions) SetVPCCRN(vpcCRN string) *ListInstancesOptions { - _options.VPCCRN = core.StringPtr(vpcCRN) - return _options -} - -// SetVPCName : Allow user to set VPCName -func (_options *ListInstancesOptions) SetVPCName(vpcName string) *ListInstancesOptions { - _options.VPCName = core.StringPtr(vpcName) - return _options -} - // SetDedicatedHostID : Allow user to set DedicatedHostID func (_options *ListInstancesOptions) SetDedicatedHostID(dedicatedHostID string) *ListInstancesOptions { _options.DedicatedHostID = core.StringPtr(dedicatedHostID) @@ -56710,6 +62095,24 @@ func (_options *ListInstancesOptions) SetReservationName(reservationName string) return _options } +// SetVPCID : Allow user to set VPCID +func (_options *ListInstancesOptions) SetVPCID(vpcID string) *ListInstancesOptions { + _options.VPCID = core.StringPtr(vpcID) + return _options +} + +// SetVPCCRN : Allow user to set VPCCRN +func (_options *ListInstancesOptions) SetVPCCRN(vpcCRN string) *ListInstancesOptions { + _options.VPCCRN = core.StringPtr(vpcCRN) + return _options +} + +// SetVPCName : Allow user to set VPCName +func (_options *ListInstancesOptions) SetVPCName(vpcName string) *ListInstancesOptions { + _options.VPCName = core.StringPtr(vpcName) + return _options +} + // SetHeaders : Allow user to set Headers func (options *ListInstancesOptions) SetHeaders(param map[string]string) *ListInstancesOptions { options.Headers = param @@ -58996,8 +64399,8 @@ func (options *ListVpcsOptions) SetHeaders(param map[string]string) *ListVpcsOpt return options } -// ListVPNGatewayConnectionLocalCIDRsOptions : The ListVPNGatewayConnectionLocalCIDRs options. -type ListVPNGatewayConnectionLocalCIDRsOptions struct { +// ListVPNGatewayConnectionsLocalCIDRsOptions : The ListVPNGatewayConnectionsLocalCIDRs options. +type ListVPNGatewayConnectionsLocalCIDRsOptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` @@ -59008,110 +64411,110 @@ type ListVPNGatewayConnectionLocalCIDRsOptions struct { Headers map[string]string } -// NewListVPNGatewayConnectionLocalCIDRsOptions : Instantiate ListVPNGatewayConnectionLocalCIDRsOptions -func (*VpcV1) NewListVPNGatewayConnectionLocalCIDRsOptions(vpnGatewayID string, id string) *ListVPNGatewayConnectionLocalCIDRsOptions { - return &ListVPNGatewayConnectionLocalCIDRsOptions{ +// NewListVPNGatewayConnectionsLocalCIDRsOptions : Instantiate ListVPNGatewayConnectionsLocalCIDRsOptions +func (*VpcV1) NewListVPNGatewayConnectionsLocalCIDRsOptions(vpnGatewayID string, id string) *ListVPNGatewayConnectionsLocalCIDRsOptions { + return &ListVPNGatewayConnectionsLocalCIDRsOptions{ VPNGatewayID: core.StringPtr(vpnGatewayID), ID: core.StringPtr(id), } } // SetVPNGatewayID : Allow user to set VPNGatewayID -func (_options *ListVPNGatewayConnectionLocalCIDRsOptions) SetVPNGatewayID(vpnGatewayID string) *ListVPNGatewayConnectionLocalCIDRsOptions { +func (_options *ListVPNGatewayConnectionsLocalCIDRsOptions) SetVPNGatewayID(vpnGatewayID string) *ListVPNGatewayConnectionsLocalCIDRsOptions { _options.VPNGatewayID = core.StringPtr(vpnGatewayID) return _options } // SetID : Allow user to set ID -func (_options *ListVPNGatewayConnectionLocalCIDRsOptions) SetID(id string) *ListVPNGatewayConnectionLocalCIDRsOptions { +func (_options *ListVPNGatewayConnectionsLocalCIDRsOptions) SetID(id string) *ListVPNGatewayConnectionsLocalCIDRsOptions { _options.ID = core.StringPtr(id) return _options } // SetHeaders : Allow user to set Headers -func (options *ListVPNGatewayConnectionLocalCIDRsOptions) SetHeaders(param map[string]string) *ListVPNGatewayConnectionLocalCIDRsOptions { +func (options *ListVPNGatewayConnectionsLocalCIDRsOptions) SetHeaders(param map[string]string) *ListVPNGatewayConnectionsLocalCIDRsOptions { options.Headers = param return options } -// ListVPNGatewayConnectionPeerCIDRsOptions : The ListVPNGatewayConnectionPeerCIDRs options. -type ListVPNGatewayConnectionPeerCIDRsOptions struct { +// ListVPNGatewayConnectionsOptions : The ListVPNGatewayConnections options. +type ListVPNGatewayConnectionsOptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` - // The VPN gateway connection identifier. - ID *string `json:"id" validate:"required,ne="` + // Filters the collection to VPN gateway connections with a `status` property matching the specified value. + Status *string `json:"status,omitempty"` // Allows users to set headers on API requests Headers map[string]string } -// NewListVPNGatewayConnectionPeerCIDRsOptions : Instantiate ListVPNGatewayConnectionPeerCIDRsOptions -func (*VpcV1) NewListVPNGatewayConnectionPeerCIDRsOptions(vpnGatewayID string, id string) *ListVPNGatewayConnectionPeerCIDRsOptions { - return &ListVPNGatewayConnectionPeerCIDRsOptions{ +// Constants associated with the ListVPNGatewayConnectionsOptions.Status property. +// Filters the collection to VPN gateway connections with a `status` property matching the specified value. +const ( + ListVPNGatewayConnectionsOptionsStatusDownConst = "down" + ListVPNGatewayConnectionsOptionsStatusUpConst = "up" +) + +// NewListVPNGatewayConnectionsOptions : Instantiate ListVPNGatewayConnectionsOptions +func (*VpcV1) NewListVPNGatewayConnectionsOptions(vpnGatewayID string) *ListVPNGatewayConnectionsOptions { + return &ListVPNGatewayConnectionsOptions{ VPNGatewayID: core.StringPtr(vpnGatewayID), - ID: core.StringPtr(id), } } // SetVPNGatewayID : Allow user to set VPNGatewayID -func (_options *ListVPNGatewayConnectionPeerCIDRsOptions) SetVPNGatewayID(vpnGatewayID string) *ListVPNGatewayConnectionPeerCIDRsOptions { +func (_options *ListVPNGatewayConnectionsOptions) SetVPNGatewayID(vpnGatewayID string) *ListVPNGatewayConnectionsOptions { _options.VPNGatewayID = core.StringPtr(vpnGatewayID) return _options } -// SetID : Allow user to set ID -func (_options *ListVPNGatewayConnectionPeerCIDRsOptions) SetID(id string) *ListVPNGatewayConnectionPeerCIDRsOptions { - _options.ID = core.StringPtr(id) +// SetStatus : Allow user to set Status +func (_options *ListVPNGatewayConnectionsOptions) SetStatus(status string) *ListVPNGatewayConnectionsOptions { + _options.Status = core.StringPtr(status) return _options } // SetHeaders : Allow user to set Headers -func (options *ListVPNGatewayConnectionPeerCIDRsOptions) SetHeaders(param map[string]string) *ListVPNGatewayConnectionPeerCIDRsOptions { +func (options *ListVPNGatewayConnectionsOptions) SetHeaders(param map[string]string) *ListVPNGatewayConnectionsOptions { options.Headers = param return options } -// ListVPNGatewayConnectionsOptions : The ListVPNGatewayConnections options. -type ListVPNGatewayConnectionsOptions struct { +// ListVPNGatewayConnectionsPeerCIDRsOptions : The ListVPNGatewayConnectionsPeerCIDRs options. +type ListVPNGatewayConnectionsPeerCIDRsOptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` - // Filters the collection to VPN gateway connections with a `status` property matching the specified value. - Status *string `json:"status,omitempty"` + // The VPN gateway connection identifier. + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string } -// Constants associated with the ListVPNGatewayConnectionsOptions.Status property. -// Filters the collection to VPN gateway connections with a `status` property matching the specified value. -const ( - ListVPNGatewayConnectionsOptionsStatusDownConst = "down" - ListVPNGatewayConnectionsOptionsStatusUpConst = "up" -) - -// NewListVPNGatewayConnectionsOptions : Instantiate ListVPNGatewayConnectionsOptions -func (*VpcV1) NewListVPNGatewayConnectionsOptions(vpnGatewayID string) *ListVPNGatewayConnectionsOptions { - return &ListVPNGatewayConnectionsOptions{ +// NewListVPNGatewayConnectionsPeerCIDRsOptions : Instantiate ListVPNGatewayConnectionsPeerCIDRsOptions +func (*VpcV1) NewListVPNGatewayConnectionsPeerCIDRsOptions(vpnGatewayID string, id string) *ListVPNGatewayConnectionsPeerCIDRsOptions { + return &ListVPNGatewayConnectionsPeerCIDRsOptions{ VPNGatewayID: core.StringPtr(vpnGatewayID), + ID: core.StringPtr(id), } } // SetVPNGatewayID : Allow user to set VPNGatewayID -func (_options *ListVPNGatewayConnectionsOptions) SetVPNGatewayID(vpnGatewayID string) *ListVPNGatewayConnectionsOptions { +func (_options *ListVPNGatewayConnectionsPeerCIDRsOptions) SetVPNGatewayID(vpnGatewayID string) *ListVPNGatewayConnectionsPeerCIDRsOptions { _options.VPNGatewayID = core.StringPtr(vpnGatewayID) return _options } -// SetStatus : Allow user to set Status -func (_options *ListVPNGatewayConnectionsOptions) SetStatus(status string) *ListVPNGatewayConnectionsOptions { - _options.Status = core.StringPtr(status) +// SetID : Allow user to set ID +func (_options *ListVPNGatewayConnectionsPeerCIDRsOptions) SetID(id string) *ListVPNGatewayConnectionsPeerCIDRsOptions { + _options.ID = core.StringPtr(id) return _options } // SetHeaders : Allow user to set Headers -func (options *ListVPNGatewayConnectionsOptions) SetHeaders(param map[string]string) *ListVPNGatewayConnectionsOptions { +func (options *ListVPNGatewayConnectionsPeerCIDRsOptions) SetHeaders(param map[string]string) *ListVPNGatewayConnectionsPeerCIDRsOptions { options.Headers = param return options } @@ -59543,98 +64946,122 @@ func UnmarshalLoadBalancer(m map[string]json.RawMessage, result interface{}) (er obj := new(LoadBalancer) err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "dns", &obj.Dns, UnmarshalLoadBalancerDns) if err != nil { + err = core.SDKErrorf(err, "", "dns-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "hostname", &obj.Hostname) if err != nil { + err = core.SDKErrorf(err, "", "hostname-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "instance_groups_supported", &obj.InstanceGroupsSupported) if err != nil { + err = core.SDKErrorf(err, "", "instance_groups_supported-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "is_public", &obj.IsPublic) if err != nil { + err = core.SDKErrorf(err, "", "is_public-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "listeners", &obj.Listeners, UnmarshalLoadBalancerListenerReference) if err != nil { + err = core.SDKErrorf(err, "", "listeners-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "logging", &obj.Logging, UnmarshalLoadBalancerLogging) if err != nil { + err = core.SDKErrorf(err, "", "logging-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "operating_status", &obj.OperatingStatus) if err != nil { + err = core.SDKErrorf(err, "", "operating_status-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "pools", &obj.Pools, UnmarshalLoadBalancerPoolReference) if err != nil { + err = core.SDKErrorf(err, "", "pools-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "private_ips", &obj.PrivateIps, UnmarshalLoadBalancerPrivateIpsItem) if err != nil { + err = core.SDKErrorf(err, "", "private_ips-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalLoadBalancerProfileReference) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "provisioning_status", &obj.ProvisioningStatus) if err != nil { + err = core.SDKErrorf(err, "", "provisioning_status-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "public_ips", &obj.PublicIps, UnmarshalIP) if err != nil { + err = core.SDKErrorf(err, "", "public_ips-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "route_mode", &obj.RouteMode) if err != nil { + err = core.SDKErrorf(err, "", "route_mode-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "security_groups-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "security_groups_supported", &obj.SecurityGroupsSupported) if err != nil { + err = core.SDKErrorf(err, "", "security_groups_supported-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnets", &obj.Subnets, UnmarshalSubnetReference) if err != nil { + err = core.SDKErrorf(err, "", "subnets-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "udp_supported", &obj.UDPSupported) if err != nil { + err = core.SDKErrorf(err, "", "udp_supported-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -59665,22 +65092,27 @@ func UnmarshalLoadBalancerCollection(m map[string]json.RawMessage, result interf obj := new(LoadBalancerCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalLoadBalancerCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "load_balancers", &obj.LoadBalancers, UnmarshalLoadBalancer) if err != nil { + err = core.SDKErrorf(err, "", "load_balancers-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalLoadBalancerCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -59693,8 +65125,11 @@ func (resp *LoadBalancerCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -59710,6 +65145,7 @@ func UnmarshalLoadBalancerCollectionFirst(m map[string]json.RawMessage, result i obj := new(LoadBalancerCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -59727,6 +65163,7 @@ func UnmarshalLoadBalancerCollectionNext(m map[string]json.RawMessage, result in obj := new(LoadBalancerCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -59750,10 +65187,12 @@ func UnmarshalLoadBalancerDns(m map[string]json.RawMessage, result interface{}) obj := new(LoadBalancerDns) err = core.UnmarshalModel(m, "instance", &obj.Instance, UnmarshalDnsInstanceReference) if err != nil { + err = core.SDKErrorf(err, "", "instance-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalDnsZoneReference) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -59782,10 +65221,12 @@ func UnmarshalLoadBalancerDnsPatch(m map[string]json.RawMessage, result interfac obj := new(LoadBalancerDnsPatch) err = core.UnmarshalModel(m, "instance", &obj.Instance, UnmarshalDnsInstanceIdentity) if err != nil { + err = core.SDKErrorf(err, "", "instance-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalDnsZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -59816,6 +65257,9 @@ func (*VpcV1) NewLoadBalancerDnsPrototype(instance DnsInstanceIdentityIntf, zone Zone: zone, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -59824,10 +65268,12 @@ func UnmarshalLoadBalancerDnsPrototype(m map[string]json.RawMessage, result inte obj := new(LoadBalancerDnsPrototype) err = core.UnmarshalModel(m, "instance", &obj.Instance, UnmarshalDnsInstanceIdentity) if err != nil { + err = core.SDKErrorf(err, "", "instance-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalDnsZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -59863,14 +65309,17 @@ func UnmarshalLoadBalancerIdentity(m map[string]json.RawMessage, result interfac obj := new(LoadBalancerIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -59976,62 +65425,77 @@ func UnmarshalLoadBalancerListener(m map[string]json.RawMessage, result interfac obj := new(LoadBalancerListener) err = core.UnmarshalPrimitive(m, "accept_proxy_protocol", &obj.AcceptProxyProtocol) if err != nil { + err = core.SDKErrorf(err, "", "accept_proxy_protocol-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "certificate_instance", &obj.CertificateInstance, UnmarshalCertificateInstanceReference) if err != nil { + err = core.SDKErrorf(err, "", "certificate_instance-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "connection_limit", &obj.ConnectionLimit) if err != nil { + err = core.SDKErrorf(err, "", "connection_limit-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_pool", &obj.DefaultPool, UnmarshalLoadBalancerPoolReference) if err != nil { + err = core.SDKErrorf(err, "", "default_pool-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "https_redirect", &obj.HTTPSRedirect, UnmarshalLoadBalancerListenerHTTPSRedirect) if err != nil { + err = core.SDKErrorf(err, "", "https_redirect-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "idle_connection_timeout", &obj.IdleConnectionTimeout) if err != nil { + err = core.SDKErrorf(err, "", "idle_connection_timeout-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "policies", &obj.Policies, UnmarshalLoadBalancerListenerPolicyReference) if err != nil { + err = core.SDKErrorf(err, "", "policies-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "port", &obj.Port) if err != nil { + err = core.SDKErrorf(err, "", "port-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "port_max", &obj.PortMax) if err != nil { + err = core.SDKErrorf(err, "", "port_max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "port_min", &obj.PortMin) if err != nil { + err = core.SDKErrorf(err, "", "port_min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { + err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "provisioning_status", &obj.ProvisioningStatus) if err != nil { + err = core.SDKErrorf(err, "", "provisioning_status-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -60049,6 +65513,7 @@ func UnmarshalLoadBalancerListenerCollection(m map[string]json.RawMessage, resul obj := new(LoadBalancerListenerCollection) err = core.UnmarshalModel(m, "listeners", &obj.Listeners, UnmarshalLoadBalancerListener) if err != nil { + err = core.SDKErrorf(err, "", "listeners-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -60088,10 +65553,12 @@ func UnmarshalLoadBalancerListenerDefaultPoolPatch(m map[string]json.RawMessage, obj := new(LoadBalancerListenerDefaultPoolPatch) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -60114,14 +65581,17 @@ func UnmarshalLoadBalancerListenerHTTPSRedirect(m map[string]json.RawMessage, re obj := new(LoadBalancerListenerHTTPSRedirect) err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode) if err != nil { + err = core.SDKErrorf(err, "", "http_status_code-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "listener", &obj.Listener, UnmarshalLoadBalancerListenerReference) if err != nil { + err = core.SDKErrorf(err, "", "listener-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "uri", &obj.URI) if err != nil { + err = core.SDKErrorf(err, "", "uri-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -60145,14 +65615,17 @@ func UnmarshalLoadBalancerListenerHTTPSRedirectPatch(m map[string]json.RawMessag obj := new(LoadBalancerListenerHTTPSRedirectPatch) err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode) if err != nil { + err = core.SDKErrorf(err, "", "http_status_code-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "listener", &obj.Listener, UnmarshalLoadBalancerListenerIdentity) if err != nil { + err = core.SDKErrorf(err, "", "listener-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "uri", &obj.URI) if err != nil { + err = core.SDKErrorf(err, "", "uri-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -60178,6 +65651,9 @@ func (*VpcV1) NewLoadBalancerListenerHTTPSRedirectPrototype(httpStatusCode int64 Listener: listener, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -60186,14 +65662,17 @@ func UnmarshalLoadBalancerListenerHTTPSRedirectPrototype(m map[string]json.RawMe obj := new(LoadBalancerListenerHTTPSRedirectPrototype) err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode) if err != nil { + err = core.SDKErrorf(err, "", "http_status_code-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "listener", &obj.Listener, UnmarshalLoadBalancerListenerIdentity) if err != nil { + err = core.SDKErrorf(err, "", "listener-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "uri", &obj.URI) if err != nil { + err = core.SDKErrorf(err, "", "uri-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -60225,10 +65704,12 @@ func UnmarshalLoadBalancerListenerIdentity(m map[string]json.RawMessage, result obj := new(LoadBalancerListenerIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -60339,42 +65820,52 @@ func UnmarshalLoadBalancerListenerPatch(m map[string]json.RawMessage, result int obj := new(LoadBalancerListenerPatch) err = core.UnmarshalPrimitive(m, "accept_proxy_protocol", &obj.AcceptProxyProtocol) if err != nil { + err = core.SDKErrorf(err, "", "accept_proxy_protocol-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "certificate_instance", &obj.CertificateInstance, UnmarshalCertificateInstanceIdentity) if err != nil { + err = core.SDKErrorf(err, "", "certificate_instance-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "connection_limit", &obj.ConnectionLimit) if err != nil { + err = core.SDKErrorf(err, "", "connection_limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_pool", &obj.DefaultPool, UnmarshalLoadBalancerListenerDefaultPoolPatch) if err != nil { + err = core.SDKErrorf(err, "", "default_pool-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "https_redirect", &obj.HTTPSRedirect, UnmarshalLoadBalancerListenerHTTPSRedirectPatch) if err != nil { + err = core.SDKErrorf(err, "", "https_redirect-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "idle_connection_timeout", &obj.IdleConnectionTimeout) if err != nil { + err = core.SDKErrorf(err, "", "idle_connection_timeout-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "port", &obj.Port) if err != nil { + err = core.SDKErrorf(err, "", "port-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "port_max", &obj.PortMax) if err != nil { + err = core.SDKErrorf(err, "", "port_max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "port_min", &obj.PortMin) if err != nil { + err = core.SDKErrorf(err, "", "port_min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { + err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -60388,6 +65879,9 @@ func (loadBalancerListenerPatch *LoadBalancerListenerPatch) AsPatch() (_patch ma if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -60476,38 +65970,47 @@ func UnmarshalLoadBalancerListenerPolicy(m map[string]json.RawMessage, result in obj := new(LoadBalancerListenerPolicy) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { + err = core.SDKErrorf(err, "", "action-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "priority", &obj.Priority) if err != nil { + err = core.SDKErrorf(err, "", "priority-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "provisioning_status", &obj.ProvisioningStatus) if err != nil { + err = core.SDKErrorf(err, "", "provisioning_status-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "rules", &obj.Rules, UnmarshalLoadBalancerListenerPolicyRuleReference) if err != nil { + err = core.SDKErrorf(err, "", "rules-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalLoadBalancerListenerPolicyTarget) if err != nil { + err = core.SDKErrorf(err, "", "target-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -60525,6 +66028,7 @@ func UnmarshalLoadBalancerListenerPolicyCollection(m map[string]json.RawMessage, obj := new(LoadBalancerListenerPolicyCollection) err = core.UnmarshalModel(m, "policies", &obj.Policies, UnmarshalLoadBalancerListenerPolicy) if err != nil { + err = core.SDKErrorf(err, "", "policies-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -60552,14 +66056,17 @@ func UnmarshalLoadBalancerListenerPolicyPatch(m map[string]json.RawMessage, resu obj := new(LoadBalancerListenerPolicyPatch) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "priority", &obj.Priority) if err != nil { + err = core.SDKErrorf(err, "", "priority-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalLoadBalancerListenerPolicyTargetPatch) if err != nil { + err = core.SDKErrorf(err, "", "target-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -60573,6 +66080,9 @@ func (loadBalancerListenerPolicyPatch *LoadBalancerListenerPolicyPatch) AsPatch( if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -60635,6 +66145,9 @@ func (*VpcV1) NewLoadBalancerListenerPolicyPrototype(action string, priority int Priority: core.Int64Ptr(priority), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -60643,22 +66156,27 @@ func UnmarshalLoadBalancerListenerPolicyPrototype(m map[string]json.RawMessage, obj := new(LoadBalancerListenerPolicyPrototype) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { + err = core.SDKErrorf(err, "", "action-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "priority", &obj.Priority) if err != nil { + err = core.SDKErrorf(err, "", "priority-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "rules", &obj.Rules, UnmarshalLoadBalancerListenerPolicyRulePrototype) if err != nil { + err = core.SDKErrorf(err, "", "rules-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalLoadBalancerListenerPolicyTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "target-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -60687,18 +66205,22 @@ func UnmarshalLoadBalancerListenerPolicyReference(m map[string]json.RawMessage, obj := new(LoadBalancerListenerPolicyReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalLoadBalancerListenerPolicyReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -60717,6 +66239,7 @@ func UnmarshalLoadBalancerListenerPolicyReferenceDeleted(m map[string]json.RawMe obj := new(LoadBalancerListenerPolicyReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -60802,34 +66325,42 @@ func UnmarshalLoadBalancerListenerPolicyRule(m map[string]json.RawMessage, resul obj := new(LoadBalancerListenerPolicyRule) err = core.UnmarshalPrimitive(m, "condition", &obj.Condition) if err != nil { + err = core.SDKErrorf(err, "", "condition-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "field", &obj.Field) if err != nil { + err = core.SDKErrorf(err, "", "field-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "provisioning_status", &obj.ProvisioningStatus) if err != nil { + err = core.SDKErrorf(err, "", "provisioning_status-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -60847,6 +66378,7 @@ func UnmarshalLoadBalancerListenerPolicyRuleCollection(m map[string]json.RawMess obj := new(LoadBalancerListenerPolicyRuleCollection) err = core.UnmarshalModel(m, "rules", &obj.Rules, UnmarshalLoadBalancerListenerPolicyRule) if err != nil { + err = core.SDKErrorf(err, "", "rules-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -60904,18 +66436,22 @@ func UnmarshalLoadBalancerListenerPolicyRulePatch(m map[string]json.RawMessage, obj := new(LoadBalancerListenerPolicyRulePatch) err = core.UnmarshalPrimitive(m, "condition", &obj.Condition) if err != nil { + err = core.SDKErrorf(err, "", "condition-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "field", &obj.Field) if err != nil { + err = core.SDKErrorf(err, "", "field-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -60929,6 +66465,9 @@ func (loadBalancerListenerPolicyRulePatch *LoadBalancerListenerPolicyRulePatch) if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -60986,6 +66525,9 @@ func (*VpcV1) NewLoadBalancerListenerPolicyRulePrototype(condition string, typeV Value: core.StringPtr(value), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -60994,18 +66536,22 @@ func UnmarshalLoadBalancerListenerPolicyRulePrototype(m map[string]json.RawMessa obj := new(LoadBalancerListenerPolicyRulePrototype) err = core.UnmarshalPrimitive(m, "condition", &obj.Condition) if err != nil { + err = core.SDKErrorf(err, "", "condition-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "field", &obj.Field) if err != nil { + err = core.SDKErrorf(err, "", "field-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -61030,14 +66576,17 @@ func UnmarshalLoadBalancerListenerPolicyRuleReference(m map[string]json.RawMessa obj := new(LoadBalancerListenerPolicyRuleReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalLoadBalancerListenerPolicyRuleReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -61056,6 +66605,7 @@ func UnmarshalLoadBalancerListenerPolicyRuleReferenceDeleted(m map[string]json.R obj := new(LoadBalancerListenerPolicyRuleReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -61109,34 +66659,42 @@ func UnmarshalLoadBalancerListenerPolicyTarget(m map[string]json.RawMessage, res obj := new(LoadBalancerListenerPolicyTarget) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalLoadBalancerPoolReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode) if err != nil { + err = core.SDKErrorf(err, "", "http_status_code-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "listener", &obj.Listener, UnmarshalLoadBalancerListenerReference) if err != nil { + err = core.SDKErrorf(err, "", "listener-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "uri", &obj.URI) if err != nil { + err = core.SDKErrorf(err, "", "uri-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "url", &obj.URL) if err != nil { + err = core.SDKErrorf(err, "", "url-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -61184,26 +66742,32 @@ func UnmarshalLoadBalancerListenerPolicyTargetPatch(m map[string]json.RawMessage obj := new(LoadBalancerListenerPolicyTargetPatch) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode) if err != nil { + err = core.SDKErrorf(err, "", "http_status_code-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "listener", &obj.Listener, UnmarshalLoadBalancerListenerIdentity) if err != nil { + err = core.SDKErrorf(err, "", "listener-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "uri", &obj.URI) if err != nil { + err = core.SDKErrorf(err, "", "uri-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "url", &obj.URL) if err != nil { + err = core.SDKErrorf(err, "", "url-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -61251,26 +66815,32 @@ func UnmarshalLoadBalancerListenerPolicyTargetPrototype(m map[string]json.RawMes obj := new(LoadBalancerListenerPolicyTargetPrototype) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode) if err != nil { + err = core.SDKErrorf(err, "", "http_status_code-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "listener", &obj.Listener, UnmarshalLoadBalancerListenerIdentity) if err != nil { + err = core.SDKErrorf(err, "", "listener-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "uri", &obj.URI) if err != nil { + err = core.SDKErrorf(err, "", "uri-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "url", &obj.URL) if err != nil { + err = core.SDKErrorf(err, "", "url-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -61381,6 +66951,9 @@ func (*VpcV1) NewLoadBalancerListenerPrototypeLoadBalancerContext(protocol strin Protocol: core.StringPtr(protocol), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -61389,42 +66962,52 @@ func UnmarshalLoadBalancerListenerPrototypeLoadBalancerContext(m map[string]json obj := new(LoadBalancerListenerPrototypeLoadBalancerContext) err = core.UnmarshalPrimitive(m, "accept_proxy_protocol", &obj.AcceptProxyProtocol) if err != nil { + err = core.SDKErrorf(err, "", "accept_proxy_protocol-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "certificate_instance", &obj.CertificateInstance, UnmarshalCertificateInstanceIdentity) if err != nil { + err = core.SDKErrorf(err, "", "certificate_instance-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "connection_limit", &obj.ConnectionLimit) if err != nil { + err = core.SDKErrorf(err, "", "connection_limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_pool", &obj.DefaultPool, UnmarshalLoadBalancerPoolIdentityByName) if err != nil { + err = core.SDKErrorf(err, "", "default_pool-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "https_redirect", &obj.HTTPSRedirect, UnmarshalLoadBalancerListenerHTTPSRedirectPrototype) if err != nil { + err = core.SDKErrorf(err, "", "https_redirect-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "idle_connection_timeout", &obj.IdleConnectionTimeout) if err != nil { + err = core.SDKErrorf(err, "", "idle_connection_timeout-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "port", &obj.Port) if err != nil { + err = core.SDKErrorf(err, "", "port-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "port_max", &obj.PortMax) if err != nil { + err = core.SDKErrorf(err, "", "port_max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "port_min", &obj.PortMin) if err != nil { + err = core.SDKErrorf(err, "", "port_min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { + err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -61449,14 +67032,17 @@ func UnmarshalLoadBalancerListenerReference(m map[string]json.RawMessage, result obj := new(LoadBalancerListenerReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalLoadBalancerListenerReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -61475,6 +67061,7 @@ func UnmarshalLoadBalancerListenerReferenceDeleted(m map[string]json.RawMessage, obj := new(LoadBalancerListenerReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -61492,6 +67079,7 @@ func UnmarshalLoadBalancerLogging(m map[string]json.RawMessage, result interface obj := new(LoadBalancerLogging) err = core.UnmarshalModel(m, "datapath", &obj.Datapath, UnmarshalLoadBalancerLoggingDatapath) if err != nil { + err = core.SDKErrorf(err, "", "datapath-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -61509,6 +67097,7 @@ func UnmarshalLoadBalancerLoggingDatapath(m map[string]json.RawMessage, result i obj := new(LoadBalancerLoggingDatapath) err = core.UnmarshalPrimitive(m, "active", &obj.Active) if err != nil { + err = core.SDKErrorf(err, "", "active-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -61526,6 +67115,7 @@ func UnmarshalLoadBalancerLoggingDatapathPatch(m map[string]json.RawMessage, res obj := new(LoadBalancerLoggingDatapathPatch) err = core.UnmarshalPrimitive(m, "active", &obj.Active) if err != nil { + err = core.SDKErrorf(err, "", "active-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -61543,6 +67133,7 @@ func UnmarshalLoadBalancerLoggingDatapathPrototype(m map[string]json.RawMessage, obj := new(LoadBalancerLoggingDatapathPrototype) err = core.UnmarshalPrimitive(m, "active", &obj.Active) if err != nil { + err = core.SDKErrorf(err, "", "active-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -61560,6 +67151,7 @@ func UnmarshalLoadBalancerLoggingPatch(m map[string]json.RawMessage, result inte obj := new(LoadBalancerLoggingPatch) err = core.UnmarshalModel(m, "datapath", &obj.Datapath, UnmarshalLoadBalancerLoggingDatapathPatch) if err != nil { + err = core.SDKErrorf(err, "", "datapath-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -61577,6 +67169,7 @@ func UnmarshalLoadBalancerLoggingPrototype(m map[string]json.RawMessage, result obj := new(LoadBalancerLoggingPrototype) err = core.UnmarshalModel(m, "datapath", &obj.Datapath, UnmarshalLoadBalancerLoggingDatapathPrototype) if err != nil { + err = core.SDKErrorf(err, "", "datapath-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -61615,18 +67208,22 @@ func UnmarshalLoadBalancerPatch(m map[string]json.RawMessage, result interface{} obj := new(LoadBalancerPatch) err = core.UnmarshalModel(m, "dns", &obj.Dns, UnmarshalLoadBalancerDnsPatch) if err != nil { + err = core.SDKErrorf(err, "", "dns-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "logging", &obj.Logging, UnmarshalLoadBalancerLoggingPatch) if err != nil { + err = core.SDKErrorf(err, "", "logging-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnets", &obj.Subnets, UnmarshalSubnetIdentity) if err != nil { + err = core.SDKErrorf(err, "", "subnets-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -61640,6 +67237,9 @@ func (loadBalancerPatch *LoadBalancerPatch) AsPatch() (_patch map[string]interfa if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -61744,50 +67344,62 @@ func UnmarshalLoadBalancerPool(m map[string]json.RawMessage, result interface{}) obj := new(LoadBalancerPool) err = core.UnmarshalPrimitive(m, "algorithm", &obj.Algorithm) if err != nil { + err = core.SDKErrorf(err, "", "algorithm-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "health_monitor", &obj.HealthMonitor, UnmarshalLoadBalancerPoolHealthMonitor) if err != nil { + err = core.SDKErrorf(err, "", "health_monitor-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "instance_group", &obj.InstanceGroup, UnmarshalInstanceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "instance_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "members", &obj.Members, UnmarshalLoadBalancerPoolMemberReference) if err != nil { + err = core.SDKErrorf(err, "", "members-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { + err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "provisioning_status", &obj.ProvisioningStatus) if err != nil { + err = core.SDKErrorf(err, "", "provisioning_status-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "proxy_protocol", &obj.ProxyProtocol) if err != nil { + err = core.SDKErrorf(err, "", "proxy_protocol-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "session_persistence", &obj.SessionPersistence, UnmarshalLoadBalancerPoolSessionPersistence) if err != nil { + err = core.SDKErrorf(err, "", "session_persistence-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -61805,6 +67417,7 @@ func UnmarshalLoadBalancerPoolCollection(m map[string]json.RawMessage, result in obj := new(LoadBalancerPoolCollection) err = core.UnmarshalModel(m, "pools", &obj.Pools, UnmarshalLoadBalancerPool) if err != nil { + err = core.SDKErrorf(err, "", "pools-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -61855,26 +67468,32 @@ func UnmarshalLoadBalancerPoolHealthMonitor(m map[string]json.RawMessage, result obj := new(LoadBalancerPoolHealthMonitor) err = core.UnmarshalPrimitive(m, "delay", &obj.Delay) if err != nil { + err = core.SDKErrorf(err, "", "delay-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max_retries", &obj.MaxRetries) if err != nil { + err = core.SDKErrorf(err, "", "max_retries-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "port", &obj.Port) if err != nil { + err = core.SDKErrorf(err, "", "port-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "timeout", &obj.Timeout) if err != nil { + err = core.SDKErrorf(err, "", "timeout-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "url_path", &obj.URLPath) if err != nil { + err = core.SDKErrorf(err, "", "url_path-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -61925,6 +67544,9 @@ func (*VpcV1) NewLoadBalancerPoolHealthMonitorPatch(delay int64, maxRetries int6 Type: core.StringPtr(typeVar), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -61933,26 +67555,32 @@ func UnmarshalLoadBalancerPoolHealthMonitorPatch(m map[string]json.RawMessage, r obj := new(LoadBalancerPoolHealthMonitorPatch) err = core.UnmarshalPrimitive(m, "delay", &obj.Delay) if err != nil { + err = core.SDKErrorf(err, "", "delay-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max_retries", &obj.MaxRetries) if err != nil { + err = core.SDKErrorf(err, "", "max_retries-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "port", &obj.Port) if err != nil { + err = core.SDKErrorf(err, "", "port-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "timeout", &obj.Timeout) if err != nil { + err = core.SDKErrorf(err, "", "timeout-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "url_path", &obj.URLPath) if err != nil { + err = core.SDKErrorf(err, "", "url_path-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -62001,6 +67629,9 @@ func (*VpcV1) NewLoadBalancerPoolHealthMonitorPrototype(delay int64, maxRetries Type: core.StringPtr(typeVar), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -62009,26 +67640,32 @@ func UnmarshalLoadBalancerPoolHealthMonitorPrototype(m map[string]json.RawMessag obj := new(LoadBalancerPoolHealthMonitorPrototype) err = core.UnmarshalPrimitive(m, "delay", &obj.Delay) if err != nil { + err = core.SDKErrorf(err, "", "delay-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max_retries", &obj.MaxRetries) if err != nil { + err = core.SDKErrorf(err, "", "max_retries-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "port", &obj.Port) if err != nil { + err = core.SDKErrorf(err, "", "port-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "timeout", &obj.Timeout) if err != nil { + err = core.SDKErrorf(err, "", "timeout-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "url_path", &obj.URLPath) if err != nil { + err = core.SDKErrorf(err, "", "url_path-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -62060,10 +67697,12 @@ func UnmarshalLoadBalancerPoolIdentity(m map[string]json.RawMessage, result inte obj := new(LoadBalancerPoolIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -62082,6 +67721,9 @@ func (*VpcV1) NewLoadBalancerPoolIdentityByName(name string) (_model *LoadBalanc Name: core.StringPtr(name), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -62090,6 +67732,7 @@ func UnmarshalLoadBalancerPoolIdentityByName(m map[string]json.RawMessage, resul obj := new(LoadBalancerPoolIdentityByName) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -62161,34 +67804,42 @@ func UnmarshalLoadBalancerPoolMember(m map[string]json.RawMessage, result interf obj := new(LoadBalancerPoolMember) err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "health", &obj.Health) if err != nil { + err = core.SDKErrorf(err, "", "health-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "port", &obj.Port) if err != nil { + err = core.SDKErrorf(err, "", "port-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "provisioning_status", &obj.ProvisioningStatus) if err != nil { + err = core.SDKErrorf(err, "", "provisioning_status-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalLoadBalancerPoolMemberTarget) if err != nil { + err = core.SDKErrorf(err, "", "target-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "weight", &obj.Weight) if err != nil { + err = core.SDKErrorf(err, "", "weight-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -62206,6 +67857,7 @@ func UnmarshalLoadBalancerPoolMemberCollection(m map[string]json.RawMessage, res obj := new(LoadBalancerPoolMemberCollection) err = core.UnmarshalModel(m, "members", &obj.Members, UnmarshalLoadBalancerPoolMember) if err != nil { + err = core.SDKErrorf(err, "", "members-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -62240,14 +67892,17 @@ func UnmarshalLoadBalancerPoolMemberPatch(m map[string]json.RawMessage, result i obj := new(LoadBalancerPoolMemberPatch) err = core.UnmarshalPrimitive(m, "port", &obj.Port) if err != nil { + err = core.SDKErrorf(err, "", "port-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalLoadBalancerPoolMemberTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "target-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "weight", &obj.Weight) if err != nil { + err = core.SDKErrorf(err, "", "weight-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -62261,6 +67916,9 @@ func (loadBalancerPoolMemberPatch *LoadBalancerPoolMemberPatch) AsPatch() (_patc if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -62294,6 +67952,9 @@ func (*VpcV1) NewLoadBalancerPoolMemberPrototype(port int64, target LoadBalancer Target: target, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -62302,14 +67963,17 @@ func UnmarshalLoadBalancerPoolMemberPrototype(m map[string]json.RawMessage, resu obj := new(LoadBalancerPoolMemberPrototype) err = core.UnmarshalPrimitive(m, "port", &obj.Port) if err != nil { + err = core.SDKErrorf(err, "", "port-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalLoadBalancerPoolMemberTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "target-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "weight", &obj.Weight) if err != nil { + err = core.SDKErrorf(err, "", "weight-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -62334,14 +67998,17 @@ func UnmarshalLoadBalancerPoolMemberReference(m map[string]json.RawMessage, resu obj := new(LoadBalancerPoolMemberReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalLoadBalancerPoolMemberReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -62360,6 +68027,7 @@ func UnmarshalLoadBalancerPoolMemberReferenceDeleted(m map[string]json.RawMessag obj := new(LoadBalancerPoolMemberReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -62409,26 +68077,32 @@ func UnmarshalLoadBalancerPoolMemberTarget(m map[string]json.RawMessage, result obj := new(LoadBalancerPoolMemberTarget) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -62471,18 +68145,22 @@ func UnmarshalLoadBalancerPoolMemberTargetPrototype(m map[string]json.RawMessage obj := new(LoadBalancerPoolMemberTargetPrototype) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -62564,26 +68242,32 @@ func UnmarshalLoadBalancerPoolPatch(m map[string]json.RawMessage, result interfa obj := new(LoadBalancerPoolPatch) err = core.UnmarshalPrimitive(m, "algorithm", &obj.Algorithm) if err != nil { + err = core.SDKErrorf(err, "", "algorithm-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "health_monitor", &obj.HealthMonitor, UnmarshalLoadBalancerPoolHealthMonitorPatch) if err != nil { + err = core.SDKErrorf(err, "", "health_monitor-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { + err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "proxy_protocol", &obj.ProxyProtocol) if err != nil { + err = core.SDKErrorf(err, "", "proxy_protocol-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "session_persistence", &obj.SessionPersistence, UnmarshalLoadBalancerPoolSessionPersistencePatch) if err != nil { + err = core.SDKErrorf(err, "", "session_persistence-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -62597,6 +68281,9 @@ func (loadBalancerPoolPatch *LoadBalancerPoolPatch) AsPatch() (_patch map[string if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -62675,6 +68362,9 @@ func (*VpcV1) NewLoadBalancerPoolPrototype(algorithm string, healthMonitor *Load Protocol: core.StringPtr(protocol), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -62683,30 +68373,37 @@ func UnmarshalLoadBalancerPoolPrototype(m map[string]json.RawMessage, result int obj := new(LoadBalancerPoolPrototype) err = core.UnmarshalPrimitive(m, "algorithm", &obj.Algorithm) if err != nil { + err = core.SDKErrorf(err, "", "algorithm-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "health_monitor", &obj.HealthMonitor, UnmarshalLoadBalancerPoolHealthMonitorPrototype) if err != nil { + err = core.SDKErrorf(err, "", "health_monitor-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "members", &obj.Members, UnmarshalLoadBalancerPoolMemberPrototype) if err != nil { + err = core.SDKErrorf(err, "", "members-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { + err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "proxy_protocol", &obj.ProxyProtocol) if err != nil { + err = core.SDKErrorf(err, "", "proxy_protocol-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "session_persistence", &obj.SessionPersistence, UnmarshalLoadBalancerPoolSessionPersistencePrototype) if err != nil { + err = core.SDKErrorf(err, "", "session_persistence-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -62734,18 +68431,22 @@ func UnmarshalLoadBalancerPoolReference(m map[string]json.RawMessage, result int obj := new(LoadBalancerPoolReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalLoadBalancerPoolReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -62764,6 +68465,7 @@ func UnmarshalLoadBalancerPoolReferenceDeleted(m map[string]json.RawMessage, res obj := new(LoadBalancerPoolReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -62801,10 +68503,12 @@ func UnmarshalLoadBalancerPoolSessionPersistence(m map[string]json.RawMessage, r obj := new(LoadBalancerPoolSessionPersistence) err = core.UnmarshalPrimitive(m, "cookie_name", &obj.CookieName) if err != nil { + err = core.SDKErrorf(err, "", "cookie_name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -62836,10 +68540,12 @@ func UnmarshalLoadBalancerPoolSessionPersistencePatch(m map[string]json.RawMessa obj := new(LoadBalancerPoolSessionPersistencePatch) err = core.UnmarshalPrimitive(m, "cookie_name", &obj.CookieName) if err != nil { + err = core.SDKErrorf(err, "", "cookie_name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -62872,6 +68578,9 @@ func (*VpcV1) NewLoadBalancerPoolSessionPersistencePrototype(typeVar string) (_m Type: core.StringPtr(typeVar), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -62880,10 +68589,12 @@ func UnmarshalLoadBalancerPoolSessionPersistencePrototype(m map[string]json.RawM obj := new(LoadBalancerPoolSessionPersistencePrototype) err = core.UnmarshalPrimitive(m, "cookie_name", &obj.CookieName) if err != nil { + err = core.SDKErrorf(err, "", "cookie_name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -62928,26 +68639,32 @@ func UnmarshalLoadBalancerPrivateIpsItem(m map[string]json.RawMessage, result in obj := new(LoadBalancerPrivateIpsItem) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalReservedIPReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -62995,34 +68712,42 @@ func UnmarshalLoadBalancerProfile(m map[string]json.RawMessage, result interface obj := new(LoadBalancerProfile) err = core.UnmarshalPrimitive(m, "family", &obj.Family) if err != nil { + err = core.SDKErrorf(err, "", "family-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "instance_groups_supported", &obj.InstanceGroupsSupported, UnmarshalLoadBalancerProfileInstanceGroupsSupported) if err != nil { + err = core.SDKErrorf(err, "", "instance_groups_supported-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "logging_supported", &obj.LoggingSupported, UnmarshalLoadBalancerProfileLoggingSupported) if err != nil { + err = core.SDKErrorf(err, "", "logging_supported-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "route_mode_supported", &obj.RouteModeSupported, UnmarshalLoadBalancerProfileRouteModeSupported) if err != nil { + err = core.SDKErrorf(err, "", "route_mode_supported-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "security_groups_supported", &obj.SecurityGroupsSupported, UnmarshalLoadBalancerProfileSecurityGroupsSupported) if err != nil { + err = core.SDKErrorf(err, "", "security_groups_supported-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "udp_supported", &obj.UDPSupported, UnmarshalLoadBalancerProfileUDPSupported) if err != nil { + err = core.SDKErrorf(err, "", "udp_supported-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -63053,22 +68778,27 @@ func UnmarshalLoadBalancerProfileCollection(m map[string]json.RawMessage, result obj := new(LoadBalancerProfileCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalLoadBalancerProfileCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalLoadBalancerProfileCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profiles", &obj.Profiles, UnmarshalLoadBalancerProfile) if err != nil { + err = core.SDKErrorf(err, "", "profiles-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -63081,8 +68811,11 @@ func (resp *LoadBalancerProfileCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -63098,6 +68831,7 @@ func UnmarshalLoadBalancerProfileCollectionFirst(m map[string]json.RawMessage, r obj := new(LoadBalancerProfileCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -63115,6 +68849,7 @@ func UnmarshalLoadBalancerProfileCollectionNext(m map[string]json.RawMessage, re obj := new(LoadBalancerProfileCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -63146,10 +68881,12 @@ func UnmarshalLoadBalancerProfileIdentity(m map[string]json.RawMessage, result i obj := new(LoadBalancerProfileIdentity) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -63187,10 +68924,12 @@ func UnmarshalLoadBalancerProfileInstanceGroupsSupported(m map[string]json.RawMe obj := new(LoadBalancerProfileInstanceGroupsSupported) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -63217,10 +68956,12 @@ func UnmarshalLoadBalancerProfileLoggingSupported(m map[string]json.RawMessage, obj := new(LoadBalancerProfileLoggingSupported) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -63257,14 +68998,17 @@ func UnmarshalLoadBalancerProfileReference(m map[string]json.RawMessage, result obj := new(LoadBalancerProfileReference) err = core.UnmarshalPrimitive(m, "family", &obj.Family) if err != nil { + err = core.SDKErrorf(err, "", "family-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -63302,10 +69046,12 @@ func UnmarshalLoadBalancerProfileRouteModeSupported(m map[string]json.RawMessage obj := new(LoadBalancerProfileRouteModeSupported) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -63343,10 +69089,12 @@ func UnmarshalLoadBalancerProfileSecurityGroupsSupported(m map[string]json.RawMe obj := new(LoadBalancerProfileSecurityGroupsSupported) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -63384,10 +69132,12 @@ func UnmarshalLoadBalancerProfileUDPSupported(m map[string]json.RawMessage, resu obj := new(LoadBalancerProfileUDPSupported) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -63406,6 +69156,7 @@ func UnmarshalLoadBalancerReferenceDeleted(m map[string]json.RawMessage, result obj := new(LoadBalancerReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -63432,18 +69183,22 @@ func UnmarshalLoadBalancerStatistics(m map[string]json.RawMessage, result interf obj := new(LoadBalancerStatistics) err = core.UnmarshalPrimitive(m, "active_connections", &obj.ActiveConnections) if err != nil { + err = core.SDKErrorf(err, "", "active_connections-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "connection_rate", &obj.ConnectionRate) if err != nil { + err = core.SDKErrorf(err, "", "connection_rate-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "data_processed_this_month", &obj.DataProcessedThisMonth) if err != nil { + err = core.SDKErrorf(err, "", "data_processed_this_month-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "throughput", &obj.Throughput) if err != nil { + err = core.SDKErrorf(err, "", "throughput-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -63485,38 +69240,47 @@ func UnmarshalNetworkACL(m map[string]json.RawMessage, result interface{}) (err obj := new(NetworkACL) err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "rules", &obj.Rules, UnmarshalNetworkACLRuleItem) if err != nil { + err = core.SDKErrorf(err, "", "rules-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnets", &obj.Subnets, UnmarshalSubnetReference) if err != nil { + err = core.SDKErrorf(err, "", "subnets-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -63547,22 +69311,27 @@ func UnmarshalNetworkACLCollection(m map[string]json.RawMessage, result interfac obj := new(NetworkACLCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalNetworkACLCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_acls", &obj.NetworkAcls, UnmarshalNetworkACL) if err != nil { + err = core.SDKErrorf(err, "", "network_acls-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalNetworkACLCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -63575,8 +69344,11 @@ func (resp *NetworkACLCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -63592,6 +69364,7 @@ func UnmarshalNetworkACLCollectionFirst(m map[string]json.RawMessage, result int obj := new(NetworkACLCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -63609,6 +69382,7 @@ func UnmarshalNetworkACLCollectionNext(m map[string]json.RawMessage, result inte obj := new(NetworkACLCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -63644,14 +69418,17 @@ func UnmarshalNetworkACLIdentity(m map[string]json.RawMessage, result interface{ obj := new(NetworkACLIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -63669,6 +69446,7 @@ func UnmarshalNetworkACLPatch(m map[string]json.RawMessage, result interface{}) obj := new(NetworkACLPatch) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -63682,6 +69460,9 @@ func (networkACLPatch *NetworkACLPatch) AsPatch() (_patch map[string]interface{} if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -63722,22 +69503,27 @@ func UnmarshalNetworkACLPrototype(m map[string]json.RawMessage, result interface obj := new(NetworkACLPrototype) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "rules", &obj.Rules, UnmarshalNetworkACLRulePrototypeNetworkACLContext) if err != nil { + err = core.SDKErrorf(err, "", "rules-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "source_network_acl", &obj.SourceNetworkACL, UnmarshalNetworkACLIdentity) if err != nil { + err = core.SDKErrorf(err, "", "source_network_acl-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -63768,22 +69554,27 @@ func UnmarshalNetworkACLReference(m map[string]json.RawMessage, result interface obj := new(NetworkACLReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalNetworkACLReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -63802,6 +69593,7 @@ func UnmarshalNetworkACLReferenceDeleted(m map[string]json.RawMessage, result in obj := new(NetworkACLReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -63913,23 +69705,37 @@ func UnmarshalNetworkACLRule(m map[string]json.RawMessage, result interface{}) ( var discValue string err = core.UnmarshalPrimitive(m, "protocol", &discValue) if err != nil { - err = fmt.Errorf("error unmarshalling discriminator property 'protocol': %s", err.Error()) + errMsg := fmt.Sprintf("error unmarshalling discriminator property 'protocol': %s", err.Error()) + err = core.SDKErrorf(err, errMsg, "discriminator-unmarshal-error", common.GetComponentInfo()) return } if discValue == "" { - err = fmt.Errorf("required discriminator property 'protocol' not found in JSON object") + err = core.SDKErrorf(err, "required discriminator property 'protocol' not found in JSON object", "missing-discriminator", common.GetComponentInfo()) return } if discValue == "all" { err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleNetworkACLRuleProtocolAll) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-NetworkACLRuleNetworkACLRuleProtocolAll-error", common.GetComponentInfo()) + } } else if discValue == "icmp" { err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleNetworkACLRuleProtocolIcmp) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-NetworkACLRuleNetworkACLRuleProtocolIcmp-error", common.GetComponentInfo()) + } } else if discValue == "tcp" { err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleNetworkACLRuleProtocolTcpudp) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-NetworkACLRuleNetworkACLRuleProtocolTcpudp-error", common.GetComponentInfo()) + } } else if discValue == "udp" { err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleNetworkACLRuleProtocolTcpudp) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-NetworkACLRuleNetworkACLRuleProtocolTcpudp-error", common.GetComponentInfo()) + } } else { - err = fmt.Errorf("unrecognized value for discriminator property 'protocol': %s", discValue) + errMsg := fmt.Sprintf("unrecognized value for discriminator property 'protocol': %s", discValue) + err = core.SDKErrorf(err, errMsg, "invalid-discriminator", common.GetComponentInfo()) } return } @@ -63961,10 +69767,12 @@ func UnmarshalNetworkACLRuleBeforePatch(m map[string]json.RawMessage, result int obj := new(NetworkACLRuleBeforePatch) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -63998,10 +69806,12 @@ func UnmarshalNetworkACLRuleBeforePrototype(m map[string]json.RawMessage, result obj := new(NetworkACLRuleBeforePrototype) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -64032,22 +69842,27 @@ func UnmarshalNetworkACLRuleCollection(m map[string]json.RawMessage, result inte obj := new(NetworkACLRuleCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalNetworkACLRuleCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalNetworkACLRuleCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "rules", &obj.Rules, UnmarshalNetworkACLRuleItem) if err != nil { + err = core.SDKErrorf(err, "", "rules-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -64060,8 +69875,11 @@ func (resp *NetworkACLRuleCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -64077,6 +69895,7 @@ func UnmarshalNetworkACLRuleCollectionFirst(m map[string]json.RawMessage, result obj := new(NetworkACLRuleCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -64094,6 +69913,7 @@ func UnmarshalNetworkACLRuleCollectionNext(m map[string]json.RawMessage, result obj := new(NetworkACLRuleCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -64206,23 +70026,37 @@ func UnmarshalNetworkACLRuleItem(m map[string]json.RawMessage, result interface{ var discValue string err = core.UnmarshalPrimitive(m, "protocol", &discValue) if err != nil { - err = fmt.Errorf("error unmarshalling discriminator property 'protocol': %s", err.Error()) + errMsg := fmt.Sprintf("error unmarshalling discriminator property 'protocol': %s", err.Error()) + err = core.SDKErrorf(err, errMsg, "discriminator-unmarshal-error", common.GetComponentInfo()) return } if discValue == "" { - err = fmt.Errorf("required discriminator property 'protocol' not found in JSON object") + err = core.SDKErrorf(err, "required discriminator property 'protocol' not found in JSON object", "missing-discriminator", common.GetComponentInfo()) return } if discValue == "all" { err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleItemNetworkACLRuleProtocolAll) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-NetworkACLRuleItemNetworkACLRuleProtocolAll-error", common.GetComponentInfo()) + } } else if discValue == "icmp" { err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleItemNetworkACLRuleProtocolIcmp) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-NetworkACLRuleItemNetworkACLRuleProtocolIcmp-error", common.GetComponentInfo()) + } } else if discValue == "tcp" { err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleItemNetworkACLRuleProtocolTcpudp) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-NetworkACLRuleItemNetworkACLRuleProtocolTcpudp-error", common.GetComponentInfo()) + } } else if discValue == "udp" { err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleItemNetworkACLRuleProtocolTcpudp) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-NetworkACLRuleItemNetworkACLRuleProtocolTcpudp-error", common.GetComponentInfo()) + } } else { - err = fmt.Errorf("unrecognized value for discriminator property 'protocol': %s", discValue) + errMsg := fmt.Sprintf("unrecognized value for discriminator property 'protocol': %s", discValue) + err = core.SDKErrorf(err, errMsg, "invalid-discriminator", common.GetComponentInfo()) } return } @@ -64303,54 +70137,67 @@ func UnmarshalNetworkACLRulePatch(m map[string]json.RawMessage, result interface obj := new(NetworkACLRulePatch) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { + err = core.SDKErrorf(err, "", "action-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleBeforePatch) if err != nil { + err = core.SDKErrorf(err, "", "before-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) if err != nil { + err = core.SDKErrorf(err, "", "destination-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "destination_port_max", &obj.DestinationPortMax) if err != nil { + err = core.SDKErrorf(err, "", "destination_port_max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "destination_port_min", &obj.DestinationPortMin) if err != nil { + err = core.SDKErrorf(err, "", "destination_port_min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { + err = core.SDKErrorf(err, "", "direction-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { + err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "source", &obj.Source) if err != nil { + err = core.SDKErrorf(err, "", "source-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "source_port_max", &obj.SourcePortMax) if err != nil { + err = core.SDKErrorf(err, "", "source_port_max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "source_port_min", &obj.SourcePortMin) if err != nil { + err = core.SDKErrorf(err, "", "source_port_min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -64364,6 +70211,9 @@ func (networkACLRulePatch *NetworkACLRulePatch) AsPatch() (_patch map[string]int if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -64466,23 +70316,37 @@ func UnmarshalNetworkACLRulePrototype(m map[string]json.RawMessage, result inter var discValue string err = core.UnmarshalPrimitive(m, "protocol", &discValue) if err != nil { - err = fmt.Errorf("error unmarshalling discriminator property 'protocol': %s", err.Error()) + errMsg := fmt.Sprintf("error unmarshalling discriminator property 'protocol': %s", err.Error()) + err = core.SDKErrorf(err, errMsg, "discriminator-unmarshal-error", common.GetComponentInfo()) return } if discValue == "" { - err = fmt.Errorf("required discriminator property 'protocol' not found in JSON object") + err = core.SDKErrorf(err, "required discriminator property 'protocol' not found in JSON object", "missing-discriminator", common.GetComponentInfo()) return } if discValue == "all" { err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype-error", common.GetComponentInfo()) + } } else if discValue == "icmp" { err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototype-error", common.GetComponentInfo()) + } } else if discValue == "tcp" { err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototype-error", common.GetComponentInfo()) + } } else if discValue == "udp" { err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototype-error", common.GetComponentInfo()) + } } else { - err = fmt.Errorf("unrecognized value for discriminator property 'protocol': %s", discValue) + errMsg := fmt.Sprintf("unrecognized value for discriminator property 'protocol': %s", discValue) + err = core.SDKErrorf(err, errMsg, "invalid-discriminator", common.GetComponentInfo()) } return } @@ -64581,23 +70445,37 @@ func UnmarshalNetworkACLRulePrototypeNetworkACLContext(m map[string]json.RawMess var discValue string err = core.UnmarshalPrimitive(m, "protocol", &discValue) if err != nil { - err = fmt.Errorf("error unmarshalling discriminator property 'protocol': %s", err.Error()) + errMsg := fmt.Sprintf("error unmarshalling discriminator property 'protocol': %s", err.Error()) + err = core.SDKErrorf(err, errMsg, "discriminator-unmarshal-error", common.GetComponentInfo()) return } if discValue == "" { - err = fmt.Errorf("required discriminator property 'protocol' not found in JSON object") + err = core.SDKErrorf(err, "required discriminator property 'protocol' not found in JSON object", "missing-discriminator", common.GetComponentInfo()) return } if discValue == "all" { err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype-error", common.GetComponentInfo()) + } } else if discValue == "icmp" { err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpPrototype-error", common.GetComponentInfo()) + } } else if discValue == "tcp" { err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototype-error", common.GetComponentInfo()) + } } else if discValue == "udp" { err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototype-error", common.GetComponentInfo()) + } } else { - err = fmt.Errorf("unrecognized value for discriminator property 'protocol': %s", discValue) + errMsg := fmt.Sprintf("unrecognized value for discriminator property 'protocol': %s", discValue) + err = core.SDKErrorf(err, errMsg, "invalid-discriminator", common.GetComponentInfo()) } return } @@ -64623,18 +70501,22 @@ func UnmarshalNetworkACLRuleReference(m map[string]json.RawMessage, result inter obj := new(NetworkACLRuleReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalNetworkACLRuleReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -64653,6 +70535,7 @@ func UnmarshalNetworkACLRuleReferenceDeleted(m map[string]json.RawMessage, resul obj := new(NetworkACLRuleReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -64783,54 +70666,67 @@ func UnmarshalNetworkInterface(m map[string]json.RawMessage, result interface{}) obj := new(NetworkInterface) err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing) if err != nil { + err = core.SDKErrorf(err, "", "allow_ip_spoofing-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "floating_ips", &obj.FloatingIps, UnmarshalFloatingIPReference) if err != nil { + err = core.SDKErrorf(err, "", "floating_ips-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "port_speed", &obj.PortSpeed) if err != nil { + err = core.SDKErrorf(err, "", "port_speed-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "security_groups-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -64881,30 +70777,37 @@ func UnmarshalNetworkInterfaceBareMetalServerContextReference(m map[string]json. obj := new(NetworkInterfaceBareMetalServerContextReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalNetworkInterfaceBareMetalServerContextReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -64923,6 +70826,7 @@ func UnmarshalNetworkInterfaceBareMetalServerContextReferenceDeleted(m map[strin obj := new(NetworkInterfaceBareMetalServerContextReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -64968,22 +70872,27 @@ func UnmarshalNetworkInterfaceIPPrototype(m map[string]json.RawMessage, result i obj := new(NetworkInterfaceIPPrototype) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { + err = core.SDKErrorf(err, "", "auto_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -65034,30 +70943,37 @@ func UnmarshalNetworkInterfaceInstanceContextReference(m map[string]json.RawMess obj := new(NetworkInterfaceInstanceContextReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalNetworkInterfaceInstanceContextReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -65076,6 +70992,7 @@ func UnmarshalNetworkInterfaceInstanceContextReferenceDeleted(m map[string]json. obj := new(NetworkInterfaceInstanceContextReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -65102,10 +71019,12 @@ func UnmarshalNetworkInterfacePatch(m map[string]json.RawMessage, result interfa obj := new(NetworkInterfacePatch) err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing) if err != nil { + err = core.SDKErrorf(err, "", "allow_ip_spoofing-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -65119,6 +71038,9 @@ func (networkInterfacePatch *NetworkInterfacePatch) AsPatch() (_patch map[string if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -65158,6 +71080,9 @@ func (*VpcV1) NewNetworkInterfacePrototype(subnet SubnetIdentityIntf) (_model *N Subnet: subnet, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -65166,22 +71091,27 @@ func UnmarshalNetworkInterfacePrototype(m map[string]json.RawMessage, result int obj := new(NetworkInterfacePrototype) err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing) if err != nil { + err = core.SDKErrorf(err, "", "allow_ip_spoofing-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalNetworkInterfaceIPPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "security_groups-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -65200,6 +71130,7 @@ func UnmarshalNetworkInterfaceReferenceDeleted(m map[string]json.RawMessage, res obj := new(NetworkInterfaceReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -65218,6 +71149,7 @@ func UnmarshalNetworkInterfaceReferenceTargetContextDeleted(m map[string]json.Ra obj := new(NetworkInterfaceReferenceTargetContextDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -65235,6 +71167,7 @@ func UnmarshalNetworkInterfaceUnpaginatedCollection(m map[string]json.RawMessage obj := new(NetworkInterfaceUnpaginatedCollection) err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterface) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -65301,34 +71234,42 @@ func UnmarshalOperatingSystem(m map[string]json.RawMessage, result interface{}) obj := new(OperatingSystem) err = core.UnmarshalPrimitive(m, "architecture", &obj.Architecture) if err != nil { + err = core.SDKErrorf(err, "", "architecture-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "dedicated_host_only", &obj.DedicatedHostOnly) if err != nil { + err = core.SDKErrorf(err, "", "dedicated_host_only-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "display_name", &obj.DisplayName) if err != nil { + err = core.SDKErrorf(err, "", "display_name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "family", &obj.Family) if err != nil { + err = core.SDKErrorf(err, "", "family-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "vendor", &obj.Vendor) if err != nil { + err = core.SDKErrorf(err, "", "vendor-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "version", &obj.Version) if err != nil { + err = core.SDKErrorf(err, "", "version-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -65359,22 +71300,27 @@ func UnmarshalOperatingSystemCollection(m map[string]json.RawMessage, result int obj := new(OperatingSystemCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalOperatingSystemCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalOperatingSystemCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "operating_systems", &obj.OperatingSystems, UnmarshalOperatingSystem) if err != nil { + err = core.SDKErrorf(err, "", "operating_systems-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -65387,8 +71333,11 @@ func (resp *OperatingSystemCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -65404,6 +71353,7 @@ func UnmarshalOperatingSystemCollectionFirst(m map[string]json.RawMessage, resul obj := new(OperatingSystemCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -65421,6 +71371,7 @@ func UnmarshalOperatingSystemCollectionNext(m map[string]json.RawMessage, result obj := new(OperatingSystemCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -65452,10 +71403,12 @@ func UnmarshalOperatingSystemIdentity(m map[string]json.RawMessage, result inter obj := new(OperatingSystemIdentity) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -65532,38 +71485,47 @@ func UnmarshalPlacementGroup(m map[string]json.RawMessage, result interface{}) ( obj := new(PlacementGroup) err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "strategy", &obj.Strategy) if err != nil { + err = core.SDKErrorf(err, "", "strategy-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -65594,22 +71556,27 @@ func UnmarshalPlacementGroupCollection(m map[string]json.RawMessage, result inte obj := new(PlacementGroupCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalPlacementGroupCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalPlacementGroupCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_groups", &obj.PlacementGroups, UnmarshalPlacementGroup) if err != nil { + err = core.SDKErrorf(err, "", "placement_groups-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -65622,8 +71589,11 @@ func (resp *PlacementGroupCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -65639,6 +71609,7 @@ func UnmarshalPlacementGroupCollectionFirst(m map[string]json.RawMessage, result obj := new(PlacementGroupCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -65656,6 +71627,7 @@ func UnmarshalPlacementGroupCollectionNext(m map[string]json.RawMessage, result obj := new(PlacementGroupCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -65673,6 +71645,7 @@ func UnmarshalPlacementGroupPatch(m map[string]json.RawMessage, result interface obj := new(PlacementGroupPatch) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -65686,6 +71659,9 @@ func (placementGroupPatch *PlacementGroupPatch) AsPatch() (_patch map[string]int if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -65701,6 +71677,7 @@ func UnmarshalPlacementGroupReferenceDeleted(m map[string]json.RawMessage, resul obj := new(PlacementGroupReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -65763,46 +71740,57 @@ func UnmarshalPublicGateway(m map[string]json.RawMessage, result interface{}) (e obj := new(PublicGateway) err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "floating_ip", &obj.FloatingIP, UnmarshalPublicGatewayFloatingIP) if err != nil { + err = core.SDKErrorf(err, "", "floating_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -65833,22 +71821,27 @@ func UnmarshalPublicGatewayCollection(m map[string]json.RawMessage, result inter obj := new(PublicGatewayCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalPublicGatewayCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalPublicGatewayCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "public_gateways", &obj.PublicGateways, UnmarshalPublicGateway) if err != nil { + err = core.SDKErrorf(err, "", "public_gateways-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -65861,8 +71854,11 @@ func (resp *PublicGatewayCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -65878,6 +71874,7 @@ func UnmarshalPublicGatewayCollectionFirst(m map[string]json.RawMessage, result obj := new(PublicGatewayCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -65895,6 +71892,7 @@ func UnmarshalPublicGatewayCollectionNext(m map[string]json.RawMessage, result i obj := new(PublicGatewayCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -65928,26 +71926,32 @@ func UnmarshalPublicGatewayFloatingIP(m map[string]json.RawMessage, result inter obj := new(PublicGatewayFloatingIP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalFloatingIPReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -65993,26 +71997,32 @@ func UnmarshalPublicGatewayFloatingIPPrototype(m map[string]json.RawMessage, res obj := new(PublicGatewayFloatingIPPrototype) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -66048,14 +72058,17 @@ func UnmarshalPublicGatewayIdentity(m map[string]json.RawMessage, result interfa obj := new(PublicGatewayIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -66073,6 +72086,7 @@ func UnmarshalPublicGatewayPatch(m map[string]json.RawMessage, result interface{ obj := new(PublicGatewayPatch) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -66086,6 +72100,9 @@ func (publicGatewayPatch *PublicGatewayPatch) AsPatch() (_patch map[string]inter if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -66122,26 +72139,32 @@ func UnmarshalPublicGatewayReference(m map[string]json.RawMessage, result interf obj := new(PublicGatewayReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalPublicGatewayReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -66160,6 +72183,7 @@ func UnmarshalPublicGatewayReferenceDeleted(m map[string]json.RawMessage, result obj := new(PublicGatewayReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -66193,18 +72217,22 @@ func UnmarshalRegion(m map[string]json.RawMessage, result interface{}) (err erro obj := new(Region) err = core.UnmarshalPrimitive(m, "endpoint", &obj.Endpoint) if err != nil { + err = core.SDKErrorf(err, "", "endpoint-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -66222,6 +72250,7 @@ func UnmarshalRegionCollection(m map[string]json.RawMessage, result interface{}) obj := new(RegionCollection) err = core.UnmarshalModel(m, "regions", &obj.Regions, UnmarshalRegion) if err != nil { + err = core.SDKErrorf(err, "", "regions-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -66253,10 +72282,12 @@ func UnmarshalRegionIdentity(m map[string]json.RawMessage, result interface{}) ( obj := new(RegionIdentity) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -66277,10 +72308,12 @@ func UnmarshalRegionReference(m map[string]json.RawMessage, result interface{}) obj := new(RegionReference) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -66497,118 +72530,98 @@ func (options *RemoveVirtualNetworkInterfaceIPOptions) SetHeaders(param map[stri return options } -// RemoveVPNGatewayConnectionLocalCIDROptions : The RemoveVPNGatewayConnectionLocalCIDR options. -type RemoveVPNGatewayConnectionLocalCIDROptions struct { +// RemoveVPNGatewayConnectionsLocalCIDROptions : The RemoveVPNGatewayConnectionsLocalCIDR options. +type RemoveVPNGatewayConnectionsLocalCIDROptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // The VPN gateway connection identifier. ID *string `json:"id" validate:"required,ne="` - // The address prefix part of the CIDR. - CIDRPrefix *string `json:"cidr_prefix" validate:"required,ne="` - - // The prefix length part of the CIDR. - PrefixLength *string `json:"prefix_length" validate:"required,ne="` + // The IP address range in CIDR block notation. + CIDR *string `json:"cidr" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string } -// NewRemoveVPNGatewayConnectionLocalCIDROptions : Instantiate RemoveVPNGatewayConnectionLocalCIDROptions -func (*VpcV1) NewRemoveVPNGatewayConnectionLocalCIDROptions(vpnGatewayID string, id string, cidrPrefix string, prefixLength string) *RemoveVPNGatewayConnectionLocalCIDROptions { - return &RemoveVPNGatewayConnectionLocalCIDROptions{ +// NewRemoveVPNGatewayConnectionsLocalCIDROptions : Instantiate RemoveVPNGatewayConnectionsLocalCIDROptions +func (*VpcV1) NewRemoveVPNGatewayConnectionsLocalCIDROptions(vpnGatewayID string, id string, cidr string) *RemoveVPNGatewayConnectionsLocalCIDROptions { + return &RemoveVPNGatewayConnectionsLocalCIDROptions{ VPNGatewayID: core.StringPtr(vpnGatewayID), ID: core.StringPtr(id), - CIDRPrefix: core.StringPtr(cidrPrefix), - PrefixLength: core.StringPtr(prefixLength), + CIDR: core.StringPtr(cidr), } } // SetVPNGatewayID : Allow user to set VPNGatewayID -func (_options *RemoveVPNGatewayConnectionLocalCIDROptions) SetVPNGatewayID(vpnGatewayID string) *RemoveVPNGatewayConnectionLocalCIDROptions { +func (_options *RemoveVPNGatewayConnectionsLocalCIDROptions) SetVPNGatewayID(vpnGatewayID string) *RemoveVPNGatewayConnectionsLocalCIDROptions { _options.VPNGatewayID = core.StringPtr(vpnGatewayID) return _options } // SetID : Allow user to set ID -func (_options *RemoveVPNGatewayConnectionLocalCIDROptions) SetID(id string) *RemoveVPNGatewayConnectionLocalCIDROptions { +func (_options *RemoveVPNGatewayConnectionsLocalCIDROptions) SetID(id string) *RemoveVPNGatewayConnectionsLocalCIDROptions { _options.ID = core.StringPtr(id) return _options } -// SetCIDRPrefix : Allow user to set CIDRPrefix -func (_options *RemoveVPNGatewayConnectionLocalCIDROptions) SetCIDRPrefix(cidrPrefix string) *RemoveVPNGatewayConnectionLocalCIDROptions { - _options.CIDRPrefix = core.StringPtr(cidrPrefix) - return _options -} - -// SetPrefixLength : Allow user to set PrefixLength -func (_options *RemoveVPNGatewayConnectionLocalCIDROptions) SetPrefixLength(prefixLength string) *RemoveVPNGatewayConnectionLocalCIDROptions { - _options.PrefixLength = core.StringPtr(prefixLength) +// SetCIDR : Allow user to set CIDR +func (_options *RemoveVPNGatewayConnectionsLocalCIDROptions) SetCIDR(cidr string) *RemoveVPNGatewayConnectionsLocalCIDROptions { + _options.CIDR = core.StringPtr(cidr) return _options } // SetHeaders : Allow user to set Headers -func (options *RemoveVPNGatewayConnectionLocalCIDROptions) SetHeaders(param map[string]string) *RemoveVPNGatewayConnectionLocalCIDROptions { +func (options *RemoveVPNGatewayConnectionsLocalCIDROptions) SetHeaders(param map[string]string) *RemoveVPNGatewayConnectionsLocalCIDROptions { options.Headers = param return options } -// RemoveVPNGatewayConnectionPeerCIDROptions : The RemoveVPNGatewayConnectionPeerCIDR options. -type RemoveVPNGatewayConnectionPeerCIDROptions struct { +// RemoveVPNGatewayConnectionsPeerCIDROptions : The RemoveVPNGatewayConnectionsPeerCIDR options. +type RemoveVPNGatewayConnectionsPeerCIDROptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // The VPN gateway connection identifier. ID *string `json:"id" validate:"required,ne="` - // The address prefix part of the CIDR. - CIDRPrefix *string `json:"cidr_prefix" validate:"required,ne="` - - // The prefix length part of the CIDR. - PrefixLength *string `json:"prefix_length" validate:"required,ne="` + // The IP address range in CIDR block notation. + CIDR *string `json:"cidr" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string } -// NewRemoveVPNGatewayConnectionPeerCIDROptions : Instantiate RemoveVPNGatewayConnectionPeerCIDROptions -func (*VpcV1) NewRemoveVPNGatewayConnectionPeerCIDROptions(vpnGatewayID string, id string, cidrPrefix string, prefixLength string) *RemoveVPNGatewayConnectionPeerCIDROptions { - return &RemoveVPNGatewayConnectionPeerCIDROptions{ +// NewRemoveVPNGatewayConnectionsPeerCIDROptions : Instantiate RemoveVPNGatewayConnectionsPeerCIDROptions +func (*VpcV1) NewRemoveVPNGatewayConnectionsPeerCIDROptions(vpnGatewayID string, id string, cidr string) *RemoveVPNGatewayConnectionsPeerCIDROptions { + return &RemoveVPNGatewayConnectionsPeerCIDROptions{ VPNGatewayID: core.StringPtr(vpnGatewayID), ID: core.StringPtr(id), - CIDRPrefix: core.StringPtr(cidrPrefix), - PrefixLength: core.StringPtr(prefixLength), + CIDR: core.StringPtr(cidr), } } // SetVPNGatewayID : Allow user to set VPNGatewayID -func (_options *RemoveVPNGatewayConnectionPeerCIDROptions) SetVPNGatewayID(vpnGatewayID string) *RemoveVPNGatewayConnectionPeerCIDROptions { +func (_options *RemoveVPNGatewayConnectionsPeerCIDROptions) SetVPNGatewayID(vpnGatewayID string) *RemoveVPNGatewayConnectionsPeerCIDROptions { _options.VPNGatewayID = core.StringPtr(vpnGatewayID) return _options } // SetID : Allow user to set ID -func (_options *RemoveVPNGatewayConnectionPeerCIDROptions) SetID(id string) *RemoveVPNGatewayConnectionPeerCIDROptions { +func (_options *RemoveVPNGatewayConnectionsPeerCIDROptions) SetID(id string) *RemoveVPNGatewayConnectionsPeerCIDROptions { _options.ID = core.StringPtr(id) return _options } -// SetCIDRPrefix : Allow user to set CIDRPrefix -func (_options *RemoveVPNGatewayConnectionPeerCIDROptions) SetCIDRPrefix(cidrPrefix string) *RemoveVPNGatewayConnectionPeerCIDROptions { - _options.CIDRPrefix = core.StringPtr(cidrPrefix) - return _options -} - -// SetPrefixLength : Allow user to set PrefixLength -func (_options *RemoveVPNGatewayConnectionPeerCIDROptions) SetPrefixLength(prefixLength string) *RemoveVPNGatewayConnectionPeerCIDROptions { - _options.PrefixLength = core.StringPtr(prefixLength) +// SetCIDR : Allow user to set CIDR +func (_options *RemoveVPNGatewayConnectionsPeerCIDROptions) SetCIDR(cidr string) *RemoveVPNGatewayConnectionsPeerCIDROptions { + _options.CIDR = core.StringPtr(cidr) return _options } // SetHeaders : Allow user to set Headers -func (options *RemoveVPNGatewayConnectionPeerCIDROptions) SetHeaders(param map[string]string) *RemoveVPNGatewayConnectionPeerCIDROptions { +func (options *RemoveVPNGatewayConnectionsPeerCIDROptions) SetHeaders(param map[string]string) *RemoveVPNGatewayConnectionsPeerCIDROptions { options.Headers = param return options } @@ -66843,62 +72856,77 @@ func UnmarshalReservation(m map[string]json.RawMessage, result interface{}) (err obj := new(Reservation) err = core.UnmarshalPrimitive(m, "affinity_policy", &obj.AffinityPolicy) if err != nil { + err = core.SDKErrorf(err, "", "affinity_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "capacity", &obj.Capacity, UnmarshalReservationCapacity) if err != nil { + err = core.SDKErrorf(err, "", "capacity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "committed_use", &obj.CommittedUse, UnmarshalReservationCommittedUse) if err != nil { + err = core.SDKErrorf(err, "", "committed_use-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalReservationProfile) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "status_reasons", &obj.StatusReasons, UnmarshalReservationStatusReason) if err != nil { + err = core.SDKErrorf(err, "", "status_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -66957,22 +72985,27 @@ func UnmarshalReservationCapacity(m map[string]json.RawMessage, result interface obj := new(ReservationCapacity) err = core.UnmarshalPrimitive(m, "allocated", &obj.Allocated) if err != nil { + err = core.SDKErrorf(err, "", "allocated-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "available", &obj.Available) if err != nil { + err = core.SDKErrorf(err, "", "available-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total", &obj.Total) if err != nil { + err = core.SDKErrorf(err, "", "total-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "used", &obj.Used) if err != nil { + err = core.SDKErrorf(err, "", "used-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -66992,6 +73025,7 @@ func UnmarshalReservationCapacityPatch(m map[string]json.RawMessage, result inte obj := new(ReservationCapacityPatch) err = core.UnmarshalPrimitive(m, "total", &obj.Total) if err != nil { + err = core.SDKErrorf(err, "", "total-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -67010,6 +73044,9 @@ func (*VpcV1) NewReservationCapacityPrototype(total int64) (_model *ReservationC Total: core.Int64Ptr(total), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -67018,6 +73055,7 @@ func UnmarshalReservationCapacityPrototype(m map[string]json.RawMessage, result obj := new(ReservationCapacityPrototype) err = core.UnmarshalPrimitive(m, "total", &obj.Total) if err != nil { + err = core.SDKErrorf(err, "", "total-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -67048,22 +73086,27 @@ func UnmarshalReservationCollection(m map[string]json.RawMessage, result interfa obj := new(ReservationCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalReservationCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalReservationCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservations", &obj.Reservations, UnmarshalReservation) if err != nil { + err = core.SDKErrorf(err, "", "reservations-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -67076,8 +73119,11 @@ func (resp *ReservationCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -67093,6 +73139,7 @@ func UnmarshalReservationCollectionFirst(m map[string]json.RawMessage, result in obj := new(ReservationCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -67110,6 +73157,7 @@ func UnmarshalReservationCollectionNext(m map[string]json.RawMessage, result int obj := new(ReservationCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -67157,14 +73205,17 @@ func UnmarshalReservationCommittedUse(m map[string]json.RawMessage, result inter obj := new(ReservationCommittedUse) err = core.UnmarshalPrimitive(m, "expiration_at", &obj.ExpirationAt) if err != nil { + err = core.SDKErrorf(err, "", "expiration_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "expiration_policy", &obj.ExpirationPolicy) if err != nil { + err = core.SDKErrorf(err, "", "expiration_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "term", &obj.Term) if err != nil { + err = core.SDKErrorf(err, "", "term-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -67210,10 +73261,12 @@ func UnmarshalReservationCommittedUsePatch(m map[string]json.RawMessage, result obj := new(ReservationCommittedUsePatch) err = core.UnmarshalPrimitive(m, "expiration_policy", &obj.ExpirationPolicy) if err != nil { + err = core.SDKErrorf(err, "", "expiration_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "term", &obj.Term) if err != nil { + err = core.SDKErrorf(err, "", "term-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -67258,6 +73311,9 @@ func (*VpcV1) NewReservationCommittedUsePrototype(term string) (_model *Reservat Term: core.StringPtr(term), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -67266,10 +73322,12 @@ func UnmarshalReservationCommittedUsePrototype(m map[string]json.RawMessage, res obj := new(ReservationCommittedUsePrototype) err = core.UnmarshalPrimitive(m, "expiration_policy", &obj.ExpirationPolicy) if err != nil { + err = core.SDKErrorf(err, "", "expiration_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "term", &obj.Term) if err != nil { + err = core.SDKErrorf(err, "", "term-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -67305,14 +73363,17 @@ func UnmarshalReservationIdentity(m map[string]json.RawMessage, result interface obj := new(ReservationIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -67344,18 +73405,22 @@ func UnmarshalReservationPatch(m map[string]json.RawMessage, result interface{}) obj := new(ReservationPatch) err = core.UnmarshalModel(m, "capacity", &obj.Capacity, UnmarshalReservationCapacityPatch) if err != nil { + err = core.SDKErrorf(err, "", "capacity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "committed_use", &obj.CommittedUse, UnmarshalReservationCommittedUsePatch) if err != nil { + err = core.SDKErrorf(err, "", "committed_use-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalReservationProfilePatch) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -67369,6 +73434,9 @@ func (reservationPatch *ReservationPatch) AsPatch() (_patch map[string]interface if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -67395,14 +73463,17 @@ func UnmarshalReservationProfile(m map[string]json.RawMessage, result interface{ obj := new(ReservationProfile) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -67431,10 +73502,12 @@ func UnmarshalReservationProfilePatch(m map[string]json.RawMessage, result inter obj := new(ReservationProfilePatch) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -67463,6 +73536,9 @@ func (*VpcV1) NewReservationProfilePrototype(name string, resourceType string) ( ResourceType: core.StringPtr(resourceType), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -67471,10 +73547,12 @@ func UnmarshalReservationProfilePrototype(m map[string]json.RawMessage, result i obj := new(ReservationProfilePrototype) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -67514,26 +73592,32 @@ func UnmarshalReservationReference(m map[string]json.RawMessage, result interfac obj := new(ReservationReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalReservationReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -67552,6 +73636,7 @@ func UnmarshalReservationReferenceDeleted(m map[string]json.RawMessage, result i obj := new(ReservationReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -67588,14 +73673,17 @@ func UnmarshalReservationStatusReason(m map[string]json.RawMessage, result inter obj := new(ReservationStatusReason) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "message", &obj.Message) if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -67673,42 +73761,52 @@ func UnmarshalReservedIP(m map[string]json.RawMessage, result interface{}) (err obj := new(ReservedIP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { + err = core.SDKErrorf(err, "", "auto_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "owner", &obj.Owner) if err != nil { + err = core.SDKErrorf(err, "", "owner-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalReservedIPTarget) if err != nil { + err = core.SDKErrorf(err, "", "target-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -67739,22 +73837,27 @@ func UnmarshalReservedIPCollection(m map[string]json.RawMessage, result interfac obj := new(ReservedIPCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalReservedIPCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalReservedIPCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reserved_ips", &obj.ReservedIps, UnmarshalReservedIP) if err != nil { + err = core.SDKErrorf(err, "", "reserved_ips-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -67767,8 +73870,11 @@ func (resp *ReservedIPCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -67797,22 +73903,27 @@ func UnmarshalReservedIPCollectionBareMetalServerNetworkInterfaceContext(m map[s obj := new(ReservedIPCollectionBareMetalServerNetworkInterfaceContext) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalReservedIPCollectionBareMetalServerNetworkInterfaceContextFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "ips", &obj.Ips, UnmarshalReservedIP) if err != nil { + err = core.SDKErrorf(err, "", "ips-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalReservedIPCollectionBareMetalServerNetworkInterfaceContextNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -67830,6 +73941,7 @@ func UnmarshalReservedIPCollectionBareMetalServerNetworkInterfaceContextFirst(m obj := new(ReservedIPCollectionBareMetalServerNetworkInterfaceContextFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -67847,6 +73959,7 @@ func UnmarshalReservedIPCollectionBareMetalServerNetworkInterfaceContextNext(m m obj := new(ReservedIPCollectionBareMetalServerNetworkInterfaceContextNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -67877,22 +73990,27 @@ func UnmarshalReservedIPCollectionEndpointGatewayContext(m map[string]json.RawMe obj := new(ReservedIPCollectionEndpointGatewayContext) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalReservedIPCollectionEndpointGatewayContextFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "ips", &obj.Ips, UnmarshalReservedIP) if err != nil { + err = core.SDKErrorf(err, "", "ips-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalReservedIPCollectionEndpointGatewayContextNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -67905,8 +74023,11 @@ func (resp *ReservedIPCollectionEndpointGatewayContext) GetNextStart() (*string, return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -67922,6 +74043,7 @@ func UnmarshalReservedIPCollectionEndpointGatewayContextFirst(m map[string]json. obj := new(ReservedIPCollectionEndpointGatewayContextFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -67939,6 +74061,7 @@ func UnmarshalReservedIPCollectionEndpointGatewayContextNext(m map[string]json.R obj := new(ReservedIPCollectionEndpointGatewayContextNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -67956,6 +74079,7 @@ func UnmarshalReservedIPCollectionFirst(m map[string]json.RawMessage, result int obj := new(ReservedIPCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -67986,22 +74110,27 @@ func UnmarshalReservedIPCollectionInstanceNetworkInterfaceContext(m map[string]j obj := new(ReservedIPCollectionInstanceNetworkInterfaceContext) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalReservedIPCollectionInstanceNetworkInterfaceContextFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "ips", &obj.Ips, UnmarshalReservedIP) if err != nil { + err = core.SDKErrorf(err, "", "ips-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalReservedIPCollectionInstanceNetworkInterfaceContextNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -68014,8 +74143,11 @@ func (resp *ReservedIPCollectionInstanceNetworkInterfaceContext) GetNextStart() return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -68031,6 +74163,7 @@ func UnmarshalReservedIPCollectionInstanceNetworkInterfaceContextFirst(m map[str obj := new(ReservedIPCollectionInstanceNetworkInterfaceContextFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -68048,6 +74181,7 @@ func UnmarshalReservedIPCollectionInstanceNetworkInterfaceContextNext(m map[stri obj := new(ReservedIPCollectionInstanceNetworkInterfaceContextNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -68065,6 +74199,7 @@ func UnmarshalReservedIPCollectionNext(m map[string]json.RawMessage, result inte obj := new(ReservedIPCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -68095,22 +74230,27 @@ func UnmarshalReservedIPCollectionVirtualNetworkInterfaceContext(m map[string]js obj := new(ReservedIPCollectionVirtualNetworkInterfaceContext) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalReservedIPCollectionVirtualNetworkInterfaceContextFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "ips", &obj.Ips, UnmarshalReservedIPReference) if err != nil { + err = core.SDKErrorf(err, "", "ips-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalReservedIPCollectionVirtualNetworkInterfaceContextNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -68123,8 +74263,11 @@ func (resp *ReservedIPCollectionVirtualNetworkInterfaceContext) GetNextStart() ( return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -68140,6 +74283,7 @@ func UnmarshalReservedIPCollectionVirtualNetworkInterfaceContextFirst(m map[stri obj := new(ReservedIPCollectionVirtualNetworkInterfaceContextFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -68157,6 +74301,7 @@ func UnmarshalReservedIPCollectionVirtualNetworkInterfaceContextNext(m map[strin obj := new(ReservedIPCollectionVirtualNetworkInterfaceContextNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -68179,10 +74324,12 @@ func UnmarshalReservedIPPatch(m map[string]json.RawMessage, result interface{}) obj := new(ReservedIPPatch) err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { + err = core.SDKErrorf(err, "", "auto_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -68196,6 +74343,9 @@ func (reservedIPPatch *ReservedIPPatch) AsPatch() (_patch map[string]interface{} if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -68237,26 +74387,32 @@ func UnmarshalReservedIPReference(m map[string]json.RawMessage, result interface obj := new(ReservedIPReference) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalReservedIPReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -68275,6 +74431,7 @@ func UnmarshalReservedIPReferenceDeleted(m map[string]json.RawMessage, result in obj := new(ReservedIPReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -68333,26 +74490,32 @@ func UnmarshalReservedIPTarget(m map[string]json.RawMessage, result interface{}) obj := new(ReservedIPTarget) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalEndpointGatewayReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -68393,14 +74556,17 @@ func UnmarshalReservedIPTargetPrototype(m map[string]json.RawMessage, result int obj := new(ReservedIPTargetPrototype) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -68418,6 +74584,7 @@ func UnmarshalResourceFilter(m map[string]json.RawMessage, result interface{}) ( obj := new(ResourceFilter) err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -68446,6 +74613,7 @@ func UnmarshalResourceGroupIdentity(m map[string]json.RawMessage, result interfa obj := new(ResourceGroupIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -68469,14 +74637,17 @@ func UnmarshalResourceGroupReference(m map[string]json.RawMessage, result interf obj := new(ResourceGroupReference) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -68618,54 +74789,67 @@ func UnmarshalRoute(m map[string]json.RawMessage, result interface{}) (err error obj := new(Route) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { + err = core.SDKErrorf(err, "", "action-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "advertise", &obj.Advertise) if err != nil { + err = core.SDKErrorf(err, "", "advertise-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "creator", &obj.Creator, UnmarshalRouteCreator) if err != nil { + err = core.SDKErrorf(err, "", "creator-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) if err != nil { + err = core.SDKErrorf(err, "", "destination-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next_hop", &obj.NextHop, UnmarshalRouteNextHop) if err != nil { + err = core.SDKErrorf(err, "", "next_hop-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "origin", &obj.Origin) if err != nil { + err = core.SDKErrorf(err, "", "origin-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "priority", &obj.Priority) if err != nil { + err = core.SDKErrorf(err, "", "priority-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -68696,22 +74880,27 @@ func UnmarshalRouteCollection(m map[string]json.RawMessage, result interface{}) obj := new(RouteCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalRouteCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalRouteCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "routes", &obj.Routes, UnmarshalRoute) if err != nil { + err = core.SDKErrorf(err, "", "routes-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -68724,8 +74913,11 @@ func (resp *RouteCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -68741,6 +74933,7 @@ func UnmarshalRouteCollectionFirst(m map[string]json.RawMessage, result interfac obj := new(RouteCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -68758,6 +74951,7 @@ func UnmarshalRouteCollectionNext(m map[string]json.RawMessage, result interface obj := new(RouteCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -68788,22 +74982,27 @@ func UnmarshalRouteCollectionVPCContext(m map[string]json.RawMessage, result int obj := new(RouteCollectionVPCContext) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalRouteCollectionVPCContextFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalRouteCollectionVPCContextNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "routes", &obj.Routes, UnmarshalRouteCollectionVPCContextRoutesItem) if err != nil { + err = core.SDKErrorf(err, "", "routes-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -68816,8 +75015,11 @@ func (resp *RouteCollectionVPCContext) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -68833,6 +75035,7 @@ func UnmarshalRouteCollectionVPCContextFirst(m map[string]json.RawMessage, resul obj := new(RouteCollectionVPCContextFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -68850,6 +75053,7 @@ func UnmarshalRouteCollectionVPCContextNext(m map[string]json.RawMessage, result obj := new(RouteCollectionVPCContextNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -68963,54 +75167,67 @@ func UnmarshalRouteCollectionVPCContextRoutesItem(m map[string]json.RawMessage, obj := new(RouteCollectionVPCContextRoutesItem) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { + err = core.SDKErrorf(err, "", "action-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "advertise", &obj.Advertise) if err != nil { + err = core.SDKErrorf(err, "", "advertise-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "creator", &obj.Creator, UnmarshalRouteCreator) if err != nil { + err = core.SDKErrorf(err, "", "creator-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) if err != nil { + err = core.SDKErrorf(err, "", "destination-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next_hop", &obj.NextHop, UnmarshalRouteNextHop) if err != nil { + err = core.SDKErrorf(err, "", "next_hop-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "origin", &obj.Origin) if err != nil { + err = core.SDKErrorf(err, "", "origin-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "priority", &obj.Priority) if err != nil { + err = core.SDKErrorf(err, "", "priority-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -69063,26 +75280,32 @@ func UnmarshalRouteCreator(m map[string]json.RawMessage, result interface{}) (er obj := new(RouteCreator) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVPNGatewayReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -69136,26 +75359,32 @@ func UnmarshalRouteNextHop(m map[string]json.RawMessage, result interface{}) (er obj := new(RouteNextHop) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVPNGatewayConnectionReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -69197,14 +75426,17 @@ func UnmarshalRouteNextHopPatch(m map[string]json.RawMessage, result interface{} obj := new(RouteNextHopPatch) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -69246,18 +75478,22 @@ func UnmarshalRoutePatch(m map[string]json.RawMessage, result interface{}) (err obj := new(RoutePatch) err = core.UnmarshalPrimitive(m, "advertise", &obj.Advertise) if err != nil { + err = core.SDKErrorf(err, "", "advertise-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next_hop", &obj.NextHop, UnmarshalRouteNextHopPatch) if err != nil { + err = core.SDKErrorf(err, "", "next_hop-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "priority", &obj.Priority) if err != nil { + err = core.SDKErrorf(err, "", "priority-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -69271,6 +75507,9 @@ func (routePatch *RoutePatch) AsPatch() (_patch map[string]interface{}, err erro if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -69345,6 +75584,9 @@ func (*VpcV1) NewRoutePrototype(destination string, zone ZoneIdentityIntf) (_mod Zone: zone, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -69353,30 +75595,37 @@ func UnmarshalRoutePrototype(m map[string]json.RawMessage, result interface{}) ( obj := new(RoutePrototype) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { + err = core.SDKErrorf(err, "", "action-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "advertise", &obj.Advertise) if err != nil { + err = core.SDKErrorf(err, "", "advertise-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) if err != nil { + err = core.SDKErrorf(err, "", "destination-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next_hop", &obj.NextHop, UnmarshalRoutePrototypeNextHop) if err != nil { + err = core.SDKErrorf(err, "", "next_hop-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "priority", &obj.Priority) if err != nil { + err = core.SDKErrorf(err, "", "priority-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -69418,14 +75667,17 @@ func UnmarshalRoutePrototypeNextHop(m map[string]json.RawMessage, result interfa obj := new(RoutePrototypeNextHop) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -69453,18 +75705,22 @@ func UnmarshalRouteReference(m map[string]json.RawMessage, result interface{}) ( obj := new(RouteReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalRouteReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -69483,6 +75739,7 @@ func UnmarshalRouteReferenceDeleted(m map[string]json.RawMessage, result interfa obj := new(RouteReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -69493,8 +75750,8 @@ func UnmarshalRouteReferenceDeleted(m map[string]json.RawMessage, result interfa type RoutingTable struct { // The filters specifying the resources that may create routes in this routing table. // - // At present, only the `resource_type` filter is permitted, and only the `vpn_server` value is supported, but filter - // support is expected to expand in the future. + // At present, only the `resource_type` filter is permitted, and only the values + // `vpn_gateway` and `vpn_server` are supported, but filter support is expected to expand in the future. AcceptRoutesFrom []ResourceFilter `json:"accept_routes_from" validate:"required"` // The ingress sources to advertise routes to. Routes in the table with `advertise` enabled will be advertised to these @@ -69603,62 +75860,77 @@ func UnmarshalRoutingTable(m map[string]json.RawMessage, result interface{}) (er obj := new(RoutingTable) err = core.UnmarshalModel(m, "accept_routes_from", &obj.AcceptRoutesFrom, UnmarshalResourceFilter) if err != nil { + err = core.SDKErrorf(err, "", "accept_routes_from-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "advertise_routes_to", &obj.AdvertiseRoutesTo) if err != nil { + err = core.SDKErrorf(err, "", "advertise_routes_to-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "is_default", &obj.IsDefault) if err != nil { + err = core.SDKErrorf(err, "", "is_default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "route_direct_link_ingress", &obj.RouteDirectLinkIngress) if err != nil { + err = core.SDKErrorf(err, "", "route_direct_link_ingress-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "route_internet_ingress", &obj.RouteInternetIngress) if err != nil { + err = core.SDKErrorf(err, "", "route_internet_ingress-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "route_transit_gateway_ingress", &obj.RouteTransitGatewayIngress) if err != nil { + err = core.SDKErrorf(err, "", "route_transit_gateway_ingress-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "route_vpc_zone_ingress", &obj.RouteVPCZoneIngress) if err != nil { + err = core.SDKErrorf(err, "", "route_vpc_zone_ingress-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "routes", &obj.Routes, UnmarshalRouteReference) if err != nil { + err = core.SDKErrorf(err, "", "routes-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnets", &obj.Subnets, UnmarshalSubnetReference) if err != nil { + err = core.SDKErrorf(err, "", "subnets-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -69689,22 +75961,27 @@ func UnmarshalRoutingTableCollection(m map[string]json.RawMessage, result interf obj := new(RoutingTableCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalRoutingTableCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalRoutingTableCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "routing_tables", &obj.RoutingTables, UnmarshalRoutingTable) if err != nil { + err = core.SDKErrorf(err, "", "routing_tables-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -69717,8 +75994,11 @@ func (resp *RoutingTableCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -69734,6 +76014,7 @@ func UnmarshalRoutingTableCollectionFirst(m map[string]json.RawMessage, result i obj := new(RoutingTableCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -69751,6 +76032,7 @@ func UnmarshalRoutingTableCollectionNext(m map[string]json.RawMessage, result in obj := new(RoutingTableCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -69782,10 +76064,12 @@ func UnmarshalRoutingTableIdentity(m map[string]json.RawMessage, result interfac obj := new(RoutingTableIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -69876,30 +76160,37 @@ func UnmarshalRoutingTablePatch(m map[string]json.RawMessage, result interface{} obj := new(RoutingTablePatch) err = core.UnmarshalModel(m, "accept_routes_from", &obj.AcceptRoutesFrom, UnmarshalResourceFilter) if err != nil { + err = core.SDKErrorf(err, "", "accept_routes_from-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "advertise_routes_to", &obj.AdvertiseRoutesTo) if err != nil { + err = core.SDKErrorf(err, "", "advertise_routes_to-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "route_direct_link_ingress", &obj.RouteDirectLinkIngress) if err != nil { + err = core.SDKErrorf(err, "", "route_direct_link_ingress-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "route_internet_ingress", &obj.RouteInternetIngress) if err != nil { + err = core.SDKErrorf(err, "", "route_internet_ingress-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "route_transit_gateway_ingress", &obj.RouteTransitGatewayIngress) if err != nil { + err = core.SDKErrorf(err, "", "route_transit_gateway_ingress-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "route_vpc_zone_ingress", &obj.RouteVPCZoneIngress) if err != nil { + err = core.SDKErrorf(err, "", "route_vpc_zone_ingress-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -69913,6 +76204,9 @@ func (routingTablePatch *RoutingTablePatch) AsPatch() (_patch map[string]interfa if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -69946,22 +76240,27 @@ func UnmarshalRoutingTableReference(m map[string]json.RawMessage, result interfa obj := new(RoutingTableReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalRoutingTableReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -69980,6 +76279,7 @@ func UnmarshalRoutingTableReferenceDeleted(m map[string]json.RawMessage, result obj := new(RoutingTableReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -70021,38 +76321,47 @@ func UnmarshalSecurityGroup(m map[string]json.RawMessage, result interface{}) (e obj := new(SecurityGroup) err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "rules", &obj.Rules, UnmarshalSecurityGroupRule) if err != nil { + err = core.SDKErrorf(err, "", "rules-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "targets", &obj.Targets, UnmarshalSecurityGroupTargetReference) if err != nil { + err = core.SDKErrorf(err, "", "targets-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -70083,22 +76392,27 @@ func UnmarshalSecurityGroupCollection(m map[string]json.RawMessage, result inter obj := new(SecurityGroupCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalSecurityGroupCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalSecurityGroupCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroup) if err != nil { + err = core.SDKErrorf(err, "", "security_groups-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -70111,8 +76425,11 @@ func (resp *SecurityGroupCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -70128,6 +76445,7 @@ func UnmarshalSecurityGroupCollectionFirst(m map[string]json.RawMessage, result obj := new(SecurityGroupCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -70145,6 +76463,7 @@ func UnmarshalSecurityGroupCollectionNext(m map[string]json.RawMessage, result i obj := new(SecurityGroupCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -70180,14 +76499,17 @@ func UnmarshalSecurityGroupIdentity(m map[string]json.RawMessage, result interfa obj := new(SecurityGroupIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -70205,6 +76527,7 @@ func UnmarshalSecurityGroupPatch(m map[string]json.RawMessage, result interface{ obj := new(SecurityGroupPatch) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -70218,6 +76541,9 @@ func (securityGroupPatch *SecurityGroupPatch) AsPatch() (_patch map[string]inter if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -70245,22 +76571,27 @@ func UnmarshalSecurityGroupReference(m map[string]json.RawMessage, result interf obj := new(SecurityGroupReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalSecurityGroupReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -70279,6 +76610,7 @@ func UnmarshalSecurityGroupReferenceDeleted(m map[string]json.RawMessage, result obj := new(SecurityGroupReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -70373,23 +76705,37 @@ func UnmarshalSecurityGroupRule(m map[string]json.RawMessage, result interface{} var discValue string err = core.UnmarshalPrimitive(m, "protocol", &discValue) if err != nil { - err = fmt.Errorf("error unmarshalling discriminator property 'protocol': %s", err.Error()) + errMsg := fmt.Sprintf("error unmarshalling discriminator property 'protocol': %s", err.Error()) + err = core.SDKErrorf(err, errMsg, "discriminator-unmarshal-error", common.GetComponentInfo()) return } if discValue == "" { - err = fmt.Errorf("required discriminator property 'protocol' not found in JSON object") + err = core.SDKErrorf(err, "required discriminator property 'protocol' not found in JSON object", "missing-discriminator", common.GetComponentInfo()) return } if discValue == "all" { err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolAll) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-SecurityGroupRuleSecurityGroupRuleProtocolAll-error", common.GetComponentInfo()) + } } else if discValue == "icmp" { err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolIcmp) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-SecurityGroupRuleSecurityGroupRuleProtocolIcmp-error", common.GetComponentInfo()) + } } else if discValue == "tcp" { err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolTcpudp) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-SecurityGroupRuleSecurityGroupRuleProtocolTcpudp-error", common.GetComponentInfo()) + } } else if discValue == "udp" { err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolTcpudp) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-SecurityGroupRuleSecurityGroupRuleProtocolTcpudp-error", common.GetComponentInfo()) + } } else { - err = fmt.Errorf("unrecognized value for discriminator property 'protocol': %s", discValue) + errMsg := fmt.Sprintf("unrecognized value for discriminator property 'protocol': %s", discValue) + err = core.SDKErrorf(err, errMsg, "invalid-discriminator", common.GetComponentInfo()) } return } @@ -70405,6 +76751,7 @@ func UnmarshalSecurityGroupRuleCollection(m map[string]json.RawMessage, result i obj := new(SecurityGroupRuleCollection) err = core.UnmarshalModel(m, "rules", &obj.Rules, UnmarshalSecurityGroupRule) if err != nil { + err = core.SDKErrorf(err, "", "rules-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -70444,10 +76791,12 @@ func UnmarshalSecurityGroupRuleLocal(m map[string]json.RawMessage, result interf obj := new(SecurityGroupRuleLocal) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) if err != nil { + err = core.SDKErrorf(err, "", "cidr_block-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -70489,10 +76838,12 @@ func UnmarshalSecurityGroupRuleLocalPatch(m map[string]json.RawMessage, result i obj := new(SecurityGroupRuleLocalPatch) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) if err != nil { + err = core.SDKErrorf(err, "", "cidr_block-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -70534,10 +76885,12 @@ func UnmarshalSecurityGroupRuleLocalPrototype(m map[string]json.RawMessage, resu obj := new(SecurityGroupRuleLocalPrototype) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) if err != nil { + err = core.SDKErrorf(err, "", "cidr_block-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -70615,34 +76968,42 @@ func UnmarshalSecurityGroupRulePatch(m map[string]json.RawMessage, result interf obj := new(SecurityGroupRulePatch) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { + err = core.SDKErrorf(err, "", "direction-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { + err = core.SDKErrorf(err, "", "ip_version-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "local", &obj.Local, UnmarshalSecurityGroupRuleLocalPatch) if err != nil { + err = core.SDKErrorf(err, "", "local-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "port_max", &obj.PortMax) if err != nil { + err = core.SDKErrorf(err, "", "port_max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "port_min", &obj.PortMin) if err != nil { + err = core.SDKErrorf(err, "", "port_min-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRuleRemotePatch) if err != nil { + err = core.SDKErrorf(err, "", "remote-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -70656,6 +77017,9 @@ func (securityGroupRulePatch *SecurityGroupRulePatch) AsPatch() (_patch map[stri if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -70756,23 +77120,37 @@ func UnmarshalSecurityGroupRulePrototype(m map[string]json.RawMessage, result in var discValue string err = core.UnmarshalPrimitive(m, "protocol", &discValue) if err != nil { - err = fmt.Errorf("error unmarshalling discriminator property 'protocol': %s", err.Error()) + errMsg := fmt.Sprintf("error unmarshalling discriminator property 'protocol': %s", err.Error()) + err = core.SDKErrorf(err, errMsg, "discriminator-unmarshal-error", common.GetComponentInfo()) return } if discValue == "" { - err = fmt.Errorf("required discriminator property 'protocol' not found in JSON object") + err = core.SDKErrorf(err, "required discriminator property 'protocol' not found in JSON object", "missing-discriminator", common.GetComponentInfo()) return } if discValue == "all" { err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll-error", common.GetComponentInfo()) + } } else if discValue == "icmp" { err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp-error", common.GetComponentInfo()) + } } else if discValue == "tcp" { err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp-error", common.GetComponentInfo()) + } } else if discValue == "udp" { err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp-error", common.GetComponentInfo()) + } } else { - err = fmt.Errorf("unrecognized value for discriminator property 'protocol': %s", discValue) + errMsg := fmt.Sprintf("unrecognized value for discriminator property 'protocol': %s", discValue) + err = core.SDKErrorf(err, errMsg, "invalid-discriminator", common.GetComponentInfo()) } return } @@ -70827,30 +77205,37 @@ func UnmarshalSecurityGroupRuleRemote(m map[string]json.RawMessage, result inter obj := new(SecurityGroupRuleRemote) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) if err != nil { + err = core.SDKErrorf(err, "", "cidr_block-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalSecurityGroupReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -70900,22 +77285,27 @@ func UnmarshalSecurityGroupRuleRemotePatch(m map[string]json.RawMessage, result obj := new(SecurityGroupRuleRemotePatch) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) if err != nil { + err = core.SDKErrorf(err, "", "cidr_block-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -70967,22 +77357,27 @@ func UnmarshalSecurityGroupRuleRemotePrototype(m map[string]json.RawMessage, res obj := new(SecurityGroupRuleRemotePrototype) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) if err != nil { + err = core.SDKErrorf(err, "", "cidr_block-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -71013,22 +77408,27 @@ func UnmarshalSecurityGroupTargetCollection(m map[string]json.RawMessage, result obj := new(SecurityGroupTargetCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalSecurityGroupTargetCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalSecurityGroupTargetCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "targets", &obj.Targets, UnmarshalSecurityGroupTargetReference) if err != nil { + err = core.SDKErrorf(err, "", "targets-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -71041,8 +77441,11 @@ func (resp *SecurityGroupTargetCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -71058,6 +77461,7 @@ func UnmarshalSecurityGroupTargetCollectionFirst(m map[string]json.RawMessage, r obj := new(SecurityGroupTargetCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -71075,6 +77479,7 @@ func UnmarshalSecurityGroupTargetCollectionNext(m map[string]json.RawMessage, re obj := new(SecurityGroupTargetCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -71147,34 +77552,42 @@ func UnmarshalSecurityGroupTargetReference(m map[string]json.RawMessage, result obj := new(SecurityGroupTargetReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalNetworkInterfaceReferenceTargetContextDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -71420,102 +77833,127 @@ func UnmarshalShare(m map[string]json.RawMessage, result interface{}) (err error obj := new(Share) err = core.UnmarshalPrimitive(m, "access_control_mode", &obj.AccessControlMode) if err != nil { + err = core.SDKErrorf(err, "", "access_control_mode-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "encryption", &obj.Encryption) if err != nil { + err = core.SDKErrorf(err, "", "encryption-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyReference) if err != nil { + err = core.SDKErrorf(err, "", "encryption_key-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { + err = core.SDKErrorf(err, "", "iops-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "latest_job", &obj.LatestJob, UnmarshalShareJob) if err != nil { + err = core.SDKErrorf(err, "", "latest_job-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "latest_sync", &obj.LatestSync, UnmarshalShareLatestSync) if err != nil { + err = core.SDKErrorf(err, "", "latest_sync-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "mount_targets", &obj.MountTargets, UnmarshalShareMountTargetReference) if err != nil { + err = core.SDKErrorf(err, "", "mount_targets-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalShareProfileReference) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "replica_share", &obj.ReplicaShare, UnmarshalShareReference) if err != nil { + err = core.SDKErrorf(err, "", "replica_share-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "replication_cron_spec", &obj.ReplicationCronSpec) if err != nil { + err = core.SDKErrorf(err, "", "replication_cron_spec-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "replication_role", &obj.ReplicationRole) if err != nil { + err = core.SDKErrorf(err, "", "replication_role-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "replication_status", &obj.ReplicationStatus) if err != nil { + err = core.SDKErrorf(err, "", "replication_status-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "replication_status_reasons", &obj.ReplicationStatusReasons, UnmarshalShareReplicationStatusReason) if err != nil { + err = core.SDKErrorf(err, "", "replication_status_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "size", &obj.Size) if err != nil { + err = core.SDKErrorf(err, "", "size-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "source_share", &obj.SourceShare, UnmarshalShareReference) if err != nil { + err = core.SDKErrorf(err, "", "source_share-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { + err = core.SDKErrorf(err, "", "user_tags-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -71546,22 +77984,27 @@ func UnmarshalShareCollection(m map[string]json.RawMessage, result interface{}) obj := new(ShareCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalShareCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalShareCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "shares", &obj.Shares, UnmarshalShare) if err != nil { + err = core.SDKErrorf(err, "", "shares-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -71574,8 +78017,11 @@ func (resp *ShareCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -71591,6 +78037,7 @@ func UnmarshalShareCollectionFirst(m map[string]json.RawMessage, result interfac obj := new(ShareCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -71608,6 +78055,7 @@ func UnmarshalShareCollectionNext(m map[string]json.RawMessage, result interface obj := new(ShareCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -71643,14 +78091,17 @@ func UnmarshalShareIdentity(m map[string]json.RawMessage, result interface{}) (e obj := new(ShareIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -71671,10 +78122,12 @@ func UnmarshalShareInitialOwner(m map[string]json.RawMessage, result interface{} obj := new(ShareInitialOwner) err = core.UnmarshalPrimitive(m, "gid", &obj.Gid) if err != nil { + err = core.SDKErrorf(err, "", "gid-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "uid", &obj.Uid) if err != nil { + err = core.SDKErrorf(err, "", "uid-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -71744,14 +78197,17 @@ func UnmarshalShareJob(m map[string]json.RawMessage, result interface{}) (err er obj := new(ShareJob) err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "status_reasons", &obj.StatusReasons, UnmarshalShareJobStatusReason) if err != nil { + err = core.SDKErrorf(err, "", "status_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -71789,14 +78245,17 @@ func UnmarshalShareJobStatusReason(m map[string]json.RawMessage, result interfac obj := new(ShareJobStatusReason) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "message", &obj.Message) if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -71823,14 +78282,17 @@ func UnmarshalShareLatestSync(m map[string]json.RawMessage, result interface{}) obj := new(ShareLatestSync) err = core.UnmarshalPrimitive(m, "completed_at", &obj.CompletedAt) if err != nil { + err = core.SDKErrorf(err, "", "completed_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "data_transferred", &obj.DataTransferred) if err != nil { + err = core.SDKErrorf(err, "", "data_transferred-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "started_at", &obj.StartedAt) if err != nil { + err = core.SDKErrorf(err, "", "started_at-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -71962,54 +78424,67 @@ func UnmarshalShareMountTarget(m map[string]json.RawMessage, result interface{}) obj := new(ShareMountTarget) err = core.UnmarshalPrimitive(m, "access_control_mode", &obj.AccessControlMode) if err != nil { + err = core.SDKErrorf(err, "", "access_control_mode-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "mount_path", &obj.MountPath) if err != nil { + err = core.SDKErrorf(err, "", "mount_path-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "transit_encryption", &obj.TransitEncryption) if err != nil { + err = core.SDKErrorf(err, "", "transit_encryption-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "virtual_network_interface", &obj.VirtualNetworkInterface, UnmarshalVirtualNetworkInterfaceReferenceAttachmentContext) if err != nil { + err = core.SDKErrorf(err, "", "virtual_network_interface-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -72040,22 +78515,27 @@ func UnmarshalShareMountTargetCollection(m map[string]json.RawMessage, result in obj := new(ShareMountTargetCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalShareMountTargetCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "mount_targets", &obj.MountTargets, UnmarshalShareMountTarget) if err != nil { + err = core.SDKErrorf(err, "", "mount_targets-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalShareMountTargetCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -72068,8 +78548,11 @@ func (resp *ShareMountTargetCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -72085,6 +78568,7 @@ func UnmarshalShareMountTargetCollectionFirst(m map[string]json.RawMessage, resu obj := new(ShareMountTargetCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -72102,6 +78586,7 @@ func UnmarshalShareMountTargetCollectionNext(m map[string]json.RawMessage, resul obj := new(ShareMountTargetCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -72119,6 +78604,7 @@ func UnmarshalShareMountTargetPatch(m map[string]json.RawMessage, result interfa obj := new(ShareMountTargetPatch) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -72132,6 +78618,9 @@ func (shareMountTargetPatch *ShareMountTargetPatch) AsPatch() (_patch map[string if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -72178,18 +78667,22 @@ func UnmarshalShareMountTargetPrototype(m map[string]json.RawMessage, result int obj := new(ShareMountTargetPrototype) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "transit_encryption", &obj.TransitEncryption) if err != nil { + err = core.SDKErrorf(err, "", "transit_encryption-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "virtual_network_interface", &obj.VirtualNetworkInterface, UnmarshalShareMountTargetVirtualNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "virtual_network_interface-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -72226,22 +78719,27 @@ func UnmarshalShareMountTargetReference(m map[string]json.RawMessage, result int obj := new(ShareMountTargetReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalShareMountTargetReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -72260,6 +78758,7 @@ func UnmarshalShareMountTargetReferenceDeleted(m map[string]json.RawMessage, res obj := new(ShareMountTargetReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -72353,50 +78852,62 @@ func UnmarshalShareMountTargetVirtualNetworkInterfacePrototype(m map[string]json obj := new(ShareMountTargetVirtualNetworkInterfacePrototype) err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing) if err != nil { + err = core.SDKErrorf(err, "", "allow_ip_spoofing-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { + err = core.SDKErrorf(err, "", "auto_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "enable_infrastructure_nat", &obj.EnableInfrastructureNat) if err != nil { + err = core.SDKErrorf(err, "", "enable_infrastructure_nat-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "ips", &obj.Ips, UnmarshalVirtualNetworkInterfaceIPPrototype) if err != nil { + err = core.SDKErrorf(err, "", "ips-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalVirtualNetworkInterfacePrimaryIPPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "security_groups-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -72467,30 +78978,37 @@ func UnmarshalSharePatch(m map[string]json.RawMessage, result interface{}) (err obj := new(SharePatch) err = core.UnmarshalPrimitive(m, "access_control_mode", &obj.AccessControlMode) if err != nil { + err = core.SDKErrorf(err, "", "access_control_mode-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { + err = core.SDKErrorf(err, "", "iops-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalShareProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "replication_cron_spec", &obj.ReplicationCronSpec) if err != nil { + err = core.SDKErrorf(err, "", "replication_cron_spec-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "size", &obj.Size) if err != nil { + err = core.SDKErrorf(err, "", "size-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { + err = core.SDKErrorf(err, "", "user_tags-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -72504,6 +79022,9 @@ func (sharePatch *SharePatch) AsPatch() (_patch map[string]interface{}, err erro if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -72545,26 +79066,32 @@ func UnmarshalShareProfile(m map[string]json.RawMessage, result interface{}) (er obj := new(ShareProfile) err = core.UnmarshalModel(m, "capacity", &obj.Capacity, UnmarshalShareProfileCapacity) if err != nil { + err = core.SDKErrorf(err, "", "capacity-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "family", &obj.Family) if err != nil { + err = core.SDKErrorf(err, "", "family-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "iops", &obj.Iops, UnmarshalShareProfileIops) if err != nil { + err = core.SDKErrorf(err, "", "iops-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -72619,30 +79146,37 @@ func UnmarshalShareProfileCapacity(m map[string]json.RawMessage, result interfac obj := new(ShareProfileCapacity) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -72673,22 +79207,27 @@ func UnmarshalShareProfileCollection(m map[string]json.RawMessage, result interf obj := new(ShareProfileCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalShareProfileCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalShareProfileCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profiles", &obj.Profiles, UnmarshalShareProfile) if err != nil { + err = core.SDKErrorf(err, "", "profiles-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -72701,8 +79240,11 @@ func (resp *ShareProfileCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -72718,6 +79260,7 @@ func UnmarshalShareProfileCollectionFirst(m map[string]json.RawMessage, result i obj := new(ShareProfileCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -72735,6 +79278,7 @@ func UnmarshalShareProfileCollectionNext(m map[string]json.RawMessage, result in obj := new(ShareProfileCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -72789,30 +79333,37 @@ func UnmarshalShareProfileIops(m map[string]json.RawMessage, result interface{}) obj := new(ShareProfileIops) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -72844,10 +79395,12 @@ func UnmarshalShareProfileIdentity(m map[string]json.RawMessage, result interfac obj := new(ShareProfileIdentity) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -72877,14 +79430,17 @@ func UnmarshalShareProfileReference(m map[string]json.RawMessage, result interfa obj := new(ShareProfileReference) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -72921,10 +79477,8 @@ type SharePrototype struct { // Tags for this resource. UserTags []string `json:"user_tags,omitempty"` - // The zone this file share will reside in. - // - // For a replica share, this must be a different zone in the same region as the - // source share. + // The zone this file share will reside in. For a replica share, this must be a different + // zone in the same region as the source share. Zone ZoneIdentityIntf `json:"zone" validate:"required"` // The access control mode for the share: @@ -72994,58 +79548,72 @@ func UnmarshalSharePrototype(m map[string]json.RawMessage, result interface{}) ( obj := new(SharePrototype) err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { + err = core.SDKErrorf(err, "", "iops-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "mount_targets", &obj.MountTargets, UnmarshalShareMountTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "mount_targets-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalShareProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "replica_share", &obj.ReplicaShare, UnmarshalSharePrototypeShareContext) if err != nil { + err = core.SDKErrorf(err, "", "replica_share-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { + err = core.SDKErrorf(err, "", "user_tags-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "access_control_mode", &obj.AccessControlMode) if err != nil { + err = core.SDKErrorf(err, "", "access_control_mode-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "encryption_key-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "initial_owner", &obj.InitialOwner, UnmarshalShareInitialOwner) if err != nil { + err = core.SDKErrorf(err, "", "initial_owner-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "size", &obj.Size) if err != nil { + err = core.SDKErrorf(err, "", "size-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "replication_cron_spec", &obj.ReplicationCronSpec) if err != nil { + err = core.SDKErrorf(err, "", "replication_cron_spec-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "source_share", &obj.SourceShare, UnmarshalShareIdentity) if err != nil { + err = core.SDKErrorf(err, "", "source_share-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -73101,6 +79669,9 @@ func (*VpcV1) NewSharePrototypeShareContext(profile ShareProfileIdentityIntf, re Zone: zone, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -73109,34 +79680,42 @@ func UnmarshalSharePrototypeShareContext(m map[string]json.RawMessage, result in obj := new(SharePrototypeShareContext) err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { + err = core.SDKErrorf(err, "", "iops-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "mount_targets", &obj.MountTargets, UnmarshalShareMountTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "mount_targets-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalShareProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "replication_cron_spec", &obj.ReplicationCronSpec) if err != nil { + err = core.SDKErrorf(err, "", "replication_cron_spec-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { + err = core.SDKErrorf(err, "", "user_tags-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -73180,30 +79759,37 @@ func UnmarshalShareReference(m map[string]json.RawMessage, result interface{}) ( obj := new(ShareReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalShareReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalShareRemote) if err != nil { + err = core.SDKErrorf(err, "", "remote-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -73222,6 +79808,7 @@ func UnmarshalShareReferenceDeleted(m map[string]json.RawMessage, result interfa obj := new(ShareReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -73241,6 +79828,7 @@ func UnmarshalShareRemote(m map[string]json.RawMessage, result interface{}) (err obj := new(ShareRemote) err = core.UnmarshalModel(m, "region", &obj.Region, UnmarshalRegionReference) if err != nil { + err = core.SDKErrorf(err, "", "region-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -73278,14 +79866,17 @@ func UnmarshalShareReplicationStatusReason(m map[string]json.RawMessage, result obj := new(ShareReplicationStatusReason) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "message", &obj.Message) if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -73411,102 +80002,127 @@ func UnmarshalSnapshot(m map[string]json.RawMessage, result interface{}) (err er obj := new(Snapshot) err = core.UnmarshalModel(m, "backup_policy_plan", &obj.BackupPolicyPlan, UnmarshalBackupPolicyPlanReference) if err != nil { + err = core.SDKErrorf(err, "", "backup_policy_plan-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "bootable", &obj.Bootable) if err != nil { + err = core.SDKErrorf(err, "", "bootable-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "captured_at", &obj.CapturedAt) if err != nil { + err = core.SDKErrorf(err, "", "captured_at-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "clones", &obj.Clones, UnmarshalSnapshotClone) if err != nil { + err = core.SDKErrorf(err, "", "clones-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "copies", &obj.Copies, UnmarshalSnapshotCopiesItem) if err != nil { + err = core.SDKErrorf(err, "", "copies-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "deletable", &obj.Deletable) if err != nil { + err = core.SDKErrorf(err, "", "deletable-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "encryption", &obj.Encryption) if err != nil { + err = core.SDKErrorf(err, "", "encryption-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyReference) if err != nil { + err = core.SDKErrorf(err, "", "encryption_key-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "minimum_capacity", &obj.MinimumCapacity) if err != nil { + err = core.SDKErrorf(err, "", "minimum_capacity-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "operating_system", &obj.OperatingSystem, UnmarshalOperatingSystem) if err != nil { + err = core.SDKErrorf(err, "", "operating_system-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "service_tags", &obj.ServiceTags) if err != nil { + err = core.SDKErrorf(err, "", "service_tags-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "size", &obj.Size) if err != nil { + err = core.SDKErrorf(err, "", "size-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "snapshot_consistency_group", &obj.SnapshotConsistencyGroup, UnmarshalSnapshotConsistencyGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "snapshot_consistency_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "source_image", &obj.SourceImage, UnmarshalImageReference) if err != nil { + err = core.SDKErrorf(err, "", "source_image-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "source_snapshot", &obj.SourceSnapshot, UnmarshalSnapshotSourceSnapshot) if err != nil { + err = core.SDKErrorf(err, "", "source_snapshot-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "source_volume", &obj.SourceVolume, UnmarshalVolumeReference) if err != nil { + err = core.SDKErrorf(err, "", "source_volume-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { + err = core.SDKErrorf(err, "", "user_tags-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -73530,14 +80146,17 @@ func UnmarshalSnapshotClone(m map[string]json.RawMessage, result interface{}) (e obj := new(SnapshotClone) err = core.UnmarshalPrimitive(m, "available", &obj.Available) if err != nil { + err = core.SDKErrorf(err, "", "available-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -73555,6 +80174,7 @@ func UnmarshalSnapshotCloneCollection(m map[string]json.RawMessage, result inter obj := new(SnapshotCloneCollection) err = core.UnmarshalModel(m, "clones", &obj.Clones, UnmarshalSnapshotClone) if err != nil { + err = core.SDKErrorf(err, "", "clones-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -73574,6 +80194,9 @@ func (*VpcV1) NewSnapshotClonePrototype(zone ZoneIdentityIntf) (_model *Snapshot Zone: zone, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -73582,6 +80205,7 @@ func UnmarshalSnapshotClonePrototype(m map[string]json.RawMessage, result interf obj := new(SnapshotClonePrototype) err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -73612,22 +80236,27 @@ func UnmarshalSnapshotCollection(m map[string]json.RawMessage, result interface{ obj := new(SnapshotCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalSnapshotCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalSnapshotCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "snapshots", &obj.Snapshots, UnmarshalSnapshot) if err != nil { + err = core.SDKErrorf(err, "", "snapshots-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -73640,8 +80269,11 @@ func (resp *SnapshotCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -73657,6 +80289,7 @@ func UnmarshalSnapshotCollectionFirst(m map[string]json.RawMessage, result inter obj := new(SnapshotCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -73674,6 +80307,7 @@ func UnmarshalSnapshotCollectionNext(m map[string]json.RawMessage, result interf obj := new(SnapshotCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -73746,50 +80380,62 @@ func UnmarshalSnapshotConsistencyGroup(m map[string]json.RawMessage, result inte obj := new(SnapshotConsistencyGroup) err = core.UnmarshalModel(m, "backup_policy_plan", &obj.BackupPolicyPlan, UnmarshalBackupPolicyPlanReference) if err != nil { + err = core.SDKErrorf(err, "", "backup_policy_plan-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "delete_snapshots_on_delete", &obj.DeleteSnapshotsOnDelete) if err != nil { + err = core.SDKErrorf(err, "", "delete_snapshots_on_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "service_tags", &obj.ServiceTags) if err != nil { + err = core.SDKErrorf(err, "", "service_tags-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "snapshots", &obj.Snapshots, UnmarshalSnapshotReference) if err != nil { + err = core.SDKErrorf(err, "", "snapshots-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -73820,22 +80466,27 @@ func UnmarshalSnapshotConsistencyGroupCollection(m map[string]json.RawMessage, r obj := new(SnapshotConsistencyGroupCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalSnapshotConsistencyGroupCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalSnapshotConsistencyGroupCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "snapshot_consistency_groups", &obj.SnapshotConsistencyGroups, UnmarshalSnapshotConsistencyGroup) if err != nil { + err = core.SDKErrorf(err, "", "snapshot_consistency_groups-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -73848,8 +80499,11 @@ func (resp *SnapshotConsistencyGroupCollection) GetNextStart() (*string, error) return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -73865,6 +80519,7 @@ func UnmarshalSnapshotConsistencyGroupCollectionFirst(m map[string]json.RawMessa obj := new(SnapshotConsistencyGroupCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -73882,6 +80537,7 @@ func UnmarshalSnapshotConsistencyGroupCollectionNext(m map[string]json.RawMessag obj := new(SnapshotConsistencyGroupCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -73903,10 +80559,12 @@ func UnmarshalSnapshotConsistencyGroupPatch(m map[string]json.RawMessage, result obj := new(SnapshotConsistencyGroupPatch) err = core.UnmarshalPrimitive(m, "delete_snapshots_on_delete", &obj.DeleteSnapshotsOnDelete) if err != nil { + err = core.SDKErrorf(err, "", "delete_snapshots_on_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -73920,6 +80578,9 @@ func (snapshotConsistencyGroupPatch *SnapshotConsistencyGroupPatch) AsPatch() (_ if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -73958,18 +80619,22 @@ func UnmarshalSnapshotConsistencyGroupPrototype(m map[string]json.RawMessage, re obj := new(SnapshotConsistencyGroupPrototype) err = core.UnmarshalPrimitive(m, "delete_snapshots_on_delete", &obj.DeleteSnapshotsOnDelete) if err != nil { + err = core.SDKErrorf(err, "", "delete_snapshots_on_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "snapshots", &obj.Snapshots, UnmarshalSnapshotPrototypeSnapshotConsistencyGroupContext) if err != nil { + err = core.SDKErrorf(err, "", "snapshots-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -74010,26 +80675,32 @@ func UnmarshalSnapshotConsistencyGroupReference(m map[string]json.RawMessage, re obj := new(SnapshotConsistencyGroupReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalSnapshotConsistencyGroupReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -74048,6 +80719,7 @@ func UnmarshalSnapshotConsistencyGroupReferenceDeleted(m map[string]json.RawMess obj := new(SnapshotConsistencyGroupReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -74091,30 +80763,37 @@ func UnmarshalSnapshotCopiesItem(m map[string]json.RawMessage, result interface{ obj := new(SnapshotCopiesItem) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalSnapshotReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSnapshotRemote) if err != nil { + err = core.SDKErrorf(err, "", "remote-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -74150,14 +80829,17 @@ func UnmarshalSnapshotIdentity(m map[string]json.RawMessage, result interface{}) obj := new(SnapshotIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -74178,10 +80860,12 @@ func UnmarshalSnapshotPatch(m map[string]json.RawMessage, result interface{}) (e obj := new(SnapshotPatch) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { + err = core.SDKErrorf(err, "", "user_tags-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -74195,6 +80879,9 @@ func (snapshotPatch *SnapshotPatch) AsPatch() (_patch map[string]interface{}, er if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -74249,30 +80936,37 @@ func UnmarshalSnapshotPrototype(m map[string]json.RawMessage, result interface{} obj := new(SnapshotPrototype) err = core.UnmarshalModel(m, "clones", &obj.Clones, UnmarshalSnapshotClonePrototype) if err != nil { + err = core.SDKErrorf(err, "", "clones-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { + err = core.SDKErrorf(err, "", "user_tags-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "source_volume", &obj.SourceVolume, UnmarshalVolumeIdentity) if err != nil { + err = core.SDKErrorf(err, "", "source_volume-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "encryption_key-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "source_snapshot", &obj.SourceSnapshot, UnmarshalSnapshotIdentityByCRN) if err != nil { + err = core.SDKErrorf(err, "", "source_snapshot-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -74298,6 +80992,9 @@ func (*VpcV1) NewSnapshotPrototypeSnapshotConsistencyGroupContext(sourceVolume V SourceVolume: sourceVolume, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -74306,14 +81003,17 @@ func UnmarshalSnapshotPrototypeSnapshotConsistencyGroupContext(m map[string]json obj := new(SnapshotPrototypeSnapshotConsistencyGroupContext) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "source_volume", &obj.SourceVolume, UnmarshalVolumeIdentity) if err != nil { + err = core.SDKErrorf(err, "", "source_volume-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { + err = core.SDKErrorf(err, "", "user_tags-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -74357,30 +81057,37 @@ func UnmarshalSnapshotReference(m map[string]json.RawMessage, result interface{} obj := new(SnapshotReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalSnapshotReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSnapshotRemote) if err != nil { + err = core.SDKErrorf(err, "", "remote-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -74399,6 +81106,7 @@ func UnmarshalSnapshotReferenceDeleted(m map[string]json.RawMessage, result inte obj := new(SnapshotReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -74418,6 +81126,7 @@ func UnmarshalSnapshotRemote(m map[string]json.RawMessage, result interface{}) ( obj := new(SnapshotRemote) err = core.UnmarshalModel(m, "region", &obj.Region, UnmarshalRegionReference) if err != nil { + err = core.SDKErrorf(err, "", "region-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -74461,30 +81170,37 @@ func UnmarshalSnapshotSourceSnapshot(m map[string]json.RawMessage, result interf obj := new(SnapshotSourceSnapshot) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalSnapshotReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSnapshotRemote) if err != nil { + err = core.SDKErrorf(err, "", "remote-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -74652,70 +81368,87 @@ func UnmarshalSubnet(m map[string]json.RawMessage, result interface{}) (err erro obj := new(Subnet) err = core.UnmarshalPrimitive(m, "available_ipv4_address_count", &obj.AvailableIpv4AddressCount) if err != nil { + err = core.SDKErrorf(err, "", "available_ipv4_address_count-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { + err = core.SDKErrorf(err, "", "ip_version-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "ipv4_cidr_block", &obj.Ipv4CIDRBlock) if err != nil { + err = core.SDKErrorf(err, "", "ipv4_cidr_block-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_acl", &obj.NetworkACL, UnmarshalNetworkACLReference) if err != nil { + err = core.SDKErrorf(err, "", "network_acl-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "public_gateway", &obj.PublicGateway, UnmarshalPublicGatewayReference) if err != nil { + err = core.SDKErrorf(err, "", "public_gateway-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "routing_table", &obj.RoutingTable, UnmarshalRoutingTableReference) if err != nil { + err = core.SDKErrorf(err, "", "routing_table-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_ipv4_address_count", &obj.TotalIpv4AddressCount) if err != nil { + err = core.SDKErrorf(err, "", "total_ipv4_address_count-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -74746,22 +81479,27 @@ func UnmarshalSubnetCollection(m map[string]json.RawMessage, result interface{}) obj := new(SubnetCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalSubnetCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalSubnetCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnets", &obj.Subnets, UnmarshalSubnet) if err != nil { + err = core.SDKErrorf(err, "", "subnets-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -74774,8 +81512,11 @@ func (resp *SubnetCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -74791,6 +81532,7 @@ func UnmarshalSubnetCollectionFirst(m map[string]json.RawMessage, result interfa obj := new(SubnetCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -74808,6 +81550,7 @@ func UnmarshalSubnetCollectionNext(m map[string]json.RawMessage, result interfac obj := new(SubnetCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -74843,14 +81586,17 @@ func UnmarshalSubnetIdentity(m map[string]json.RawMessage, result interface{}) ( obj := new(SubnetIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -74879,18 +81625,22 @@ func UnmarshalSubnetPatch(m map[string]json.RawMessage, result interface{}) (err obj := new(SubnetPatch) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_acl", &obj.NetworkACL, UnmarshalNetworkACLIdentity) if err != nil { + err = core.SDKErrorf(err, "", "network_acl-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "public_gateway", &obj.PublicGateway, UnmarshalSubnetPublicGatewayPatch) if err != nil { + err = core.SDKErrorf(err, "", "public_gateway-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "routing_table", &obj.RoutingTable, UnmarshalRoutingTableIdentity) if err != nil { + err = core.SDKErrorf(err, "", "routing_table-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -74904,6 +81654,9 @@ func (subnetPatch *SubnetPatch) AsPatch() (_patch map[string]interface{}, err er if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -74973,42 +81726,52 @@ func UnmarshalSubnetPrototype(m map[string]json.RawMessage, result interface{}) obj := new(SubnetPrototype) err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { + err = core.SDKErrorf(err, "", "ip_version-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_acl", &obj.NetworkACL, UnmarshalNetworkACLIdentity) if err != nil { + err = core.SDKErrorf(err, "", "network_acl-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "public_gateway", &obj.PublicGateway, UnmarshalPublicGatewayIdentity) if err != nil { + err = core.SDKErrorf(err, "", "public_gateway-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "routing_table", &obj.RoutingTable, UnmarshalRoutingTableIdentity) if err != nil { + err = core.SDKErrorf(err, "", "routing_table-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_ipv4_address_count", &obj.TotalIpv4AddressCount) if err != nil { + err = core.SDKErrorf(err, "", "total_ipv4_address_count-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "ipv4_cidr_block", &obj.Ipv4CIDRBlock) if err != nil { + err = core.SDKErrorf(err, "", "ipv4_cidr_block-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -75044,14 +81807,17 @@ func UnmarshalSubnetPublicGatewayPatch(m map[string]json.RawMessage, result inte obj := new(SubnetPublicGatewayPatch) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -75091,26 +81857,32 @@ func UnmarshalSubnetReference(m map[string]json.RawMessage, result interface{}) obj := new(SubnetReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalSubnetReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -75129,6 +81901,7 @@ func UnmarshalSubnetReferenceDeleted(m map[string]json.RawMessage, result interf obj := new(SubnetReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -75160,10 +81933,12 @@ func UnmarshalTrustedProfileIdentity(m map[string]json.RawMessage, result interf obj := new(TrustedProfileIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -75193,14 +81968,17 @@ func UnmarshalTrustedProfileReference(m map[string]json.RawMessage, result inter obj := new(TrustedProfileReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -77974,14 +84752,17 @@ func UnmarshalVcpu(m map[string]json.RawMessage, result interface{}) (err error) obj := new(Vcpu) err = core.UnmarshalPrimitive(m, "architecture", &obj.Architecture) if err != nil { + err = core.SDKErrorf(err, "", "architecture-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "count", &obj.Count) if err != nil { + err = core.SDKErrorf(err, "", "count-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "manufacturer", &obj.Manufacturer) if err != nil { + err = core.SDKErrorf(err, "", "manufacturer-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -78085,66 +84866,82 @@ func UnmarshalVPC(m map[string]json.RawMessage, result interface{}) (err error) obj := new(VPC) err = core.UnmarshalPrimitive(m, "classic_access", &obj.ClassicAccess) if err != nil { + err = core.SDKErrorf(err, "", "classic_access-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "cse_source_ips", &obj.CseSourceIps, UnmarshalVpccseSourceIP) if err != nil { + err = core.SDKErrorf(err, "", "cse_source_ips-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_network_acl", &obj.DefaultNetworkACL, UnmarshalNetworkACLReference) if err != nil { + err = core.SDKErrorf(err, "", "default_network_acl-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_routing_table", &obj.DefaultRoutingTable, UnmarshalRoutingTableReference) if err != nil { + err = core.SDKErrorf(err, "", "default_routing_table-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_security_group", &obj.DefaultSecurityGroup, UnmarshalSecurityGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "default_security_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "dns", &obj.Dns, UnmarshalVpcdns) if err != nil { + err = core.SDKErrorf(err, "", "dns-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "health_reasons", &obj.HealthReasons, UnmarshalVPCHealthReason) if err != nil { + err = core.SDKErrorf(err, "", "health_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "health_state", &obj.HealthState) if err != nil { + err = core.SDKErrorf(err, "", "health_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -78165,10 +84962,12 @@ func UnmarshalVpccseSourceIP(m map[string]json.RawMessage, result interface{}) ( obj := new(VpccseSourceIP) err = core.UnmarshalModel(m, "ip", &obj.IP, UnmarshalIP) if err != nil { + err = core.SDKErrorf(err, "", "ip-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -78199,22 +84998,27 @@ func UnmarshalVPCCollection(m map[string]json.RawMessage, result interface{}) (e obj := new(VPCCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalVPCCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalVPCCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpcs", &obj.Vpcs, UnmarshalVPC) if err != nil { + err = core.SDKErrorf(err, "", "vpcs-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -78227,8 +85031,11 @@ func (resp *VPCCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -78244,6 +85051,7 @@ func UnmarshalVPCCollectionFirst(m map[string]json.RawMessage, result interface{ obj := new(VPCCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -78261,6 +85069,7 @@ func UnmarshalVPCCollectionNext(m map[string]json.RawMessage, result interface{} obj := new(VPCCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -78284,14 +85093,17 @@ func UnmarshalVpcdns(m map[string]json.RawMessage, result interface{}) (err erro obj := new(Vpcdns) err = core.UnmarshalPrimitive(m, "enable_hub", &obj.EnableHub) if err != nil { + err = core.SDKErrorf(err, "", "enable_hub-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resolution_binding_count", &obj.ResolutionBindingCount) if err != nil { + err = core.SDKErrorf(err, "", "resolution_binding_count-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resolver", &obj.Resolver, UnmarshalVpcdnsResolver) if err != nil { + err = core.SDKErrorf(err, "", "resolver-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -78316,10 +85128,12 @@ func UnmarshalVpcdnsPatch(m map[string]json.RawMessage, result interface{}) (err obj := new(VpcdnsPatch) err = core.UnmarshalPrimitive(m, "enable_hub", &obj.EnableHub) if err != nil { + err = core.SDKErrorf(err, "", "enable_hub-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resolver", &obj.Resolver, UnmarshalVpcdnsResolverPatch) if err != nil { + err = core.SDKErrorf(err, "", "resolver-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -78342,10 +85156,12 @@ func UnmarshalVpcdnsPrototype(m map[string]json.RawMessage, result interface{}) obj := new(VpcdnsPrototype) err = core.UnmarshalPrimitive(m, "enable_hub", &obj.EnableHub) if err != nil { + err = core.SDKErrorf(err, "", "enable_hub-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resolver", &obj.Resolver, UnmarshalVpcdnsResolverPrototype) if err != nil { + err = core.SDKErrorf(err, "", "resolver-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -78434,42 +85250,52 @@ func UnmarshalVpcdnsResolutionBinding(m map[string]json.RawMessage, result inter obj := new(VpcdnsResolutionBinding) err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "endpoint_gateways", &obj.EndpointGateways, UnmarshalEndpointGatewayReferenceRemote) if err != nil { + err = core.SDKErrorf(err, "", "endpoint_gateways-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "health_reasons", &obj.HealthReasons, UnmarshalVpcdnsResolutionBindingHealthReason) if err != nil { + err = core.SDKErrorf(err, "", "health_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "health_state", &obj.HealthState) if err != nil { + err = core.SDKErrorf(err, "", "health_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReferenceRemote) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -78500,22 +85326,27 @@ func UnmarshalVpcdnsResolutionBindingCollection(m map[string]json.RawMessage, re obj := new(VpcdnsResolutionBindingCollection) err = core.UnmarshalModel(m, "dns_resolution_bindings", &obj.DnsResolutionBindings, UnmarshalVpcdnsResolutionBinding) if err != nil { + err = core.SDKErrorf(err, "", "dns_resolution_bindings-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalVpcdnsResolutionBindingCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalVpcdnsResolutionBindingCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -78528,8 +85359,11 @@ func (resp *VpcdnsResolutionBindingCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -78558,14 +85392,17 @@ func UnmarshalVpcdnsResolutionBindingHealthReason(m map[string]json.RawMessage, obj := new(VpcdnsResolutionBindingHealthReason) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "message", &obj.Message) if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -78583,6 +85420,7 @@ func UnmarshalVpcdnsResolutionBindingPatch(m map[string]json.RawMessage, result obj := new(VpcdnsResolutionBindingPatch) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -78596,6 +85434,9 @@ func (vpcdnsResolutionBindingPatch *VpcdnsResolutionBindingPatch) AsPatch() (_pa if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -78707,22 +85548,27 @@ func UnmarshalVpcdnsResolver(m map[string]json.RawMessage, result interface{}) ( obj := new(VpcdnsResolver) err = core.UnmarshalModel(m, "servers", &obj.Servers, UnmarshalDnsServer) if err != nil { + err = core.SDKErrorf(err, "", "servers-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReferenceDnsResolverContext) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "manual_servers", &obj.ManualServers, UnmarshalDnsServer) if err != nil { + err = core.SDKErrorf(err, "", "manual_servers-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "configuration", &obj.Configuration) if err != nil { + err = core.SDKErrorf(err, "", "configuration-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -78801,14 +85647,17 @@ func UnmarshalVpcdnsResolverPatch(m map[string]json.RawMessage, result interface obj := new(VpcdnsResolverPatch) err = core.UnmarshalModel(m, "manual_servers", &obj.ManualServers, UnmarshalDnsServerPrototype) if err != nil { + err = core.SDKErrorf(err, "", "manual_servers-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVpcdnsResolverVPCPatch) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -78866,10 +85715,12 @@ func UnmarshalVpcdnsResolverPrototype(m map[string]json.RawMessage, result inter obj := new(VpcdnsResolverPrototype) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "manual_servers", &obj.ManualServers, UnmarshalDnsServerPrototype) if err != nil { + err = core.SDKErrorf(err, "", "manual_servers-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -78911,14 +85762,17 @@ func UnmarshalVpcdnsResolverVPCPatch(m map[string]json.RawMessage, result interf obj := new(VpcdnsResolverVPCPatch) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -78949,14 +85803,17 @@ func UnmarshalVPCHealthReason(m map[string]json.RawMessage, result interface{}) obj := new(VPCHealthReason) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "message", &obj.Message) if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -78992,14 +85849,17 @@ func UnmarshalVPCIdentity(m map[string]json.RawMessage, result interface{}) (err obj := new(VPCIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -79020,10 +85880,12 @@ func UnmarshalVPCPatch(m map[string]json.RawMessage, result interface{}) (err er obj := new(VPCPatch) err = core.UnmarshalModel(m, "dns", &obj.Dns, UnmarshalVpcdnsPatch) if err != nil { + err = core.SDKErrorf(err, "", "dns-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -79037,6 +85899,9 @@ func (vpcPatch *VPCPatch) AsPatch() (_patch map[string]interface{}, err error) { if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -79073,26 +85938,32 @@ func UnmarshalVPCReference(m map[string]json.RawMessage, result interface{}) (er obj := new(VPCReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVPCReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -79138,30 +86009,37 @@ func UnmarshalVPCReferenceDnsResolverContext(m map[string]json.RawMessage, resul obj := new(VPCReferenceDnsResolverContext) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVPCReferenceDnsResolverContextDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalVPCRemote) if err != nil { + err = core.SDKErrorf(err, "", "remote-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -79180,6 +86058,7 @@ func UnmarshalVPCReferenceDeleted(m map[string]json.RawMessage, result interface obj := new(VPCReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -79198,6 +86077,7 @@ func UnmarshalVPCReferenceDnsResolverContextDeleted(m map[string]json.RawMessage obj := new(VPCReferenceDnsResolverContextDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -79237,26 +86117,32 @@ func UnmarshalVPCReferenceRemote(m map[string]json.RawMessage, result interface{ obj := new(VPCReferenceRemote) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalVPCRemote) if err != nil { + err = core.SDKErrorf(err, "", "remote-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -79280,10 +86166,12 @@ func UnmarshalVPCRemote(m map[string]json.RawMessage, result interface{}) (err e obj := new(VPCRemote) err = core.UnmarshalModel(m, "account", &obj.Account, UnmarshalAccountReference) if err != nil { + err = core.SDKErrorf(err, "", "account-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "region", &obj.Region, UnmarshalRegionReference) if err != nil { + err = core.SDKErrorf(err, "", "region-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -79401,66 +86289,82 @@ func UnmarshalVPNGateway(m map[string]json.RawMessage, result interface{}) (err obj := new(VPNGateway) err = core.UnmarshalModel(m, "connections", &obj.Connections, UnmarshalVPNGatewayConnectionReference) if err != nil { + err = core.SDKErrorf(err, "", "connections-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "health_reasons", &obj.HealthReasons, UnmarshalVPNGatewayHealthReason) if err != nil { + err = core.SDKErrorf(err, "", "health_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "health_state", &obj.HealthState) if err != nil { + err = core.SDKErrorf(err, "", "health_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "lifecycle_reasons", &obj.LifecycleReasons, UnmarshalVPNGatewayLifecycleReason) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "members", &obj.Members, UnmarshalVPNGatewayMember) if err != nil { + err = core.SDKErrorf(err, "", "members-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "mode", &obj.Mode) if err != nil { + err = core.SDKErrorf(err, "", "mode-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -79491,22 +86395,27 @@ func UnmarshalVPNGatewayCollection(m map[string]json.RawMessage, result interfac obj := new(VPNGatewayCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalVPNGatewayCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalVPNGatewayCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpn_gateways", &obj.VPNGateways, UnmarshalVPNGateway) if err != nil { + err = core.SDKErrorf(err, "", "vpn_gateways-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -79519,8 +86428,11 @@ func (resp *VPNGatewayCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -79536,6 +86448,7 @@ func UnmarshalVPNGatewayCollectionFirst(m map[string]json.RawMessage, result int obj := new(VPNGatewayCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -79553,6 +86466,7 @@ func UnmarshalVPNGatewayCollectionNext(m map[string]json.RawMessage, result inte obj := new(VPNGatewayCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -79576,6 +86490,15 @@ type VPNGatewayConnection struct { // The Dead Peer Detection settings. DeadPeerDetection *VPNGatewayConnectionDpd `json:"dead_peer_detection" validate:"required"` + // The establish mode of the VPN gateway connection: + // - `bidirectional`: Either side of the VPN gateway can initiate IKE protocol + // negotiations or rekeying processes. + // - `peer_only`: Only the peer can initiate IKE protocol negotiations for this VPN gateway + // connection. Additionally, the peer is responsible for initiating the rekeying process + // after the connection is established. If rekeying does not occur, the VPN gateway + // connection will be brought down after its lifetime expires. + EstablishMode *string `json:"establish_mode" validate:"required"` + // The VPN connection's canonical URL. Href *string `json:"href" validate:"required"` @@ -79596,9 +86519,6 @@ type VPNGatewayConnection struct { // The name for this VPN gateway connection. The name is unique across all connections for the VPN gateway. Name *string `json:"name" validate:"required"` - // The IP address of the peer VPN gateway. - PeerAddress *string `json:"peer_address" validate:"required"` - // The pre-shared key. Psk *string `json:"psk" validate:"required"` @@ -79611,17 +86531,15 @@ type VPNGatewayConnection struct { // The reasons for the current VPN gateway connection status (if any). StatusReasons []VPNGatewayConnectionStatusReason `json:"status_reasons" validate:"required"` + Local *VPNGatewayConnectionStaticRouteModeLocal `json:"local,omitempty"` + + Peer VPNGatewayConnectionStaticRouteModePeerIntf `json:"peer,omitempty"` + // Routing protocols are disabled for this VPN gateway connection. RoutingProtocol *string `json:"routing_protocol,omitempty"` // The VPN tunnel configuration for this VPN gateway connection (in static route mode). Tunnels []VPNGatewayConnectionStaticRouteModeTunnel `json:"tunnels,omitempty"` - - // The local CIDRs for this resource. - LocalCIDRs []string `json:"local_cidrs,omitempty"` - - // The peer CIDRs for this resource. - PeerCIDRs []string `json:"peer_cidrs,omitempty"` } // Constants associated with the VPNGatewayConnection.AuthenticationMode property. @@ -79630,6 +86548,19 @@ const ( VPNGatewayConnectionAuthenticationModePskConst = "psk" ) +// Constants associated with the VPNGatewayConnection.EstablishMode property. +// The establish mode of the VPN gateway connection: +// - `bidirectional`: Either side of the VPN gateway can initiate IKE protocol +// negotiations or rekeying processes. +// - `peer_only`: Only the peer can initiate IKE protocol negotiations for this VPN gateway +// connection. Additionally, the peer is responsible for initiating the rekeying process +// after the connection is established. If rekeying does not occur, the VPN gateway +// connection will be brought down after its lifetime expires. +const ( + VPNGatewayConnectionEstablishModeBidirectionalConst = "bidirectional" + VPNGatewayConnectionEstablishModePeerOnlyConst = "peer_only" +) + // Constants associated with the VPNGatewayConnection.Mode property. // The mode of the VPN gateway. const ( @@ -79670,23 +86601,49 @@ func UnmarshalVPNGatewayConnection(m map[string]json.RawMessage, result interfac var discValue string err = core.UnmarshalPrimitive(m, "mode", &discValue) if err != nil { - err = fmt.Errorf("error unmarshalling discriminator property 'mode': %s", err.Error()) + errMsg := fmt.Sprintf("error unmarshalling discriminator property 'mode': %s", err.Error()) + err = core.SDKErrorf(err, errMsg, "discriminator-unmarshal-error", common.GetComponentInfo()) return } if discValue == "" { - err = fmt.Errorf("required discriminator property 'mode' not found in JSON object") + err = core.SDKErrorf(err, "required discriminator property 'mode' not found in JSON object", "missing-discriminator", common.GetComponentInfo()) return } if discValue == "policy" { err = core.UnmarshalModel(m, "", result, UnmarshalVPNGatewayConnectionPolicyMode) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-VPNGatewayConnectionPolicyMode-error", common.GetComponentInfo()) + } } else if discValue == "route" { err = core.UnmarshalModel(m, "", result, UnmarshalVPNGatewayConnectionRouteMode) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-VPNGatewayConnectionRouteMode-error", common.GetComponentInfo()) + } } else { - err = fmt.Errorf("unrecognized value for discriminator property 'mode': %s", discValue) + errMsg := fmt.Sprintf("unrecognized value for discriminator property 'mode': %s", discValue) + err = core.SDKErrorf(err, errMsg, "invalid-discriminator", common.GetComponentInfo()) } return } +// VPNGatewayConnectionCIDRs : VPNGatewayConnectionCIDRs struct +type VPNGatewayConnectionCIDRs struct { + // The CIDRs for this resource. + CIDRs []string `json:"cidrs" validate:"required"` +} + +// UnmarshalVPNGatewayConnectionCIDRs unmarshals an instance of VPNGatewayConnectionCIDRs from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionCIDRs(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionCIDRs) + err = core.UnmarshalPrimitive(m, "cidrs", &obj.CIDRs) + if err != nil { + err = core.SDKErrorf(err, "", "cidrs-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // VPNGatewayConnectionCollection : Collection of VPN gateway connections in a VPN gateway. type VPNGatewayConnectionCollection struct { // Array of VPN gateway connections. @@ -79698,6 +86655,7 @@ func UnmarshalVPNGatewayConnectionCollection(m map[string]json.RawMessage, resul obj := new(VPNGatewayConnectionCollection) err = core.UnmarshalModel(m, "connections", &obj.Connections, UnmarshalVPNGatewayConnection) if err != nil { + err = core.SDKErrorf(err, "", "connections-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -79730,14 +86688,17 @@ func UnmarshalVPNGatewayConnectionDpd(m map[string]json.RawMessage, result inter obj := new(VPNGatewayConnectionDpd) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { + err = core.SDKErrorf(err, "", "action-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "interval", &obj.Interval) if err != nil { + err = core.SDKErrorf(err, "", "interval-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "timeout", &obj.Timeout) if err != nil { + err = core.SDKErrorf(err, "", "timeout-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -79770,14 +86731,17 @@ func UnmarshalVPNGatewayConnectionDpdPatch(m map[string]json.RawMessage, result obj := new(VPNGatewayConnectionDpdPatch) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { + err = core.SDKErrorf(err, "", "action-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "interval", &obj.Interval) if err != nil { + err = core.SDKErrorf(err, "", "interval-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "timeout", &obj.Timeout) if err != nil { + err = core.SDKErrorf(err, "", "timeout-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -79810,14 +86774,119 @@ func UnmarshalVPNGatewayConnectionDpdPrototype(m map[string]json.RawMessage, res obj := new(VPNGatewayConnectionDpdPrototype) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { + err = core.SDKErrorf(err, "", "action-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "interval", &obj.Interval) if err != nil { + err = core.SDKErrorf(err, "", "interval-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "timeout", &obj.Timeout) if err != nil { + err = core.SDKErrorf(err, "", "timeout-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionIkeIdentity : VPNGatewayConnectionIkeIdentity struct +// Models which "extend" this model: +// - VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityFqdn +// - VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityHostname +// - VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityIPv4 +// - VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityKeyID +type VPNGatewayConnectionIkeIdentity struct { + // The IKE identity type. + // + // The enumerated values for this property may + // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + Type *string `json:"type" validate:"required"` + + // The IKE identity FQDN value. + Value *string `json:"value,omitempty"` +} + +// Constants associated with the VPNGatewayConnectionIkeIdentity.Type property. +// The IKE identity type. +// +// The enumerated values for this property may +// [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. +const ( + VPNGatewayConnectionIkeIdentityTypeFqdnConst = "fqdn" + VPNGatewayConnectionIkeIdentityTypeHostnameConst = "hostname" + VPNGatewayConnectionIkeIdentityTypeIpv4AddressConst = "ipv4_address" + VPNGatewayConnectionIkeIdentityTypeKeyIDConst = "key_id" +) + +func (*VPNGatewayConnectionIkeIdentity) isaVPNGatewayConnectionIkeIdentity() bool { + return true +} + +type VPNGatewayConnectionIkeIdentityIntf interface { + isaVPNGatewayConnectionIkeIdentity() bool +} + +// UnmarshalVPNGatewayConnectionIkeIdentity unmarshals an instance of VPNGatewayConnectionIkeIdentity from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionIkeIdentity(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionIkeIdentity) + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "value", &obj.Value) + if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionIkeIdentityPrototype : VPNGatewayConnectionIkeIdentityPrototype struct +// Models which "extend" this model: +// - VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn +// - VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityHostname +// - VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityIPv4 +// - VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityKeyID +type VPNGatewayConnectionIkeIdentityPrototype struct { + // The IKE identity type. + Type *string `json:"type" validate:"required"` + + // The IKE identity FQDN value. + Value *string `json:"value,omitempty"` +} + +// Constants associated with the VPNGatewayConnectionIkeIdentityPrototype.Type property. +// The IKE identity type. +const ( + VPNGatewayConnectionIkeIdentityPrototypeTypeFqdnConst = "fqdn" + VPNGatewayConnectionIkeIdentityPrototypeTypeHostnameConst = "hostname" + VPNGatewayConnectionIkeIdentityPrototypeTypeIpv4AddressConst = "ipv4_address" + VPNGatewayConnectionIkeIdentityPrototypeTypeKeyIDConst = "key_id" +) + +func (*VPNGatewayConnectionIkeIdentityPrototype) isaVPNGatewayConnectionIkeIdentityPrototype() bool { + return true +} + +type VPNGatewayConnectionIkeIdentityPrototypeIntf interface { + isaVPNGatewayConnectionIkeIdentityPrototype() bool +} + +// UnmarshalVPNGatewayConnectionIkeIdentityPrototype unmarshals an instance of VPNGatewayConnectionIkeIdentityPrototype from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionIkeIdentityPrototype(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionIkeIdentityPrototype) + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "value", &obj.Value) + if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -79850,10 +86919,12 @@ func UnmarshalVPNGatewayConnectionIkePolicyPatch(m map[string]json.RawMessage, r obj := new(VPNGatewayConnectionIkePolicyPatch) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -79886,10 +86957,12 @@ func UnmarshalVPNGatewayConnectionIkePolicyPrototype(m map[string]json.RawMessag obj := new(VPNGatewayConnectionIkePolicyPrototype) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -79922,10 +86995,12 @@ func UnmarshalVPNGatewayConnectionIPsecPolicyPatch(m map[string]json.RawMessage, obj := new(VPNGatewayConnectionIPsecPolicyPatch) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -79958,27 +87033,12 @@ func UnmarshalVPNGatewayConnectionIPsecPolicyPrototype(m map[string]json.RawMess obj := new(VPNGatewayConnectionIPsecPolicyPrototype) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// VPNGatewayConnectionLocalCIDRs : VPNGatewayConnectionLocalCIDRs struct -type VPNGatewayConnectionLocalCIDRs struct { - // The local CIDRs for this resource. - LocalCIDRs []string `json:"local_cidrs" validate:"required"` -} - -// UnmarshalVPNGatewayConnectionLocalCIDRs unmarshals an instance of VPNGatewayConnectionLocalCIDRs from the specified map of raw messages. -func UnmarshalVPNGatewayConnectionLocalCIDRs(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(VPNGatewayConnectionLocalCIDRs) - err = core.UnmarshalPrimitive(m, "local_cidrs", &obj.LocalCIDRs) - if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -79993,6 +87053,15 @@ type VPNGatewayConnectionPatch struct { // The Dead Peer Detection settings. DeadPeerDetection *VPNGatewayConnectionDpdPatch `json:"dead_peer_detection,omitempty"` + // The establish mode of the VPN gateway connection: + // - `bidirectional`: Either side of the VPN gateway can initiate IKE protocol + // negotiations or rekeying processes. + // - `peer_only`: Only the peer can initiate IKE protocol negotiations for this VPN gateway + // connection. Additionally, the peer is responsible for initiating the rekeying process + // after the connection is established. If rekeying does not occur, the VPN gateway + // connection will be brought down after its lifetime expires. + EstablishMode *string `json:"establish_mode,omitempty"` + // The IKE policy to use. Specify `null` to remove any existing policy, [resulting in // auto-negotiation](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ike-auto-negotiation-phase-1). IkePolicy VPNGatewayConnectionIkePolicyPatchIntf `json:"ike_policy,omitempty"` @@ -80004,8 +87073,7 @@ type VPNGatewayConnectionPatch struct { // The name for this VPN gateway connection. The name must not be used by another connection for the VPN gateway. Name *string `json:"name,omitempty"` - // The IP address of the peer VPN gateway. - PeerAddress *string `json:"peer_address,omitempty"` + Peer VPNGatewayConnectionPeerPatchIntf `json:"peer,omitempty"` // The pre-shared key. Psk *string `json:"psk,omitempty"` @@ -80014,6 +87082,19 @@ type VPNGatewayConnectionPatch struct { RoutingProtocol *string `json:"routing_protocol,omitempty"` } +// Constants associated with the VPNGatewayConnectionPatch.EstablishMode property. +// The establish mode of the VPN gateway connection: +// - `bidirectional`: Either side of the VPN gateway can initiate IKE protocol +// negotiations or rekeying processes. +// - `peer_only`: Only the peer can initiate IKE protocol negotiations for this VPN gateway +// connection. Additionally, the peer is responsible for initiating the rekeying process +// after the connection is established. If rekeying does not occur, the VPN gateway +// connection will be brought down after its lifetime expires. +const ( + VPNGatewayConnectionPatchEstablishModeBidirectionalConst = "bidirectional" + VPNGatewayConnectionPatchEstablishModePeerOnlyConst = "peer_only" +) + // Constants associated with the VPNGatewayConnectionPatch.RoutingProtocol property. // Routing protocols are disabled for this VPN gateway connection. const ( @@ -80025,34 +87106,47 @@ func UnmarshalVPNGatewayConnectionPatch(m map[string]json.RawMessage, result int obj := new(VPNGatewayConnectionPatch) err = core.UnmarshalPrimitive(m, "admin_state_up", &obj.AdminStateUp) if err != nil { + err = core.SDKErrorf(err, "", "admin_state_up-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "dead_peer_detection", &obj.DeadPeerDetection, UnmarshalVPNGatewayConnectionDpdPatch) if err != nil { + err = core.SDKErrorf(err, "", "dead_peer_detection-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "establish_mode", &obj.EstablishMode) + if err != nil { + err = core.SDKErrorf(err, "", "establish_mode-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalVPNGatewayConnectionIkePolicyPatch) if err != nil { + err = core.SDKErrorf(err, "", "ike_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalVPNGatewayConnectionIPsecPolicyPatch) if err != nil { + err = core.SDKErrorf(err, "", "ipsec_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "peer_address", &obj.PeerAddress) + err = core.UnmarshalModel(m, "peer", &obj.Peer, UnmarshalVPNGatewayConnectionPeerPatch) if err != nil { + err = core.SDKErrorf(err, "", "peer-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "psk", &obj.Psk) if err != nil { + err = core.SDKErrorf(err, "", "psk-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "routing_protocol", &obj.RoutingProtocol) if err != nil { + err = core.SDKErrorf(err, "", "routing_protocol-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -80066,20 +87160,242 @@ func (vpnGatewayConnectionPatch *VPNGatewayConnectionPatch) AsPatch() (_patch ma if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } + return +} + +// VPNGatewayConnectionPeerPatch : VPNGatewayConnectionPeerPatch struct +// Models which "extend" this model: +// - VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch +// - VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch +type VPNGatewayConnectionPeerPatch struct { + // The IP address of the peer VPN gateway for this connection. + Address *string `json:"address,omitempty"` + + // The FQDN of the peer VPN gateway for this connection. + Fqdn *string `json:"fqdn,omitempty"` +} + +func (*VPNGatewayConnectionPeerPatch) isaVPNGatewayConnectionPeerPatch() bool { + return true +} + +type VPNGatewayConnectionPeerPatchIntf interface { + isaVPNGatewayConnectionPeerPatch() bool +} + +// UnmarshalVPNGatewayConnectionPeerPatch unmarshals an instance of VPNGatewayConnectionPeerPatch from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionPeerPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionPeerPatch) + err = core.UnmarshalPrimitive(m, "address", &obj.Address) + if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "fqdn", &obj.Fqdn) + if err != nil { + err = core.SDKErrorf(err, "", "fqdn-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } -// VPNGatewayConnectionPeerCIDRs : VPNGatewayConnectionPeerCIDRs struct -type VPNGatewayConnectionPeerCIDRs struct { - // The peer CIDRs for this resource. - PeerCIDRs []string `json:"peer_cidrs" validate:"required"` +// VPNGatewayConnectionPolicyModeLocal : VPNGatewayConnectionPolicyModeLocal struct +type VPNGatewayConnectionPolicyModeLocal struct { + // The local CIDRs for this VPN gateway connection. + CIDRs []string `json:"cidrs" validate:"required"` + + // The local IKE identities. + // + // A VPN gateway in policy mode consists of two members in active-standby mode. The local IKE identity applies to the + // active member. + IkeIdentities []VPNGatewayConnectionIkeIdentityIntf `json:"ike_identities" validate:"required"` } -// UnmarshalVPNGatewayConnectionPeerCIDRs unmarshals an instance of VPNGatewayConnectionPeerCIDRs from the specified map of raw messages. -func UnmarshalVPNGatewayConnectionPeerCIDRs(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(VPNGatewayConnectionPeerCIDRs) - err = core.UnmarshalPrimitive(m, "peer_cidrs", &obj.PeerCIDRs) +// UnmarshalVPNGatewayConnectionPolicyModeLocal unmarshals an instance of VPNGatewayConnectionPolicyModeLocal from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionPolicyModeLocal(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionPolicyModeLocal) + err = core.UnmarshalPrimitive(m, "cidrs", &obj.CIDRs) if err != nil { + err = core.SDKErrorf(err, "", "cidrs-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "ike_identities", &obj.IkeIdentities, UnmarshalVPNGatewayConnectionIkeIdentity) + if err != nil { + err = core.SDKErrorf(err, "", "ike_identities-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionPolicyModeLocalPrototype : VPNGatewayConnectionPolicyModeLocalPrototype struct +type VPNGatewayConnectionPolicyModeLocalPrototype struct { + // The local CIDRs for this VPN gateway connection. + CIDRs []string `json:"cidrs" validate:"required"` + + // The local IKE identities to use. + // + // A VPN gateway in policy mode consists of two members in active-standby mode. The specified identity will be applied + // to the active member. + // + // If unspecified, then `type` will be `ipv4_address` and `value` will be the public IP address of the VPN gateway. + IkeIdentities []VPNGatewayConnectionIkeIdentityPrototypeIntf `json:"ike_identities,omitempty"` +} + +// NewVPNGatewayConnectionPolicyModeLocalPrototype : Instantiate VPNGatewayConnectionPolicyModeLocalPrototype (Generic Model Constructor) +func (*VpcV1) NewVPNGatewayConnectionPolicyModeLocalPrototype(cidrs []string) (_model *VPNGatewayConnectionPolicyModeLocalPrototype, err error) { + _model = &VPNGatewayConnectionPolicyModeLocalPrototype{ + CIDRs: cidrs, + } + err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } + return +} + +// UnmarshalVPNGatewayConnectionPolicyModeLocalPrototype unmarshals an instance of VPNGatewayConnectionPolicyModeLocalPrototype from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionPolicyModeLocalPrototype(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionPolicyModeLocalPrototype) + err = core.UnmarshalPrimitive(m, "cidrs", &obj.CIDRs) + if err != nil { + err = core.SDKErrorf(err, "", "cidrs-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "ike_identities", &obj.IkeIdentities, UnmarshalVPNGatewayConnectionIkeIdentityPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "ike_identities-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionPolicyModePeer : VPNGatewayConnectionPolicyModePeer struct +// Models which "extend" this model: +// - VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress +// - VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFqdn +type VPNGatewayConnectionPolicyModePeer struct { + // The peer CIDRs for this VPN gateway connection. + CIDRs []string `json:"cidrs" validate:"required"` + + // The peer IKE identity. + IkeIdentity VPNGatewayConnectionIkeIdentityIntf `json:"ike_identity" validate:"required"` + + // Indicates whether `peer.address` or `peer.fqdn` is used. + Type *string `json:"type" validate:"required"` + + // The IP address of the peer VPN gateway for this connection. + Address *string `json:"address,omitempty"` + + // The FQDN of the peer VPN gateway for this connection. + Fqdn *string `json:"fqdn,omitempty"` +} + +// Constants associated with the VPNGatewayConnectionPolicyModePeer.Type property. +// Indicates whether `peer.address` or `peer.fqdn` is used. +const ( + VPNGatewayConnectionPolicyModePeerTypeAddressConst = "address" + VPNGatewayConnectionPolicyModePeerTypeFqdnConst = "fqdn" +) + +func (*VPNGatewayConnectionPolicyModePeer) isaVPNGatewayConnectionPolicyModePeer() bool { + return true +} + +type VPNGatewayConnectionPolicyModePeerIntf interface { + isaVPNGatewayConnectionPolicyModePeer() bool +} + +// UnmarshalVPNGatewayConnectionPolicyModePeer unmarshals an instance of VPNGatewayConnectionPolicyModePeer from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionPolicyModePeer(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionPolicyModePeer) + err = core.UnmarshalPrimitive(m, "cidrs", &obj.CIDRs) + if err != nil { + err = core.SDKErrorf(err, "", "cidrs-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "ike_identity", &obj.IkeIdentity, UnmarshalVPNGatewayConnectionIkeIdentity) + if err != nil { + err = core.SDKErrorf(err, "", "ike_identity-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "address", &obj.Address) + if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "fqdn", &obj.Fqdn) + if err != nil { + err = core.SDKErrorf(err, "", "fqdn-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionPolicyModePeerPrototype : VPNGatewayConnectionPolicyModePeerPrototype struct +// Models which "extend" this model: +// - VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress +// - VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFqdn +type VPNGatewayConnectionPolicyModePeerPrototype struct { + // The peer CIDRs for this VPN gateway connection. + CIDRs []string `json:"cidrs" validate:"required"` + + // The peer IKE identity to use. + // + // If unspecified: + // - If `peer.address` is specified, the `type` will be `ipv4_address`, and + // the `value` will be `peer.address`. + // - If `peer.fqdn` is specified, the `type` will be `fqdn`, and the `value` + // will be `peer.fqdn`. + IkeIdentity VPNGatewayConnectionIkeIdentityPrototypeIntf `json:"ike_identity,omitempty"` + + // The IP address of the peer VPN gateway for this connection. + Address *string `json:"address,omitempty"` + + // The FQDN of the peer VPN gateway for this connection. + Fqdn *string `json:"fqdn,omitempty"` +} + +func (*VPNGatewayConnectionPolicyModePeerPrototype) isaVPNGatewayConnectionPolicyModePeerPrototype() bool { + return true +} + +type VPNGatewayConnectionPolicyModePeerPrototypeIntf interface { + isaVPNGatewayConnectionPolicyModePeerPrototype() bool +} + +// UnmarshalVPNGatewayConnectionPolicyModePeerPrototype unmarshals an instance of VPNGatewayConnectionPolicyModePeerPrototype from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionPolicyModePeerPrototype(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionPolicyModePeerPrototype) + err = core.UnmarshalPrimitive(m, "cidrs", &obj.CIDRs) + if err != nil { + err = core.SDKErrorf(err, "", "cidrs-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "ike_identity", &obj.IkeIdentity, UnmarshalVPNGatewayConnectionIkeIdentityPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "ike_identity-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "address", &obj.Address) + if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "fqdn", &obj.Fqdn) + if err != nil { + err = core.SDKErrorf(err, "", "fqdn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -80097,6 +87413,15 @@ type VPNGatewayConnectionPrototype struct { // The Dead Peer Detection settings. DeadPeerDetection *VPNGatewayConnectionDpdPrototype `json:"dead_peer_detection,omitempty"` + // The establish mode of the VPN gateway connection: + // - `bidirectional`: Either side of the VPN gateway can initiate IKE protocol + // negotiations or rekeying processes. + // - `peer_only`: Only the peer can initiate IKE protocol negotiations for this VPN gateway + // connection. Additionally, the peer is responsible for initiating the rekeying process + // after the connection is established. If rekeying does not occur, the VPN gateway + // connection will be brought down after its lifetime expires. + EstablishMode *string `json:"establish_mode,omitempty"` + // The IKE policy to use. If unspecified, [auto-negotiation will be // used](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ike-auto-negotiation-phase-1). IkePolicy VPNGatewayConnectionIkePolicyPrototypeIntf `json:"ike_policy,omitempty"` @@ -80109,22 +87434,30 @@ type VPNGatewayConnectionPrototype struct { // unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` - // The IP address of the peer VPN gateway. - PeerAddress *string `json:"peer_address" validate:"required"` - // The pre-shared key. Psk *string `json:"psk" validate:"required"` - // Routing protocols are disabled for this VPN gateway connection. - RoutingProtocol *string `json:"routing_protocol,omitempty"` + Local *VPNGatewayConnectionStaticRouteModeLocalPrototype `json:"local,omitempty"` - // The local CIDRs for this resource. - LocalCIDRs []string `json:"local_cidrs,omitempty"` + Peer VPNGatewayConnectionStaticRouteModePeerPrototypeIntf `json:"peer,omitempty"` - // The peer CIDRs for this resource. - PeerCIDRs []string `json:"peer_cidrs,omitempty"` + // Routing protocols are disabled for this VPN gateway connection. + RoutingProtocol *string `json:"routing_protocol,omitempty"` } +// Constants associated with the VPNGatewayConnectionPrototype.EstablishMode property. +// The establish mode of the VPN gateway connection: +// - `bidirectional`: Either side of the VPN gateway can initiate IKE protocol +// negotiations or rekeying processes. +// - `peer_only`: Only the peer can initiate IKE protocol negotiations for this VPN gateway +// connection. Additionally, the peer is responsible for initiating the rekeying process +// after the connection is established. If rekeying does not occur, the VPN gateway +// connection will be brought down after its lifetime expires. +const ( + VPNGatewayConnectionPrototypeEstablishModeBidirectionalConst = "bidirectional" + VPNGatewayConnectionPrototypeEstablishModePeerOnlyConst = "peer_only" +) + // Constants associated with the VPNGatewayConnectionPrototype.RoutingProtocol property. // Routing protocols are disabled for this VPN gateway connection. const ( @@ -80144,42 +87477,52 @@ func UnmarshalVPNGatewayConnectionPrototype(m map[string]json.RawMessage, result obj := new(VPNGatewayConnectionPrototype) err = core.UnmarshalPrimitive(m, "admin_state_up", &obj.AdminStateUp) if err != nil { + err = core.SDKErrorf(err, "", "admin_state_up-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "dead_peer_detection", &obj.DeadPeerDetection, UnmarshalVPNGatewayConnectionDpdPrototype) if err != nil { + err = core.SDKErrorf(err, "", "dead_peer_detection-error", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalVPNGatewayConnectionIkePolicyPrototype) + err = core.UnmarshalPrimitive(m, "establish_mode", &obj.EstablishMode) if err != nil { + err = core.SDKErrorf(err, "", "establish_mode-error", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalVPNGatewayConnectionIPsecPolicyPrototype) + err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalVPNGatewayConnectionIkePolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "ike_policy-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "name", &obj.Name) + err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalVPNGatewayConnectionIPsecPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "ipsec_policy-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "peer_address", &obj.PeerAddress) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "psk", &obj.Psk) if err != nil { + err = core.SDKErrorf(err, "", "psk-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "routing_protocol", &obj.RoutingProtocol) + err = core.UnmarshalModel(m, "local", &obj.Local, UnmarshalVPNGatewayConnectionStaticRouteModeLocalPrototype) if err != nil { + err = core.SDKErrorf(err, "", "local-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "local_cidrs", &obj.LocalCIDRs) + err = core.UnmarshalModel(m, "peer", &obj.Peer, UnmarshalVPNGatewayConnectionStaticRouteModePeerPrototype) if err != nil { + err = core.SDKErrorf(err, "", "peer-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "peer_cidrs", &obj.PeerCIDRs) + err = core.UnmarshalPrimitive(m, "routing_protocol", &obj.RoutingProtocol) if err != nil { + err = core.SDKErrorf(err, "", "routing_protocol-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -80216,22 +87559,27 @@ func UnmarshalVPNGatewayConnectionReference(m map[string]json.RawMessage, result obj := new(VPNGatewayConnectionReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVPNGatewayConnectionReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -80250,6 +87598,163 @@ func UnmarshalVPNGatewayConnectionReferenceDeleted(m map[string]json.RawMessage, obj := new(VPNGatewayConnectionReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionStaticRouteModeLocal : VPNGatewayConnectionStaticRouteModeLocal struct +type VPNGatewayConnectionStaticRouteModeLocal struct { + // The local IKE identities. + // + // A VPN gateway in static route mode consists of two members in active-active mode. The first identity applies to the + // first member, and the second identity applies to the second member. + IkeIdentities []VPNGatewayConnectionIkeIdentityIntf `json:"ike_identities" validate:"required"` +} + +// UnmarshalVPNGatewayConnectionStaticRouteModeLocal unmarshals an instance of VPNGatewayConnectionStaticRouteModeLocal from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionStaticRouteModeLocal(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionStaticRouteModeLocal) + err = core.UnmarshalModel(m, "ike_identities", &obj.IkeIdentities, UnmarshalVPNGatewayConnectionIkeIdentity) + if err != nil { + err = core.SDKErrorf(err, "", "ike_identities-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionStaticRouteModeLocalPrototype : VPNGatewayConnectionStaticRouteModeLocalPrototype struct +type VPNGatewayConnectionStaticRouteModeLocalPrototype struct { + // The local IKE identities to use. + // + // A VPN gateway in static route mode consists of two members in active-active mode. The first specified identity will + // be applied to the first member, and the second specified identity will be applied to the second member. + // + // If unspecified, then `type` will be `ipv4_address` and `value` will be the public IP address of the member's VPN + // connection tunnel. + IkeIdentities []VPNGatewayConnectionIkeIdentityPrototypeIntf `json:"ike_identities,omitempty"` +} + +// UnmarshalVPNGatewayConnectionStaticRouteModeLocalPrototype unmarshals an instance of VPNGatewayConnectionStaticRouteModeLocalPrototype from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionStaticRouteModeLocalPrototype(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionStaticRouteModeLocalPrototype) + err = core.UnmarshalModel(m, "ike_identities", &obj.IkeIdentities, UnmarshalVPNGatewayConnectionIkeIdentityPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "ike_identities-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionStaticRouteModePeer : VPNGatewayConnectionStaticRouteModePeer struct +// Models which "extend" this model: +// - VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress +// - VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFqdn +type VPNGatewayConnectionStaticRouteModePeer struct { + // The peer IKE identity. + IkeIdentity VPNGatewayConnectionIkeIdentityIntf `json:"ike_identity" validate:"required"` + + // Indicates whether `peer.address` or `peer.fqdn` is used. + Type *string `json:"type" validate:"required"` + + // The IP address of the peer VPN gateway for this connection. + Address *string `json:"address,omitempty"` + + // The FQDN of the peer VPN gateway for this connection. + Fqdn *string `json:"fqdn,omitempty"` +} + +// Constants associated with the VPNGatewayConnectionStaticRouteModePeer.Type property. +// Indicates whether `peer.address` or `peer.fqdn` is used. +const ( + VPNGatewayConnectionStaticRouteModePeerTypeAddressConst = "address" + VPNGatewayConnectionStaticRouteModePeerTypeFqdnConst = "fqdn" +) + +func (*VPNGatewayConnectionStaticRouteModePeer) isaVPNGatewayConnectionStaticRouteModePeer() bool { + return true +} + +type VPNGatewayConnectionStaticRouteModePeerIntf interface { + isaVPNGatewayConnectionStaticRouteModePeer() bool +} + +// UnmarshalVPNGatewayConnectionStaticRouteModePeer unmarshals an instance of VPNGatewayConnectionStaticRouteModePeer from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionStaticRouteModePeer(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionStaticRouteModePeer) + err = core.UnmarshalModel(m, "ike_identity", &obj.IkeIdentity, UnmarshalVPNGatewayConnectionIkeIdentity) + if err != nil { + err = core.SDKErrorf(err, "", "ike_identity-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "address", &obj.Address) + if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "fqdn", &obj.Fqdn) + if err != nil { + err = core.SDKErrorf(err, "", "fqdn-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionStaticRouteModePeerPrototype : VPNGatewayConnectionStaticRouteModePeerPrototype struct +// Models which "extend" this model: +// - VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress +// - VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn +type VPNGatewayConnectionStaticRouteModePeerPrototype struct { + // The peer IKE identity to use. + // + // If unspecified: + // - If `peer.address` is specified, the `type` will be `ipv4_address`, and + // the `value` will be `peer.address`. + // - If `peer.fqdn` is specified, the `type` will be `fqdn`, and the `value` + // will be `peer.fqdn`. + IkeIdentity VPNGatewayConnectionIkeIdentityPrototypeIntf `json:"ike_identity,omitempty"` + + // The IP address of the peer VPN gateway for this connection. + Address *string `json:"address,omitempty"` + + // The FQDN of the peer VPN gateway for this connection. + Fqdn *string `json:"fqdn,omitempty"` +} + +func (*VPNGatewayConnectionStaticRouteModePeerPrototype) isaVPNGatewayConnectionStaticRouteModePeerPrototype() bool { + return true +} + +type VPNGatewayConnectionStaticRouteModePeerPrototypeIntf interface { + isaVPNGatewayConnectionStaticRouteModePeerPrototype() bool +} + +// UnmarshalVPNGatewayConnectionStaticRouteModePeerPrototype unmarshals an instance of VPNGatewayConnectionStaticRouteModePeerPrototype from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionStaticRouteModePeerPrototype(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionStaticRouteModePeerPrototype) + err = core.UnmarshalModel(m, "ike_identity", &obj.IkeIdentity, UnmarshalVPNGatewayConnectionIkeIdentityPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "ike_identity-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "address", &obj.Address) + if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "fqdn", &obj.Fqdn) + if err != nil { + err = core.SDKErrorf(err, "", "fqdn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -80280,14 +87785,17 @@ func UnmarshalVPNGatewayConnectionStaticRouteModeTunnel(m map[string]json.RawMes obj := new(VPNGatewayConnectionStaticRouteModeTunnel) err = core.UnmarshalModel(m, "public_ip", &obj.PublicIP, UnmarshalIP) if err != nil { + err = core.SDKErrorf(err, "", "public_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "status_reasons", &obj.StatusReasons, UnmarshalVPNGatewayConnectionTunnelStatusReason) if err != nil { + err = core.SDKErrorf(err, "", "status_reasons-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -80329,14 +87837,17 @@ func UnmarshalVPNGatewayConnectionStatusReason(m map[string]json.RawMessage, res obj := new(VPNGatewayConnectionStatusReason) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "message", &obj.Message) if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -80406,14 +87917,17 @@ func UnmarshalVPNGatewayConnectionTunnelStatusReason(m map[string]json.RawMessag obj := new(VPNGatewayConnectionTunnelStatusReason) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "message", &obj.Message) if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -80459,14 +87973,17 @@ func UnmarshalVPNGatewayHealthReason(m map[string]json.RawMessage, result interf obj := new(VPNGatewayHealthReason) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "message", &obj.Message) if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -80476,6 +87993,7 @@ func UnmarshalVPNGatewayHealthReason(m map[string]json.RawMessage, result interf // VPNGatewayLifecycleReason : VPNGatewayLifecycleReason struct type VPNGatewayLifecycleReason struct { // A reason code for this lifecycle state: + // - `internal_error`: internal error (contact IBM support) // - `resource_suspended_by_provider`: The resource has been suspended (contact IBM // support) // @@ -80492,12 +88010,14 @@ type VPNGatewayLifecycleReason struct { // Constants associated with the VPNGatewayLifecycleReason.Code property. // A reason code for this lifecycle state: +// - `internal_error`: internal error (contact IBM support) // - `resource_suspended_by_provider`: The resource has been suspended (contact IBM // support) // // The enumerated values for this property may // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. const ( + VPNGatewayLifecycleReasonCodeInternalErrorConst = "internal_error" VPNGatewayLifecycleReasonCodeResourceSuspendedByProviderConst = "resource_suspended_by_provider" ) @@ -80506,14 +88026,17 @@ func UnmarshalVPNGatewayLifecycleReason(m map[string]json.RawMessage, result int obj := new(VPNGatewayLifecycleReason) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "message", &obj.Message) if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -80591,30 +88114,37 @@ func UnmarshalVPNGatewayMember(m map[string]json.RawMessage, result interface{}) obj := new(VPNGatewayMember) err = core.UnmarshalModel(m, "health_reasons", &obj.HealthReasons, UnmarshalVPNGatewayMemberHealthReason) if err != nil { + err = core.SDKErrorf(err, "", "health_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "health_state", &obj.HealthState) if err != nil { + err = core.SDKErrorf(err, "", "health_state-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "lifecycle_reasons", &obj.LifecycleReasons, UnmarshalVPNGatewayMemberLifecycleReason) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "private_ip", &obj.PrivateIP, UnmarshalReservedIPReference) if err != nil { + err = core.SDKErrorf(err, "", "private_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "public_ip", &obj.PublicIP, UnmarshalIP) if err != nil { + err = core.SDKErrorf(err, "", "public_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "role", &obj.Role) if err != nil { + err = core.SDKErrorf(err, "", "role-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -80657,14 +88187,17 @@ func UnmarshalVPNGatewayMemberHealthReason(m map[string]json.RawMessage, result obj := new(VPNGatewayMemberHealthReason) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "message", &obj.Message) if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -80674,6 +88207,7 @@ func UnmarshalVPNGatewayMemberHealthReason(m map[string]json.RawMessage, result // VPNGatewayMemberLifecycleReason : VPNGatewayMemberLifecycleReason struct type VPNGatewayMemberLifecycleReason struct { // A reason code for this lifecycle state: + // - `internal_error`: internal error (contact IBM support) // - `resource_suspended_by_provider`: The resource has been suspended (contact IBM // support) // @@ -80690,12 +88224,14 @@ type VPNGatewayMemberLifecycleReason struct { // Constants associated with the VPNGatewayMemberLifecycleReason.Code property. // A reason code for this lifecycle state: +// - `internal_error`: internal error (contact IBM support) // - `resource_suspended_by_provider`: The resource has been suspended (contact IBM // support) // // The enumerated values for this property may // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. const ( + VPNGatewayMemberLifecycleReasonCodeInternalErrorConst = "internal_error" VPNGatewayMemberLifecycleReasonCodeResourceSuspendedByProviderConst = "resource_suspended_by_provider" ) @@ -80704,14 +88240,17 @@ func UnmarshalVPNGatewayMemberLifecycleReason(m map[string]json.RawMessage, resu obj := new(VPNGatewayMemberLifecycleReason) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "message", &obj.Message) if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -80729,6 +88268,7 @@ func UnmarshalVPNGatewayPatch(m map[string]json.RawMessage, result interface{}) obj := new(VPNGatewayPatch) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -80742,6 +88282,9 @@ func (vpnGatewayPatch *VPNGatewayPatch) AsPatch() (_patch map[string]interface{} if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -80784,18 +88327,22 @@ func UnmarshalVPNGatewayPrototype(m map[string]json.RawMessage, result interface obj := new(VPNGatewayPrototype) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "mode", &obj.Mode) if err != nil { + err = core.SDKErrorf(err, "", "mode-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -80814,6 +88361,7 @@ func UnmarshalVPNGatewayReferenceDeleted(m map[string]json.RawMessage, result in obj := new(VPNGatewayReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -80957,106 +88505,132 @@ func UnmarshalVPNServer(m map[string]json.RawMessage, result interface{}) (err e obj := new(VPNServer) err = core.UnmarshalModel(m, "certificate", &obj.Certificate, UnmarshalCertificateInstanceReference) if err != nil { + err = core.SDKErrorf(err, "", "certificate-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "client_authentication", &obj.ClientAuthentication, UnmarshalVPNServerAuthentication) if err != nil { + err = core.SDKErrorf(err, "", "client_authentication-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "client_auto_delete", &obj.ClientAutoDelete) if err != nil { + err = core.SDKErrorf(err, "", "client_auto_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "client_auto_delete_timeout", &obj.ClientAutoDeleteTimeout) if err != nil { + err = core.SDKErrorf(err, "", "client_auto_delete_timeout-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "client_dns_server_ips", &obj.ClientDnsServerIps, UnmarshalIP) if err != nil { + err = core.SDKErrorf(err, "", "client_dns_server_ips-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "client_idle_timeout", &obj.ClientIdleTimeout) if err != nil { + err = core.SDKErrorf(err, "", "client_idle_timeout-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "client_ip_pool", &obj.ClientIPPool) if err != nil { + err = core.SDKErrorf(err, "", "client_ip_pool-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "enable_split_tunneling", &obj.EnableSplitTunneling) if err != nil { + err = core.SDKErrorf(err, "", "enable_split_tunneling-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "health_reasons", &obj.HealthReasons, UnmarshalVPNServerHealthReason) if err != nil { + err = core.SDKErrorf(err, "", "health_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "health_state", &obj.HealthState) if err != nil { + err = core.SDKErrorf(err, "", "health_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "hostname", &obj.Hostname) if err != nil { + err = core.SDKErrorf(err, "", "hostname-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "lifecycle_reasons", &obj.LifecycleReasons, UnmarshalVPNServerLifecycleReason) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "port", &obj.Port) if err != nil { + err = core.SDKErrorf(err, "", "port-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "private_ips", &obj.PrivateIps, UnmarshalReservedIPReference) if err != nil { + err = core.SDKErrorf(err, "", "private_ips-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { + err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "security_groups-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnets", &obj.Subnets, UnmarshalSubnetReference) if err != nil { + err = core.SDKErrorf(err, "", "subnets-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -81101,18 +88675,22 @@ func UnmarshalVPNServerAuthentication(m map[string]json.RawMessage, result inter obj := new(VPNServerAuthentication) err = core.UnmarshalPrimitive(m, "method", &obj.Method) if err != nil { + err = core.SDKErrorf(err, "", "method-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "identity_provider", &obj.IdentityProvider, UnmarshalVPNServerAuthenticationByUsernameIDProvider) if err != nil { + err = core.SDKErrorf(err, "", "identity_provider-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "client_ca", &obj.ClientCa, UnmarshalCertificateInstanceReference) if err != nil { + err = core.SDKErrorf(err, "", "client_ca-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crl", &obj.Crl) if err != nil { + err = core.SDKErrorf(err, "", "crl-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -81154,6 +88732,7 @@ func UnmarshalVPNServerAuthenticationByUsernameIDProvider(m map[string]json.RawM obj := new(VPNServerAuthenticationByUsernameIDProvider) err = core.UnmarshalPrimitive(m, "provider_type", &obj.ProviderType) if err != nil { + err = core.SDKErrorf(err, "", "provider_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -81199,19 +88778,27 @@ func UnmarshalVPNServerAuthenticationPrototype(m map[string]json.RawMessage, res var discValue string err = core.UnmarshalPrimitive(m, "method", &discValue) if err != nil { - err = fmt.Errorf("error unmarshalling discriminator property 'method': %s", err.Error()) + errMsg := fmt.Sprintf("error unmarshalling discriminator property 'method': %s", err.Error()) + err = core.SDKErrorf(err, errMsg, "discriminator-unmarshal-error", common.GetComponentInfo()) return } if discValue == "" { - err = fmt.Errorf("required discriminator property 'method' not found in JSON object") + err = core.SDKErrorf(err, "required discriminator property 'method' not found in JSON object", "missing-discriminator", common.GetComponentInfo()) return } if discValue == "certificate" { err = core.UnmarshalModel(m, "", result, UnmarshalVPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype-error", common.GetComponentInfo()) + } } else if discValue == "username" { err = core.UnmarshalModel(m, "", result, UnmarshalVPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype-error", common.GetComponentInfo()) + } } else { - err = fmt.Errorf("unrecognized value for discriminator property 'method': %s", discValue) + errMsg := fmt.Sprintf("unrecognized value for discriminator property 'method': %s", discValue) + err = core.SDKErrorf(err, errMsg, "invalid-discriminator", common.GetComponentInfo()) } return } @@ -81286,46 +88873,57 @@ func UnmarshalVPNServerClient(m map[string]json.RawMessage, result interface{}) obj := new(VPNServerClient) err = core.UnmarshalModel(m, "client_ip", &obj.ClientIP, UnmarshalIP) if err != nil { + err = core.SDKErrorf(err, "", "client_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "common_name", &obj.CommonName) if err != nil { + err = core.SDKErrorf(err, "", "common_name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "disconnected_at", &obj.DisconnectedAt) if err != nil { + err = core.SDKErrorf(err, "", "disconnected_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "remote_ip", &obj.RemoteIP, UnmarshalIP) if err != nil { + err = core.SDKErrorf(err, "", "remote_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "remote_port", &obj.RemotePort) if err != nil { + err = core.SDKErrorf(err, "", "remote_port-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "username", &obj.Username) if err != nil { + err = core.SDKErrorf(err, "", "username-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -81356,22 +88954,27 @@ func UnmarshalVPNServerClientCollection(m map[string]json.RawMessage, result int obj := new(VPNServerClientCollection) err = core.UnmarshalModel(m, "clients", &obj.Clients, UnmarshalVPNServerClient) if err != nil { + err = core.SDKErrorf(err, "", "clients-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalVPNServerClientCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalVPNServerClientCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -81384,8 +88987,11 @@ func (resp *VPNServerClientCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -81401,6 +89007,7 @@ func UnmarshalVPNServerClientCollectionFirst(m map[string]json.RawMessage, resul obj := new(VPNServerClientCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -81418,6 +89025,7 @@ func UnmarshalVPNServerClientCollectionNext(m map[string]json.RawMessage, result obj := new(VPNServerClientCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -81448,22 +89056,27 @@ func UnmarshalVPNServerCollection(m map[string]json.RawMessage, result interface obj := new(VPNServerCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalVPNServerCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalVPNServerCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpn_servers", &obj.VPNServers, UnmarshalVPNServer) if err != nil { + err = core.SDKErrorf(err, "", "vpn_servers-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -81476,8 +89089,11 @@ func (resp *VPNServerCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -81493,6 +89109,7 @@ func UnmarshalVPNServerCollectionFirst(m map[string]json.RawMessage, result inte obj := new(VPNServerCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -81510,6 +89127,7 @@ func UnmarshalVPNServerCollectionNext(m map[string]json.RawMessage, result inter obj := new(VPNServerCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -81569,14 +89187,17 @@ func UnmarshalVPNServerHealthReason(m map[string]json.RawMessage, result interfa obj := new(VPNServerHealthReason) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "message", &obj.Message) if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -81586,6 +89207,7 @@ func UnmarshalVPNServerHealthReason(m map[string]json.RawMessage, result interfa // VPNServerLifecycleReason : VPNServerLifecycleReason struct type VPNServerLifecycleReason struct { // A reason code for this lifecycle state: + // - `internal_error`: internal error (contact IBM support) // - `resource_suspended_by_provider`: The resource has been suspended (contact IBM // support) // @@ -81602,12 +89224,14 @@ type VPNServerLifecycleReason struct { // Constants associated with the VPNServerLifecycleReason.Code property. // A reason code for this lifecycle state: +// - `internal_error`: internal error (contact IBM support) // - `resource_suspended_by_provider`: The resource has been suspended (contact IBM // support) // // The enumerated values for this property may // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. const ( + VPNServerLifecycleReasonCodeInternalErrorConst = "internal_error" VPNServerLifecycleReasonCodeResourceSuspendedByProviderConst = "resource_suspended_by_provider" ) @@ -81616,14 +89240,17 @@ func UnmarshalVPNServerLifecycleReason(m map[string]json.RawMessage, result inte obj := new(VPNServerLifecycleReason) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "message", &obj.Message) if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -81688,42 +89315,52 @@ func UnmarshalVPNServerPatch(m map[string]json.RawMessage, result interface{}) ( obj := new(VPNServerPatch) err = core.UnmarshalModel(m, "certificate", &obj.Certificate, UnmarshalCertificateInstanceIdentity) if err != nil { + err = core.SDKErrorf(err, "", "certificate-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "client_authentication", &obj.ClientAuthentication, UnmarshalVPNServerAuthenticationPrototype) if err != nil { + err = core.SDKErrorf(err, "", "client_authentication-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "client_dns_server_ips", &obj.ClientDnsServerIps, UnmarshalIP) if err != nil { + err = core.SDKErrorf(err, "", "client_dns_server_ips-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "client_idle_timeout", &obj.ClientIdleTimeout) if err != nil { + err = core.SDKErrorf(err, "", "client_idle_timeout-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "client_ip_pool", &obj.ClientIPPool) if err != nil { + err = core.SDKErrorf(err, "", "client_ip_pool-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "enable_split_tunneling", &obj.EnableSplitTunneling) if err != nil { + err = core.SDKErrorf(err, "", "enable_split_tunneling-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "port", &obj.Port) if err != nil { + err = core.SDKErrorf(err, "", "port-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { + err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnets", &obj.Subnets, UnmarshalSubnetIdentity) if err != nil { + err = core.SDKErrorf(err, "", "subnets-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -81737,6 +89374,9 @@ func (vpnServerPatch *VPNServerPatch) AsPatch() (_patch map[string]interface{}, if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -81752,6 +89392,7 @@ func UnmarshalVPNServerReferenceDeleted(m map[string]json.RawMessage, result int obj := new(VPNServerReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -81861,46 +89502,57 @@ func UnmarshalVPNServerRoute(m map[string]json.RawMessage, result interface{}) ( obj := new(VPNServerRoute) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { + err = core.SDKErrorf(err, "", "action-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) if err != nil { + err = core.SDKErrorf(err, "", "destination-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "health_reasons", &obj.HealthReasons, UnmarshalVPNServerRouteHealthReason) if err != nil { + err = core.SDKErrorf(err, "", "health_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "health_state", &obj.HealthState) if err != nil { + err = core.SDKErrorf(err, "", "health_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "lifecycle_reasons", &obj.LifecycleReasons, UnmarshalVPNServerRouteLifecycleReason) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -81931,22 +89583,27 @@ func UnmarshalVPNServerRouteCollection(m map[string]json.RawMessage, result inte obj := new(VPNServerRouteCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalVPNServerRouteCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalVPNServerRouteCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "routes", &obj.Routes, UnmarshalVPNServerRoute) if err != nil { + err = core.SDKErrorf(err, "", "routes-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -81959,8 +89616,11 @@ func (resp *VPNServerRouteCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -81976,6 +89636,7 @@ func UnmarshalVPNServerRouteCollectionFirst(m map[string]json.RawMessage, result obj := new(VPNServerRouteCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -81993,6 +89654,7 @@ func UnmarshalVPNServerRouteCollectionNext(m map[string]json.RawMessage, result obj := new(VPNServerRouteCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -82030,14 +89692,17 @@ func UnmarshalVPNServerRouteHealthReason(m map[string]json.RawMessage, result in obj := new(VPNServerRouteHealthReason) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "message", &obj.Message) if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -82047,6 +89712,7 @@ func UnmarshalVPNServerRouteHealthReason(m map[string]json.RawMessage, result in // VPNServerRouteLifecycleReason : VPNServerRouteLifecycleReason struct type VPNServerRouteLifecycleReason struct { // A reason code for this lifecycle state: + // - `internal_error`: internal error (contact IBM support) // - `resource_suspended_by_provider`: The resource has been suspended (contact IBM // support) // @@ -82063,12 +89729,14 @@ type VPNServerRouteLifecycleReason struct { // Constants associated with the VPNServerRouteLifecycleReason.Code property. // A reason code for this lifecycle state: +// - `internal_error`: internal error (contact IBM support) // - `resource_suspended_by_provider`: The resource has been suspended (contact IBM // support) // // The enumerated values for this property may // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. const ( + VPNServerRouteLifecycleReasonCodeInternalErrorConst = "internal_error" VPNServerRouteLifecycleReasonCodeResourceSuspendedByProviderConst = "resource_suspended_by_provider" ) @@ -82077,14 +89745,17 @@ func UnmarshalVPNServerRouteLifecycleReason(m map[string]json.RawMessage, result obj := new(VPNServerRouteLifecycleReason) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "message", &obj.Message) if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -82102,6 +89773,7 @@ func UnmarshalVPNServerRoutePatch(m map[string]json.RawMessage, result interface obj := new(VPNServerRoutePatch) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -82115,6 +89787,9 @@ func (vpnServerRoutePatch *VPNServerRoutePatch) AsPatch() (_patch map[string]int if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -82216,78 +89891,97 @@ func UnmarshalVirtualNetworkInterface(m map[string]json.RawMessage, result inter obj := new(VirtualNetworkInterface) err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing) if err != nil { + err = core.SDKErrorf(err, "", "allow_ip_spoofing-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { + err = core.SDKErrorf(err, "", "auto_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "enable_infrastructure_nat", &obj.EnableInfrastructureNat) if err != nil { + err = core.SDKErrorf(err, "", "enable_infrastructure_nat-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "ips", &obj.Ips, UnmarshalReservedIPReference) if err != nil { + err = core.SDKErrorf(err, "", "ips-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "mac_address", &obj.MacAddress) if err != nil { + err = core.SDKErrorf(err, "", "mac_address-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "security_groups-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalVirtualNetworkInterfaceTarget) if err != nil { + err = core.SDKErrorf(err, "", "target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -82318,22 +90012,27 @@ func UnmarshalVirtualNetworkInterfaceCollection(m map[string]json.RawMessage, re obj := new(VirtualNetworkInterfaceCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalVirtualNetworkInterfaceCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalVirtualNetworkInterfaceCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "virtual_network_interfaces", &obj.VirtualNetworkInterfaces, UnmarshalVirtualNetworkInterface) if err != nil { + err = core.SDKErrorf(err, "", "virtual_network_interfaces-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -82346,8 +90045,11 @@ func (resp *VirtualNetworkInterfaceCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -82363,6 +90065,7 @@ func UnmarshalVirtualNetworkInterfaceCollectionFirst(m map[string]json.RawMessag obj := new(VirtualNetworkInterfaceCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -82380,6 +90083,7 @@ func UnmarshalVirtualNetworkInterfaceCollectionNext(m map[string]json.RawMessage obj := new(VirtualNetworkInterfaceCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -82425,22 +90129,27 @@ func UnmarshalVirtualNetworkInterfaceIPPrototype(m map[string]json.RawMessage, r obj := new(VirtualNetworkInterfaceIPPrototype) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { + err = core.SDKErrorf(err, "", "auto_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -82480,18 +90189,22 @@ func UnmarshalVirtualNetworkInterfacePatch(m map[string]json.RawMessage, result obj := new(VirtualNetworkInterfacePatch) err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing) if err != nil { + err = core.SDKErrorf(err, "", "allow_ip_spoofing-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { + err = core.SDKErrorf(err, "", "auto_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "enable_infrastructure_nat", &obj.EnableInfrastructureNat) if err != nil { + err = core.SDKErrorf(err, "", "enable_infrastructure_nat-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -82505,6 +90218,9 @@ func (virtualNetworkInterfacePatch *VirtualNetworkInterfacePatch) AsPatch() (_pa if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -82547,22 +90263,27 @@ func UnmarshalVirtualNetworkInterfacePrimaryIPPrototype(m map[string]json.RawMes obj := new(VirtualNetworkInterfacePrimaryIPPrototype) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { + err = core.SDKErrorf(err, "", "auto_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -82598,22 +90319,27 @@ func UnmarshalVirtualNetworkInterfaceReferenceAttachmentContext(m map[string]jso obj := new(VirtualNetworkInterfaceReferenceAttachmentContext) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -82632,6 +90358,7 @@ func UnmarshalVirtualNetworkInterfaceReferenceDeleted(m map[string]json.RawMessa obj := new(VirtualNetworkInterfaceReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -82683,22 +90410,27 @@ func UnmarshalVirtualNetworkInterfaceTarget(m map[string]json.RawMessage, result obj := new(VirtualNetworkInterfaceTarget) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalShareMountTargetReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -82867,106 +90599,132 @@ func UnmarshalVolume(m map[string]json.RawMessage, result interface{}) (err erro obj := new(Volume) err = core.UnmarshalPrimitive(m, "active", &obj.Active) if err != nil { + err = core.SDKErrorf(err, "", "active-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "attachment_state", &obj.AttachmentState) if err != nil { + err = core.SDKErrorf(err, "", "attachment_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "bandwidth", &obj.Bandwidth) if err != nil { + err = core.SDKErrorf(err, "", "bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "busy", &obj.Busy) if err != nil { + err = core.SDKErrorf(err, "", "busy-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity) if err != nil { + err = core.SDKErrorf(err, "", "capacity-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "encryption", &obj.Encryption) if err != nil { + err = core.SDKErrorf(err, "", "encryption-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyReference) if err != nil { + err = core.SDKErrorf(err, "", "encryption_key-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "health_reasons", &obj.HealthReasons, UnmarshalVolumeHealthReason) if err != nil { + err = core.SDKErrorf(err, "", "health_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "health_state", &obj.HealthState) if err != nil { + err = core.SDKErrorf(err, "", "health_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { + err = core.SDKErrorf(err, "", "iops-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "operating_system", &obj.OperatingSystem, UnmarshalOperatingSystem) if err != nil { + err = core.SDKErrorf(err, "", "operating_system-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileReference) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "source_image", &obj.SourceImage, UnmarshalImageReference) if err != nil { + err = core.SDKErrorf(err, "", "source_image-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "source_snapshot", &obj.SourceSnapshot, UnmarshalSnapshotReference) if err != nil { + err = core.SDKErrorf(err, "", "source_snapshot-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "status_reasons", &obj.StatusReasons, UnmarshalVolumeStatusReason) if err != nil { + err = core.SDKErrorf(err, "", "status_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { + err = core.SDKErrorf(err, "", "user_tags-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentReferenceVolumeContext) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -83032,42 +90790,52 @@ func UnmarshalVolumeAttachment(m map[string]json.RawMessage, result interface{}) obj := new(VolumeAttachment) err = core.UnmarshalPrimitive(m, "bandwidth", &obj.Bandwidth) if err != nil { + err = core.SDKErrorf(err, "", "bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete) if err != nil { + err = core.SDKErrorf(err, "", "delete_volume_on_instance_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "device", &obj.Device, UnmarshalVolumeAttachmentDevice) if err != nil { + err = core.SDKErrorf(err, "", "device-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume", &obj.Volume, UnmarshalVolumeReferenceVolumeAttachmentContext) if err != nil { + err = core.SDKErrorf(err, "", "volume-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -83085,6 +90853,7 @@ func UnmarshalVolumeAttachmentCollection(m map[string]json.RawMessage, result in obj := new(VolumeAttachmentCollection) err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachment) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -83102,6 +90871,7 @@ func UnmarshalVolumeAttachmentDevice(m map[string]json.RawMessage, result interf obj := new(VolumeAttachmentDevice) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -83122,10 +90892,12 @@ func UnmarshalVolumeAttachmentPatch(m map[string]json.RawMessage, result interfa obj := new(VolumeAttachmentPatch) err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete) if err != nil { + err = core.SDKErrorf(err, "", "delete_volume_on_instance_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -83139,6 +90911,9 @@ func (volumeAttachmentPatch *VolumeAttachmentPatch) AsPatch() (_patch map[string if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -83161,6 +90936,9 @@ func (*VpcV1) NewVolumeAttachmentPrototype(volume VolumeAttachmentPrototypeVolum Volume: volume, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -83169,14 +90947,17 @@ func UnmarshalVolumeAttachmentPrototype(m map[string]json.RawMessage, result int obj := new(VolumeAttachmentPrototype) err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete) if err != nil { + err = core.SDKErrorf(err, "", "delete_volume_on_instance_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume", &obj.Volume, UnmarshalVolumeAttachmentPrototypeVolume) if err != nil { + err = core.SDKErrorf(err, "", "volume-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -83202,6 +90983,9 @@ func (*VpcV1) NewVolumeAttachmentPrototypeInstanceByImageContext(volume *VolumeP Volume: volume, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -83210,14 +90994,17 @@ func UnmarshalVolumeAttachmentPrototypeInstanceByImageContext(m map[string]json. obj := new(VolumeAttachmentPrototypeInstanceByImageContext) err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete) if err != nil { + err = core.SDKErrorf(err, "", "delete_volume_on_instance_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume", &obj.Volume, UnmarshalVolumePrototypeInstanceByImageContext) if err != nil { + err = core.SDKErrorf(err, "", "volume-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -83243,6 +91030,9 @@ func (*VpcV1) NewVolumeAttachmentPrototypeInstanceBySourceSnapshotContext(volume Volume: volume, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -83251,14 +91041,17 @@ func UnmarshalVolumeAttachmentPrototypeInstanceBySourceSnapshotContext(m map[str obj := new(VolumeAttachmentPrototypeInstanceBySourceSnapshotContext) err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete) if err != nil { + err = core.SDKErrorf(err, "", "delete_volume_on_instance_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume", &obj.Volume, UnmarshalVolumePrototypeInstanceBySourceSnapshotContext) if err != nil { + err = core.SDKErrorf(err, "", "volume-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -83284,6 +91077,9 @@ func (*VpcV1) NewVolumeAttachmentPrototypeInstanceByVolumeContext(volume VolumeI Volume: volume, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -83292,14 +91088,17 @@ func UnmarshalVolumeAttachmentPrototypeInstanceByVolumeContext(m map[string]json obj := new(VolumeAttachmentPrototypeInstanceByVolumeContext) err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete) if err != nil { + err = core.SDKErrorf(err, "", "delete_volume_on_instance_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume", &obj.Volume, UnmarshalVolumeIdentity) if err != nil { + err = core.SDKErrorf(err, "", "volume-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -83367,46 +91166,57 @@ func UnmarshalVolumeAttachmentPrototypeVolume(m map[string]json.RawMessage, resu obj := new(VolumeAttachmentPrototypeVolume) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { + err = core.SDKErrorf(err, "", "iops-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { + err = core.SDKErrorf(err, "", "user_tags-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity) if err != nil { + err = core.SDKErrorf(err, "", "capacity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "encryption_key-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "source_snapshot", &obj.SourceSnapshot, UnmarshalSnapshotIdentity) if err != nil { + err = core.SDKErrorf(err, "", "source_snapshot-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -83444,26 +91254,32 @@ func UnmarshalVolumeAttachmentReferenceInstanceContext(m map[string]json.RawMess obj := new(VolumeAttachmentReferenceInstanceContext) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVolumeAttachmentReferenceInstanceContextDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "device", &obj.Device, UnmarshalVolumeAttachmentDevice) if err != nil { + err = core.SDKErrorf(err, "", "device-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume", &obj.Volume, UnmarshalVolumeReferenceVolumeAttachmentContext) if err != nil { + err = core.SDKErrorf(err, "", "volume-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -83482,6 +91298,7 @@ func UnmarshalVolumeAttachmentReferenceInstanceContextDeleted(m map[string]json. obj := new(VolumeAttachmentReferenceInstanceContextDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -83530,34 +91347,42 @@ func UnmarshalVolumeAttachmentReferenceVolumeContext(m map[string]json.RawMessag obj := new(VolumeAttachmentReferenceVolumeContext) err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete) if err != nil { + err = core.SDKErrorf(err, "", "delete_volume_on_instance_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVolumeAttachmentReferenceVolumeContextDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "device", &obj.Device, UnmarshalVolumeAttachmentDevice) if err != nil { + err = core.SDKErrorf(err, "", "device-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "instance", &obj.Instance, UnmarshalInstanceReference) if err != nil { + err = core.SDKErrorf(err, "", "instance-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -83576,6 +91401,7 @@ func UnmarshalVolumeAttachmentReferenceVolumeContextDeleted(m map[string]json.Ra obj := new(VolumeAttachmentReferenceVolumeContextDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -83606,22 +91432,27 @@ func UnmarshalVolumeCollection(m map[string]json.RawMessage, result interface{}) obj := new(VolumeCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalVolumeCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalVolumeCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volumes", &obj.Volumes, UnmarshalVolume) if err != nil { + err = core.SDKErrorf(err, "", "volumes-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -83634,8 +91465,11 @@ func (resp *VolumeCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -83651,6 +91485,7 @@ func UnmarshalVolumeCollectionFirst(m map[string]json.RawMessage, result interfa obj := new(VolumeCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -83668,6 +91503,7 @@ func UnmarshalVolumeCollectionNext(m map[string]json.RawMessage, result interfac obj := new(VolumeCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -83697,14 +91533,17 @@ func UnmarshalVolumeHealthReason(m map[string]json.RawMessage, result interface{ obj := new(VolumeHealthReason) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "message", &obj.Message) if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -83740,14 +91579,17 @@ func UnmarshalVolumeIdentity(m map[string]json.RawMessage, result interface{}) ( obj := new(VolumeIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -83786,22 +91628,27 @@ func UnmarshalVolumePatch(m map[string]json.RawMessage, result interface{}) (err obj := new(VolumePatch) err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity) if err != nil { + err = core.SDKErrorf(err, "", "capacity-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { + err = core.SDKErrorf(err, "", "iops-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { + err = core.SDKErrorf(err, "", "user_tags-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -83815,6 +91662,9 @@ func (volumePatch *VolumePatch) AsPatch() (_patch map[string]interface{}, err er if err == nil { err = json.Unmarshal(jsonData, &_patch) } + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-patch-data-error", common.GetComponentInfo()) + } return } @@ -83848,14 +91698,17 @@ func UnmarshalVolumeProfile(m map[string]json.RawMessage, result interface{}) (e obj := new(VolumeProfile) err = core.UnmarshalPrimitive(m, "family", &obj.Family) if err != nil { + err = core.SDKErrorf(err, "", "family-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -83886,22 +91739,27 @@ func UnmarshalVolumeProfileCollection(m map[string]json.RawMessage, result inter obj := new(VolumeProfileCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalVolumeProfileCollectionFirst) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalVolumeProfileCollectionNext) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profiles", &obj.Profiles, UnmarshalVolumeProfile) if err != nil { + err = core.SDKErrorf(err, "", "profiles-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -83914,8 +91772,11 @@ func (resp *VolumeProfileCollection) GetNextStart() (*string, error) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") - if err != nil || start == nil { + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) return nil, err + } else if start == nil { + return nil, nil } return start, nil } @@ -83931,6 +91792,7 @@ func UnmarshalVolumeProfileCollectionFirst(m map[string]json.RawMessage, result obj := new(VolumeProfileCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -83948,6 +91810,7 @@ func UnmarshalVolumeProfileCollectionNext(m map[string]json.RawMessage, result i obj := new(VolumeProfileCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -83979,10 +91842,12 @@ func UnmarshalVolumeProfileIdentity(m map[string]json.RawMessage, result interfa obj := new(VolumeProfileIdentity) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -84003,10 +91868,12 @@ func UnmarshalVolumeProfileReference(m map[string]json.RawMessage, result interf obj := new(VolumeProfileReference) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -84068,38 +91935,47 @@ func UnmarshalVolumePrototype(m map[string]json.RawMessage, result interface{}) obj := new(VolumePrototype) err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { + err = core.SDKErrorf(err, "", "iops-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { + err = core.SDKErrorf(err, "", "user_tags-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity) if err != nil { + err = core.SDKErrorf(err, "", "capacity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "encryption_key-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "source_snapshot", &obj.SourceSnapshot, UnmarshalSnapshotIdentity) if err != nil { + err = core.SDKErrorf(err, "", "source_snapshot-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -84145,6 +92021,9 @@ func (*VpcV1) NewVolumePrototypeInstanceByImageContext(profile VolumeProfileIden Profile: profile, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -84153,30 +92032,37 @@ func UnmarshalVolumePrototypeInstanceByImageContext(m map[string]json.RawMessage obj := new(VolumePrototypeInstanceByImageContext) err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity) if err != nil { + err = core.SDKErrorf(err, "", "capacity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "encryption_key-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { + err = core.SDKErrorf(err, "", "iops-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { + err = core.SDKErrorf(err, "", "user_tags-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -84226,6 +92112,9 @@ func (*VpcV1) NewVolumePrototypeInstanceBySourceSnapshotContext(profile VolumePr SourceSnapshot: sourceSnapshot, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -84234,34 +92123,42 @@ func UnmarshalVolumePrototypeInstanceBySourceSnapshotContext(m map[string]json.R obj := new(VolumePrototypeInstanceBySourceSnapshotContext) err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity) if err != nil { + err = core.SDKErrorf(err, "", "capacity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "encryption_key-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { + err = core.SDKErrorf(err, "", "iops-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "source_snapshot", &obj.SourceSnapshot, UnmarshalSnapshotIdentity) if err != nil { + err = core.SDKErrorf(err, "", "source_snapshot-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { + err = core.SDKErrorf(err, "", "user_tags-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -84305,30 +92202,37 @@ func UnmarshalVolumeReference(m map[string]json.RawMessage, result interface{}) obj := new(VolumeReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVolumeReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalVolumeRemote) if err != nil { + err = core.SDKErrorf(err, "", "remote-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -84347,6 +92251,7 @@ func UnmarshalVolumeReferenceDeleted(m map[string]json.RawMessage, result interf obj := new(VolumeReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -84386,26 +92291,32 @@ func UnmarshalVolumeReferenceVolumeAttachmentContext(m map[string]json.RawMessag obj := new(VolumeReferenceVolumeAttachmentContext) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVolumeReferenceVolumeAttachmentContextDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -84424,6 +92335,7 @@ func UnmarshalVolumeReferenceVolumeAttachmentContextDeleted(m map[string]json.Ra obj := new(VolumeReferenceVolumeAttachmentContextDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -84443,6 +92355,7 @@ func UnmarshalVolumeRemote(m map[string]json.RawMessage, result interface{}) (er obj := new(VolumeRemote) err = core.UnmarshalModel(m, "region", &obj.Region, UnmarshalRegionReference) if err != nil { + err = core.SDKErrorf(err, "", "region-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -84478,14 +92391,17 @@ func UnmarshalVolumeStatusReason(m map[string]json.RawMessage, result interface{ obj := new(VolumeStatusReason) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "message", &obj.Message) if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -84503,6 +92419,7 @@ func UnmarshalVpcdnsResolutionBindingCollectionFirst(m map[string]json.RawMessag obj := new(VpcdnsResolutionBindingCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -84520,6 +92437,7 @@ func UnmarshalVpcdnsResolutionBindingCollectionNext(m map[string]json.RawMessage obj := new(VpcdnsResolutionBindingCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -84554,18 +92472,22 @@ func UnmarshalZone(m map[string]json.RawMessage, result interface{}) (err error) obj := new(Zone) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "region", &obj.Region, UnmarshalRegionReference) if err != nil { + err = core.SDKErrorf(err, "", "region-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -84583,6 +92505,7 @@ func UnmarshalZoneCollection(m map[string]json.RawMessage, result interface{}) ( obj := new(ZoneCollection) err = core.UnmarshalModel(m, "zones", &obj.Zones, UnmarshalZone) if err != nil { + err = core.SDKErrorf(err, "", "zones-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -84614,10 +92537,12 @@ func UnmarshalZoneIdentity(m map[string]json.RawMessage, result interface{}) (er obj := new(ZoneIdentity) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -84638,10 +92563,12 @@ func UnmarshalZoneReference(m map[string]json.RawMessage, result interface{}) (e obj := new(ZoneReference) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -84677,22 +92604,27 @@ func UnmarshalBackupPolicyJobSourceInstanceReference(m map[string]json.RawMessag obj := new(BackupPolicyJobSourceInstanceReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -84741,30 +92673,37 @@ func UnmarshalBackupPolicyJobSourceVolumeReference(m map[string]json.RawMessage, obj := new(BackupPolicyJobSourceVolumeReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVolumeReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalVolumeRemote) if err != nil { + err = core.SDKErrorf(err, "", "remote-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -84899,66 +92838,82 @@ func UnmarshalBackupPolicyMatchResourceTypeInstance(m map[string]json.RawMessage obj := new(BackupPolicyMatchResourceTypeInstance) err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "health_reasons", &obj.HealthReasons, UnmarshalBackupPolicyHealthReason) if err != nil { + err = core.SDKErrorf(err, "", "health_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "health_state", &obj.HealthState) if err != nil { + err = core.SDKErrorf(err, "", "health_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "last_job_completed_at", &obj.LastJobCompletedAt) if err != nil { + err = core.SDKErrorf(err, "", "last_job_completed_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "match_user_tags", &obj.MatchUserTags) if err != nil { + err = core.SDKErrorf(err, "", "match_user_tags-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "plans", &obj.Plans, UnmarshalBackupPolicyPlanReference) if err != nil { + err = core.SDKErrorf(err, "", "plans-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "scope", &obj.Scope, UnmarshalBackupPolicyScope) if err != nil { + err = core.SDKErrorf(err, "", "scope-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "included_content", &obj.IncludedContent) if err != nil { + err = core.SDKErrorf(err, "", "included_content-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "match_resource_type", &obj.MatchResourceType) if err != nil { + err = core.SDKErrorf(err, "", "match_resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -85078,62 +93033,77 @@ func UnmarshalBackupPolicyMatchResourceTypeVolume(m map[string]json.RawMessage, obj := new(BackupPolicyMatchResourceTypeVolume) err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "health_reasons", &obj.HealthReasons, UnmarshalBackupPolicyHealthReason) if err != nil { + err = core.SDKErrorf(err, "", "health_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "health_state", &obj.HealthState) if err != nil { + err = core.SDKErrorf(err, "", "health_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "last_job_completed_at", &obj.LastJobCompletedAt) if err != nil { + err = core.SDKErrorf(err, "", "last_job_completed_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "match_user_tags", &obj.MatchUserTags) if err != nil { + err = core.SDKErrorf(err, "", "match_user_tags-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "plans", &obj.Plans, UnmarshalBackupPolicyPlanReference) if err != nil { + err = core.SDKErrorf(err, "", "plans-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "scope", &obj.Scope, UnmarshalBackupPolicyScope) if err != nil { + err = core.SDKErrorf(err, "", "scope-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "match_resource_type", &obj.MatchResourceType) if err != nil { + err = core.SDKErrorf(err, "", "match_resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -85189,6 +93159,9 @@ func (*VpcV1) NewBackupPolicyPrototypeBackupPolicyMatchResourceTypeInstanceProto MatchResourceType: core.StringPtr(matchResourceType), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -85201,30 +93174,37 @@ func UnmarshalBackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototyp obj := new(BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype) err = core.UnmarshalPrimitive(m, "match_user_tags", &obj.MatchUserTags) if err != nil { + err = core.SDKErrorf(err, "", "match_user_tags-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "plans", &obj.Plans, UnmarshalBackupPolicyPlanPrototype) if err != nil { + err = core.SDKErrorf(err, "", "plans-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "scope", &obj.Scope, UnmarshalBackupPolicyScopePrototype) if err != nil { + err = core.SDKErrorf(err, "", "scope-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "included_content", &obj.IncludedContent) if err != nil { + err = core.SDKErrorf(err, "", "included_content-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "match_resource_type", &obj.MatchResourceType) if err != nil { + err = core.SDKErrorf(err, "", "match_resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -85268,6 +93248,9 @@ func (*VpcV1) NewBackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototy MatchResourceType: core.StringPtr(matchResourceType), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -85280,26 +93263,32 @@ func UnmarshalBackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype( obj := new(BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype) err = core.UnmarshalPrimitive(m, "match_user_tags", &obj.MatchUserTags) if err != nil { + err = core.SDKErrorf(err, "", "match_user_tags-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "plans", &obj.Plans, UnmarshalBackupPolicyPlanPrototype) if err != nil { + err = core.SDKErrorf(err, "", "plans-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "scope", &obj.Scope, UnmarshalBackupPolicyScopePrototype) if err != nil { + err = core.SDKErrorf(err, "", "scope-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "match_resource_type", &obj.MatchResourceType) if err != nil { + err = core.SDKErrorf(err, "", "match_resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -85333,6 +93322,7 @@ func UnmarshalBackupPolicyScopePrototypeEnterpriseIdentity(m map[string]json.Raw obj := new(BackupPolicyScopePrototypeEnterpriseIdentity) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -85364,10 +93354,12 @@ func UnmarshalBackupPolicyScopeAccountReference(m map[string]json.RawMessage, re obj := new(BackupPolicyScopeAccountReference) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -85402,14 +93394,17 @@ func UnmarshalBackupPolicyScopeEnterpriseReference(m map[string]json.RawMessage, obj := new(BackupPolicyScopeEnterpriseReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -85451,22 +93446,27 @@ func UnmarshalBareMetalServerBootTargetBareMetalServerDiskReference(m map[string obj := new(BareMetalServerBootTargetBareMetalServerDiskReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalBareMetalServerDiskReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -85504,18 +93504,22 @@ func UnmarshalBareMetalServerInitializationUserAccountBareMetalServerInitializat obj := new(BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount) err = core.UnmarshalPrimitive(m, "encrypted_password", &obj.EncryptedPassword) if err != nil { + err = core.SDKErrorf(err, "", "encrypted_password-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalKeyReference) if err != nil { + err = core.SDKErrorf(err, "", "encryption_key-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "username", &obj.Username) if err != nil { + err = core.SDKErrorf(err, "", "username-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -85614,54 +93618,67 @@ func UnmarshalBareMetalServerNetworkAttachmentByPci(m map[string]json.RawMessage obj := new(BareMetalServerNetworkAttachmentByPci) err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "port_speed", &obj.PortSpeed) if err != nil { + err = core.SDKErrorf(err, "", "port_speed-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "virtual_network_interface", &obj.VirtualNetworkInterface, UnmarshalVirtualNetworkInterfaceReferenceAttachmentContext) if err != nil { + err = core.SDKErrorf(err, "", "virtual_network_interface-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "allowed_vlans", &obj.AllowedVlans) if err != nil { + err = core.SDKErrorf(err, "", "allowed_vlans-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType) if err != nil { + err = core.SDKErrorf(err, "", "interface_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -85769,58 +93786,72 @@ func UnmarshalBareMetalServerNetworkAttachmentByVlan(m map[string]json.RawMessag obj := new(BareMetalServerNetworkAttachmentByVlan) err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "port_speed", &obj.PortSpeed) if err != nil { + err = core.SDKErrorf(err, "", "port_speed-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "virtual_network_interface", &obj.VirtualNetworkInterface, UnmarshalVirtualNetworkInterfaceReferenceAttachmentContext) if err != nil { + err = core.SDKErrorf(err, "", "virtual_network_interface-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "allow_to_float", &obj.AllowToFloat) if err != nil { + err = core.SDKErrorf(err, "", "allow_to_float-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType) if err != nil { + err = core.SDKErrorf(err, "", "interface_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "vlan", &obj.Vlan) if err != nil { + err = core.SDKErrorf(err, "", "vlan-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -85862,14 +93893,17 @@ func UnmarshalBareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVi obj := new(BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -85948,38 +93982,47 @@ func UnmarshalBareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVi obj := new(BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext) err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing) if err != nil { + err = core.SDKErrorf(err, "", "allow_ip_spoofing-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { + err = core.SDKErrorf(err, "", "auto_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "enable_infrastructure_nat", &obj.EnableInfrastructureNat) if err != nil { + err = core.SDKErrorf(err, "", "enable_infrastructure_nat-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "ips", &obj.Ips, UnmarshalVirtualNetworkInterfaceIPPrototype) if err != nil { + err = core.SDKErrorf(err, "", "ips-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalVirtualNetworkInterfacePrimaryIPPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "security_groups-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -86025,6 +94068,9 @@ func (*VpcV1) NewBareMetalServerNetworkAttachmentPrototypeBareMetalServerNetwork InterfaceType: core.StringPtr(interfaceType), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -86037,18 +94083,22 @@ func UnmarshalBareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAtt obj := new(BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPciPrototype) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "virtual_network_interface", &obj.VirtualNetworkInterface, UnmarshalBareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface) if err != nil { + err = core.SDKErrorf(err, "", "virtual_network_interface-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "allowed_vlans", &obj.AllowedVlans) if err != nil { + err = core.SDKErrorf(err, "", "allowed_vlans-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType) if err != nil { + err = core.SDKErrorf(err, "", "interface_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -86102,6 +94152,9 @@ func (*VpcV1) NewBareMetalServerNetworkAttachmentPrototypeBareMetalServerNetwork Vlan: core.Int64Ptr(vlan), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -86114,22 +94167,27 @@ func UnmarshalBareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAtt obj := new(BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVlanPrototype) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "virtual_network_interface", &obj.VirtualNetworkInterface, UnmarshalBareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface) if err != nil { + err = core.SDKErrorf(err, "", "virtual_network_interface-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "allow_to_float", &obj.AllowToFloat) if err != nil { + err = core.SDKErrorf(err, "", "allow_to_float-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType) if err != nil { + err = core.SDKErrorf(err, "", "interface_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "vlan", &obj.Vlan) if err != nil { + err = core.SDKErrorf(err, "", "vlan-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -86301,66 +94359,82 @@ func UnmarshalBareMetalServerNetworkInterfaceByHiperSocket(m map[string]json.Raw obj := new(BareMetalServerNetworkInterfaceByHiperSocket) err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing) if err != nil { + err = core.SDKErrorf(err, "", "allow_ip_spoofing-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "enable_infrastructure_nat", &obj.EnableInfrastructureNat) if err != nil { + err = core.SDKErrorf(err, "", "enable_infrastructure_nat-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "floating_ips", &obj.FloatingIps, UnmarshalFloatingIPReference) if err != nil { + err = core.SDKErrorf(err, "", "floating_ips-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "mac_address", &obj.MacAddress) if err != nil { + err = core.SDKErrorf(err, "", "mac_address-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "port_speed", &obj.PortSpeed) if err != nil { + err = core.SDKErrorf(err, "", "port_speed-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "security_groups-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType) if err != nil { + err = core.SDKErrorf(err, "", "interface_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -86546,70 +94620,87 @@ func UnmarshalBareMetalServerNetworkInterfaceByPci(m map[string]json.RawMessage, obj := new(BareMetalServerNetworkInterfaceByPci) err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing) if err != nil { + err = core.SDKErrorf(err, "", "allow_ip_spoofing-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "enable_infrastructure_nat", &obj.EnableInfrastructureNat) if err != nil { + err = core.SDKErrorf(err, "", "enable_infrastructure_nat-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "floating_ips", &obj.FloatingIps, UnmarshalFloatingIPReference) if err != nil { + err = core.SDKErrorf(err, "", "floating_ips-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "mac_address", &obj.MacAddress) if err != nil { + err = core.SDKErrorf(err, "", "mac_address-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "port_speed", &obj.PortSpeed) if err != nil { + err = core.SDKErrorf(err, "", "port_speed-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "security_groups-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "allowed_vlans", &obj.AllowedVlans) if err != nil { + err = core.SDKErrorf(err, "", "allowed_vlans-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType) if err != nil { + err = core.SDKErrorf(err, "", "interface_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -86812,74 +94903,92 @@ func UnmarshalBareMetalServerNetworkInterfaceByVlan(m map[string]json.RawMessage obj := new(BareMetalServerNetworkInterfaceByVlan) err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing) if err != nil { + err = core.SDKErrorf(err, "", "allow_ip_spoofing-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "enable_infrastructure_nat", &obj.EnableInfrastructureNat) if err != nil { + err = core.SDKErrorf(err, "", "enable_infrastructure_nat-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "floating_ips", &obj.FloatingIps, UnmarshalFloatingIPReference) if err != nil { + err = core.SDKErrorf(err, "", "floating_ips-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "mac_address", &obj.MacAddress) if err != nil { + err = core.SDKErrorf(err, "", "mac_address-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "port_speed", &obj.PortSpeed) if err != nil { + err = core.SDKErrorf(err, "", "port_speed-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "security_groups-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "allow_interface_to_float", &obj.AllowInterfaceToFloat) if err != nil { + err = core.SDKErrorf(err, "", "allow_interface_to_float-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType) if err != nil { + err = core.SDKErrorf(err, "", "interface_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "vlan", &obj.Vlan) if err != nil { + err = core.SDKErrorf(err, "", "vlan-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -86953,6 +95062,9 @@ func (*VpcV1) NewBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkI InterfaceType: core.StringPtr(interfaceType), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -86965,30 +95077,37 @@ func UnmarshalBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInte obj := new(BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype) err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing) if err != nil { + err = core.SDKErrorf(err, "", "allow_ip_spoofing-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "enable_infrastructure_nat", &obj.EnableInfrastructureNat) if err != nil { + err = core.SDKErrorf(err, "", "enable_infrastructure_nat-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalNetworkInterfaceIPPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "security_groups-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType) if err != nil { + err = core.SDKErrorf(err, "", "interface_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -87071,6 +95190,9 @@ func (*VpcV1) NewBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkI InterfaceType: core.StringPtr(interfaceType), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -87083,34 +95205,42 @@ func UnmarshalBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInte obj := new(BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype) err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing) if err != nil { + err = core.SDKErrorf(err, "", "allow_ip_spoofing-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "enable_infrastructure_nat", &obj.EnableInfrastructureNat) if err != nil { + err = core.SDKErrorf(err, "", "enable_infrastructure_nat-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalNetworkInterfaceIPPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "security_groups-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "allowed_vlans", &obj.AllowedVlans) if err != nil { + err = core.SDKErrorf(err, "", "allowed_vlans-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType) if err != nil { + err = core.SDKErrorf(err, "", "interface_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -87216,6 +95346,9 @@ func (*VpcV1) NewBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkI Vlan: core.Int64Ptr(vlan), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -87228,38 +95361,47 @@ func UnmarshalBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInte obj := new(BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype) err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing) if err != nil { + err = core.SDKErrorf(err, "", "allow_ip_spoofing-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "enable_infrastructure_nat", &obj.EnableInfrastructureNat) if err != nil { + err = core.SDKErrorf(err, "", "enable_infrastructure_nat-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalNetworkInterfaceIPPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "security_groups-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "allow_interface_to_float", &obj.AllowInterfaceToFloat) if err != nil { + err = core.SDKErrorf(err, "", "allow_interface_to_float-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType) if err != nil { + err = core.SDKErrorf(err, "", "interface_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "vlan", &obj.Vlan) if err != nil { + err = core.SDKErrorf(err, "", "vlan-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -87304,6 +95446,9 @@ func (*VpcV1) NewBareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServer VirtualNetworkInterface: virtualNetworkInterface, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -87316,18 +95461,22 @@ func UnmarshalBareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPri obj := new(BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPciPrototype) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "virtual_network_interface", &obj.VirtualNetworkInterface, UnmarshalBareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface) if err != nil { + err = core.SDKErrorf(err, "", "virtual_network_interface-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "allowed_vlans", &obj.AllowedVlans) if err != nil { + err = core.SDKErrorf(err, "", "allowed_vlans-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType) if err != nil { + err = core.SDKErrorf(err, "", "interface_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -87357,6 +95506,7 @@ func UnmarshalBareMetalServerProfileBandwidthDependent(m map[string]json.RawMess obj := new(BareMetalServerProfileBandwidthDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -87392,14 +95542,17 @@ func UnmarshalBareMetalServerProfileBandwidthEnum(m map[string]json.RawMessage, obj := new(BareMetalServerProfileBandwidthEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -87432,10 +95585,12 @@ func UnmarshalBareMetalServerProfileBandwidthFixed(m map[string]json.RawMessage, obj := new(BareMetalServerProfileBandwidthFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -87477,22 +95632,27 @@ func UnmarshalBareMetalServerProfileBandwidthRange(m map[string]json.RawMessage, obj := new(BareMetalServerProfileBandwidthRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -87521,6 +95681,7 @@ func UnmarshalBareMetalServerProfileCpuCoreCountDependent(m map[string]json.RawM obj := new(BareMetalServerProfileCpuCoreCountDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -87555,14 +95716,17 @@ func UnmarshalBareMetalServerProfileCpuCoreCountEnum(m map[string]json.RawMessag obj := new(BareMetalServerProfileCpuCoreCountEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -87594,10 +95758,12 @@ func UnmarshalBareMetalServerProfileCpuCoreCountFixed(m map[string]json.RawMessa obj := new(BareMetalServerProfileCpuCoreCountFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -87638,22 +95804,27 @@ func UnmarshalBareMetalServerProfileCpuCoreCountRange(m map[string]json.RawMessa obj := new(BareMetalServerProfileCpuCoreCountRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -87682,6 +95853,7 @@ func UnmarshalBareMetalServerProfileCpuSocketCountDependent(m map[string]json.Ra obj := new(BareMetalServerProfileCpuSocketCountDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -87716,14 +95888,17 @@ func UnmarshalBareMetalServerProfileCpuSocketCountEnum(m map[string]json.RawMess obj := new(BareMetalServerProfileCpuSocketCountEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -87755,10 +95930,12 @@ func UnmarshalBareMetalServerProfileCpuSocketCountFixed(m map[string]json.RawMes obj := new(BareMetalServerProfileCpuSocketCountFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -87799,22 +95976,27 @@ func UnmarshalBareMetalServerProfileCpuSocketCountRange(m map[string]json.RawMes obj := new(BareMetalServerProfileCpuSocketCountRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -87844,6 +96026,7 @@ func UnmarshalBareMetalServerProfileDiskQuantityDependent(m map[string]json.RawM obj := new(BareMetalServerProfileDiskQuantityDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -87878,14 +96061,17 @@ func UnmarshalBareMetalServerProfileDiskQuantityEnum(m map[string]json.RawMessag obj := new(BareMetalServerProfileDiskQuantityEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -87917,10 +96103,12 @@ func UnmarshalBareMetalServerProfileDiskQuantityFixed(m map[string]json.RawMessa obj := new(BareMetalServerProfileDiskQuantityFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -87961,22 +96149,27 @@ func UnmarshalBareMetalServerProfileDiskQuantityRange(m map[string]json.RawMessa obj := new(BareMetalServerProfileDiskQuantityRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -88006,6 +96199,7 @@ func UnmarshalBareMetalServerProfileDiskSizeDependent(m map[string]json.RawMessa obj := new(BareMetalServerProfileDiskSizeDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -88040,14 +96234,17 @@ func UnmarshalBareMetalServerProfileDiskSizeEnum(m map[string]json.RawMessage, r obj := new(BareMetalServerProfileDiskSizeEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -88079,10 +96276,12 @@ func UnmarshalBareMetalServerProfileDiskSizeFixed(m map[string]json.RawMessage, obj := new(BareMetalServerProfileDiskSizeFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -88124,22 +96323,27 @@ func UnmarshalBareMetalServerProfileDiskSizeRange(m map[string]json.RawMessage, obj := new(BareMetalServerProfileDiskSizeRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -88159,6 +96363,9 @@ func (*VpcV1) NewBareMetalServerProfileIdentityByHref(href string) (_model *Bare Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -88171,6 +96378,7 @@ func UnmarshalBareMetalServerProfileIdentityByHref(m map[string]json.RawMessage, obj := new(BareMetalServerProfileIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -88190,6 +96398,9 @@ func (*VpcV1) NewBareMetalServerProfileIdentityByName(name string) (_model *Bare Name: core.StringPtr(name), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -88202,6 +96413,7 @@ func UnmarshalBareMetalServerProfileIdentityByName(m map[string]json.RawMessage, obj := new(BareMetalServerProfileIdentityByName) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -88230,6 +96442,7 @@ func UnmarshalBareMetalServerProfileMemoryDependent(m map[string]json.RawMessage obj := new(BareMetalServerProfileMemoryDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -88264,14 +96477,17 @@ func UnmarshalBareMetalServerProfileMemoryEnum(m map[string]json.RawMessage, res obj := new(BareMetalServerProfileMemoryEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -88303,10 +96519,12 @@ func UnmarshalBareMetalServerProfileMemoryFixed(m map[string]json.RawMessage, re obj := new(BareMetalServerProfileMemoryFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -88347,22 +96565,27 @@ func UnmarshalBareMetalServerProfileMemoryRange(m map[string]json.RawMessage, re obj := new(BareMetalServerProfileMemoryRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -88392,6 +96615,7 @@ func UnmarshalBareMetalServerProfileNetworkAttachmentCountDependent(m map[string obj := new(BareMetalServerProfileNetworkAttachmentCountDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -88426,14 +96650,17 @@ func UnmarshalBareMetalServerProfileNetworkAttachmentCountRange(m map[string]jso obj := new(BareMetalServerProfileNetworkAttachmentCountRange) err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -88463,6 +96690,7 @@ func UnmarshalBareMetalServerProfileNetworkInterfaceCountDependent(m map[string] obj := new(BareMetalServerProfileNetworkInterfaceCountDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -88497,14 +96725,17 @@ func UnmarshalBareMetalServerProfileNetworkInterfaceCountRange(m map[string]json obj := new(BareMetalServerProfileNetworkInterfaceCountRange) err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -88559,6 +96790,9 @@ func (*VpcV1) NewBareMetalServerPrototypeBareMetalServerByNetworkAttachment(init PrimaryNetworkAttachment: primaryNetworkAttachment, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -88571,42 +96805,52 @@ func UnmarshalBareMetalServerPrototypeBareMetalServerByNetworkAttachment(m map[s obj := new(BareMetalServerPrototypeBareMetalServerByNetworkAttachment) err = core.UnmarshalPrimitive(m, "enable_secure_boot", &obj.EnableSecureBoot) if err != nil { + err = core.SDKErrorf(err, "", "enable_secure_boot-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "initialization", &obj.Initialization, UnmarshalBareMetalServerInitializationPrototype) if err != nil { + err = core.SDKErrorf(err, "", "initialization-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalBareMetalServerProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "trusted_platform_module", &obj.TrustedPlatformModule, UnmarshalBareMetalServerTrustedPlatformModulePrototype) if err != nil { + err = core.SDKErrorf(err, "", "trusted_platform_module-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalBareMetalServerNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalBareMetalServerPrimaryNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -88661,6 +96905,9 @@ func (*VpcV1) NewBareMetalServerPrototypeBareMetalServerByNetworkInterface(initi PrimaryNetworkInterface: primaryNetworkInterface, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -88673,42 +96920,52 @@ func UnmarshalBareMetalServerPrototypeBareMetalServerByNetworkInterface(m map[st obj := new(BareMetalServerPrototypeBareMetalServerByNetworkInterface) err = core.UnmarshalPrimitive(m, "enable_secure_boot", &obj.EnableSecureBoot) if err != nil { + err = core.SDKErrorf(err, "", "enable_secure_boot-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "initialization", &obj.Initialization, UnmarshalBareMetalServerInitializationPrototype) if err != nil { + err = core.SDKErrorf(err, "", "initialization-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalBareMetalServerProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "trusted_platform_module", &obj.TrustedPlatformModule, UnmarshalBareMetalServerTrustedPlatformModulePrototype) if err != nil { + err = core.SDKErrorf(err, "", "trusted_platform_module-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalBareMetalServerNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalBareMetalServerPrimaryNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_interface-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -88729,6 +96986,9 @@ func (*VpcV1) NewCatalogOfferingIdentityCatalogOfferingByCRN(crn string) (_model CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -88741,6 +97001,7 @@ func UnmarshalCatalogOfferingIdentityCatalogOfferingByCRN(m map[string]json.RawM obj := new(CatalogOfferingIdentityCatalogOfferingByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -88761,6 +97022,9 @@ func (*VpcV1) NewCatalogOfferingVersionIdentityCatalogOfferingVersionByCRN(crn s CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -88773,6 +97037,7 @@ func UnmarshalCatalogOfferingVersionIdentityCatalogOfferingVersionByCRN(m map[st obj := new(CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -88792,6 +97057,9 @@ func (*VpcV1) NewCertificateInstanceIdentityByCRN(crn string) (_model *Certifica CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -88804,6 +97072,7 @@ func UnmarshalCertificateInstanceIdentityByCRN(m map[string]json.RawMessage, res obj := new(CertificateInstanceIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -88823,6 +97092,9 @@ func (*VpcV1) NewCloudObjectStorageBucketIdentityByCRN(crn string) (_model *Clou CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -88835,6 +97107,7 @@ func UnmarshalCloudObjectStorageBucketIdentityByCRN(m map[string]json.RawMessage obj := new(CloudObjectStorageBucketIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -88854,6 +97127,9 @@ func (*VpcV1) NewCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentit Name: core.StringPtr(name), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -88866,6 +97142,7 @@ func UnmarshalCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityBy obj := new(CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -88885,6 +97162,9 @@ func (*VpcV1) NewDnsInstanceIdentityByCRN(crn string) (_model *DnsInstanceIdenti CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -88897,6 +97177,7 @@ func UnmarshalDnsInstanceIdentityByCRN(m map[string]json.RawMessage, result inte obj := new(DnsInstanceIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -88915,6 +97196,9 @@ func (*VpcV1) NewDnsZoneIdentityByID(id string) (_model *DnsZoneIdentityByID, er ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -88927,6 +97211,7 @@ func UnmarshalDnsZoneIdentityByID(m map[string]json.RawMessage, result interface obj := new(DnsZoneIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -88946,6 +97231,9 @@ func (*VpcV1) NewDedicatedHostGroupIdentityByCRN(crn string) (_model *DedicatedH CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -88958,6 +97246,7 @@ func UnmarshalDedicatedHostGroupIdentityByCRN(m map[string]json.RawMessage, resu obj := new(DedicatedHostGroupIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -88977,6 +97266,9 @@ func (*VpcV1) NewDedicatedHostGroupIdentityByHref(href string) (_model *Dedicate Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -88989,6 +97281,7 @@ func UnmarshalDedicatedHostGroupIdentityByHref(m map[string]json.RawMessage, res obj := new(DedicatedHostGroupIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -89008,6 +97301,9 @@ func (*VpcV1) NewDedicatedHostGroupIdentityByID(id string) (_model *DedicatedHos ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -89020,6 +97316,7 @@ func UnmarshalDedicatedHostGroupIdentityByID(m map[string]json.RawMessage, resul obj := new(DedicatedHostGroupIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -89039,6 +97336,9 @@ func (*VpcV1) NewDedicatedHostProfileIdentityByHref(href string) (_model *Dedica Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -89051,6 +97351,7 @@ func UnmarshalDedicatedHostProfileIdentityByHref(m map[string]json.RawMessage, r obj := new(DedicatedHostProfileIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -89070,6 +97371,9 @@ func (*VpcV1) NewDedicatedHostProfileIdentityByName(name string) (_model *Dedica Name: core.StringPtr(name), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -89082,6 +97386,7 @@ func UnmarshalDedicatedHostProfileIdentityByName(m map[string]json.RawMessage, r obj := new(DedicatedHostProfileIdentityByName) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -89110,6 +97415,7 @@ func UnmarshalDedicatedHostProfileMemoryDependent(m map[string]json.RawMessage, obj := new(DedicatedHostProfileMemoryDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -89144,14 +97450,17 @@ func UnmarshalDedicatedHostProfileMemoryEnum(m map[string]json.RawMessage, resul obj := new(DedicatedHostProfileMemoryEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -89183,10 +97492,12 @@ func UnmarshalDedicatedHostProfileMemoryFixed(m map[string]json.RawMessage, resu obj := new(DedicatedHostProfileMemoryFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -89227,22 +97538,27 @@ func UnmarshalDedicatedHostProfileMemoryRange(m map[string]json.RawMessage, resu obj := new(DedicatedHostProfileMemoryRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -89271,6 +97587,7 @@ func UnmarshalDedicatedHostProfileSocketDependent(m map[string]json.RawMessage, obj := new(DedicatedHostProfileSocketDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -89305,14 +97622,17 @@ func UnmarshalDedicatedHostProfileSocketEnum(m map[string]json.RawMessage, resul obj := new(DedicatedHostProfileSocketEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -89344,10 +97664,12 @@ func UnmarshalDedicatedHostProfileSocketFixed(m map[string]json.RawMessage, resu obj := new(DedicatedHostProfileSocketFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -89388,22 +97710,27 @@ func UnmarshalDedicatedHostProfileSocketRange(m map[string]json.RawMessage, resu obj := new(DedicatedHostProfileSocketRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -89432,6 +97759,7 @@ func UnmarshalDedicatedHostProfileVcpuDependent(m map[string]json.RawMessage, re obj := new(DedicatedHostProfileVcpuDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -89466,14 +97794,17 @@ func UnmarshalDedicatedHostProfileVcpuEnum(m map[string]json.RawMessage, result obj := new(DedicatedHostProfileVcpuEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -89505,10 +97836,12 @@ func UnmarshalDedicatedHostProfileVcpuFixed(m map[string]json.RawMessage, result obj := new(DedicatedHostProfileVcpuFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -89549,22 +97882,27 @@ func UnmarshalDedicatedHostProfileVcpuRange(m map[string]json.RawMessage, result obj := new(DedicatedHostProfileVcpuRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -89597,6 +97935,9 @@ func (*VpcV1) NewDedicatedHostPrototypeDedicatedHostByGroup(profile DedicatedHos Group: group, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -89609,22 +97950,27 @@ func UnmarshalDedicatedHostPrototypeDedicatedHostByGroup(m map[string]json.RawMe obj := new(DedicatedHostPrototypeDedicatedHostByGroup) err = core.UnmarshalPrimitive(m, "instance_placement_enabled", &obj.InstancePlacementEnabled) if err != nil { + err = core.SDKErrorf(err, "", "instance_placement_enabled-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalDedicatedHostProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalDedicatedHostGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "group-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -89659,6 +98005,9 @@ func (*VpcV1) NewDedicatedHostPrototypeDedicatedHostByZone(profile DedicatedHost Zone: zone, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -89671,26 +98020,32 @@ func UnmarshalDedicatedHostPrototypeDedicatedHostByZone(m map[string]json.RawMes obj := new(DedicatedHostPrototypeDedicatedHostByZone) err = core.UnmarshalPrimitive(m, "instance_placement_enabled", &obj.InstancePlacementEnabled) if err != nil { + err = core.SDKErrorf(err, "", "instance_placement_enabled-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalDedicatedHostProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalDedicatedHostGroupPrototypeDedicatedHostByZoneContext) if err != nil { + err = core.SDKErrorf(err, "", "group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -89712,6 +98067,9 @@ func (*VpcV1) NewEncryptionKeyIdentityByCRN(crn string) (_model *EncryptionKeyId CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -89724,6 +98082,7 @@ func UnmarshalEncryptionKeyIdentityByCRN(m map[string]json.RawMessage, result in obj := new(EncryptionKeyIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -89761,10 +98120,12 @@ func UnmarshalEndpointGatewayReservedIPReservedIPIdentity(m map[string]json.RawM obj := new(EndpointGatewayReservedIPReservedIPIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -89798,6 +98159,9 @@ func (*VpcV1) NewEndpointGatewayReservedIPReservedIPPrototypeTargetContext(subne Subnet: subnet, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -89810,18 +98174,22 @@ func UnmarshalEndpointGatewayReservedIPReservedIPPrototypeTargetContext(m map[st obj := new(EndpointGatewayReservedIPReservedIPPrototypeTargetContext) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { + err = core.SDKErrorf(err, "", "auto_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -89865,10 +98233,12 @@ func UnmarshalEndpointGatewayTargetPrototypeProviderCloudServiceIdentity(m map[s obj := new(EndpointGatewayTargetPrototypeProviderCloudServiceIdentity) err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -89913,10 +98283,12 @@ func UnmarshalEndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentit obj := new(EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity) err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -89948,10 +98320,12 @@ func UnmarshalEndpointGatewayTargetProviderCloudServiceReference(m map[string]js obj := new(EndpointGatewayTargetProviderCloudServiceReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -89984,10 +98358,12 @@ func UnmarshalEndpointGatewayTargetProviderInfrastructureServiceReference(m map[ obj := new(EndpointGatewayTargetProviderInfrastructureServiceReference) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -90020,6 +98396,9 @@ func (*VpcV1) NewFloatingIPPrototypeFloatingIPByTarget(target FloatingIPTargetPr Target: target, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -90032,14 +98411,17 @@ func UnmarshalFloatingIPPrototypeFloatingIPByTarget(m map[string]json.RawMessage obj := new(FloatingIPPrototypeFloatingIPByTarget) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalFloatingIPTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "target-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -90065,6 +98447,9 @@ func (*VpcV1) NewFloatingIPPrototypeFloatingIPByZone(zone ZoneIdentityIntf) (_mo Zone: zone, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -90077,14 +98462,17 @@ func UnmarshalFloatingIPPrototypeFloatingIPByZone(m map[string]json.RawMessage, obj := new(FloatingIPPrototypeFloatingIPByZone) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -90131,10 +98519,12 @@ func UnmarshalFloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentity(m map obj := new(FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -90181,10 +98571,12 @@ func UnmarshalFloatingIPTargetPatchNetworkInterfaceIdentity(m map[string]json.Ra obj := new(FloatingIPTargetPatchNetworkInterfaceIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -90226,14 +98618,17 @@ func UnmarshalFloatingIPTargetPatchVirtualNetworkInterfaceIdentity(m map[string] obj := new(FloatingIPTargetPatchVirtualNetworkInterfaceIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -90280,10 +98675,12 @@ func UnmarshalFloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentity(m obj := new(FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -90330,10 +98727,12 @@ func UnmarshalFloatingIPTargetPrototypeNetworkInterfaceIdentity(m map[string]jso obj := new(FloatingIPTargetPrototypeNetworkInterfaceIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -90375,14 +98774,17 @@ func UnmarshalFloatingIPTargetPrototypeVirtualNetworkInterfaceIdentity(m map[str obj := new(FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -90435,26 +98837,32 @@ func UnmarshalFloatingIPTargetBareMetalServerNetworkInterfaceReference(m map[str obj := new(FloatingIPTargetBareMetalServerNetworkInterfaceReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalBareMetalServerNetworkInterfaceReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -90507,26 +98915,32 @@ func UnmarshalFloatingIPTargetNetworkInterfaceReference(m map[string]json.RawMes obj := new(FloatingIPTargetNetworkInterfaceReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalNetworkInterfaceReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -90571,26 +98985,32 @@ func UnmarshalFloatingIPTargetPublicGatewayReference(m map[string]json.RawMessag obj := new(FloatingIPTargetPublicGatewayReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalPublicGatewayReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -90641,34 +99061,42 @@ func UnmarshalFloatingIPTargetVirtualNetworkInterfaceReference(m map[string]json obj := new(FloatingIPTargetVirtualNetworkInterfaceReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVirtualNetworkInterfaceReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -90710,14 +99138,17 @@ func UnmarshalFlowLogCollectorTargetPrototypeInstanceIdentity(m map[string]json. obj := new(FlowLogCollectorTargetPrototypeInstanceIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -90755,10 +99186,12 @@ func UnmarshalFlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentity(m obj := new(FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -90805,10 +99238,12 @@ func UnmarshalFlowLogCollectorTargetPrototypeNetworkInterfaceIdentity(m map[stri obj := new(FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -90850,14 +99285,17 @@ func UnmarshalFlowLogCollectorTargetPrototypeSubnetIdentity(m map[string]json.Ra obj := new(FlowLogCollectorTargetPrototypeSubnetIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -90899,14 +99337,17 @@ func UnmarshalFlowLogCollectorTargetPrototypeVPCIdentity(m map[string]json.RawMe obj := new(FlowLogCollectorTargetPrototypeVPCIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -90948,14 +99389,17 @@ func UnmarshalFlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentity(m m obj := new(FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -91004,30 +99448,37 @@ func UnmarshalFlowLogCollectorTargetInstanceNetworkAttachmentReference(m map[str obj := new(FlowLogCollectorTargetInstanceNetworkAttachmentReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceNetworkAttachmentReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -91063,22 +99514,27 @@ func UnmarshalFlowLogCollectorTargetInstanceReference(m map[string]json.RawMessa obj := new(FlowLogCollectorTargetInstanceReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -91129,22 +99585,27 @@ func UnmarshalFlowLogCollectorTargetNetworkInterfaceReferenceTargetContext(m map obj := new(FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalNetworkInterfaceReferenceTargetContextDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -91189,26 +99650,32 @@ func UnmarshalFlowLogCollectorTargetSubnetReference(m map[string]json.RawMessage obj := new(FlowLogCollectorTargetSubnetReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalSubnetReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -91253,26 +99720,32 @@ func UnmarshalFlowLogCollectorTargetVPCReference(m map[string]json.RawMessage, r obj := new(FlowLogCollectorTargetVPCReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVPCReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -91313,22 +99786,27 @@ func UnmarshalFlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentCo obj := new(FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -91348,6 +99826,9 @@ func (*VpcV1) NewImageIdentityByCRN(crn string) (_model *ImageIdentityByCRN, err CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -91360,6 +99841,7 @@ func UnmarshalImageIdentityByCRN(m map[string]json.RawMessage, result interface{ obj := new(ImageIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -91379,6 +99861,9 @@ func (*VpcV1) NewImageIdentityByHref(href string) (_model *ImageIdentityByHref, Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -91391,6 +99876,7 @@ func UnmarshalImageIdentityByHref(m map[string]json.RawMessage, result interface obj := new(ImageIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -91410,6 +99896,9 @@ func (*VpcV1) NewImageIdentityByID(id string) (_model *ImageIdentityByID, err er ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -91422,6 +99911,7 @@ func UnmarshalImageIdentityByID(m map[string]json.RawMessage, result interface{} obj := new(ImageIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -91494,6 +99984,9 @@ func (*VpcV1) NewImagePrototypeImageByFile(file *ImageFilePrototype, operatingSy OperatingSystem: operatingSystem, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -91506,34 +99999,42 @@ func UnmarshalImagePrototypeImageByFile(m map[string]json.RawMessage, result int obj := new(ImagePrototypeImageByFile) err = core.UnmarshalPrimitive(m, "deprecation_at", &obj.DeprecationAt) if err != nil { + err = core.SDKErrorf(err, "", "deprecation_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "obsolescence_at", &obj.ObsolescenceAt) if err != nil { + err = core.SDKErrorf(err, "", "obsolescence_at-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "encrypted_data_key", &obj.EncryptedDataKey) if err != nil { + err = core.SDKErrorf(err, "", "encrypted_data_key-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "encryption_key-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "file", &obj.File, UnmarshalImageFilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "file-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "operating_system", &obj.OperatingSystem, UnmarshalOperatingSystemIdentity) if err != nil { + err = core.SDKErrorf(err, "", "operating_system-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -91593,6 +100094,9 @@ func (*VpcV1) NewImagePrototypeImageBySourceVolume(sourceVolume VolumeIdentityIn SourceVolume: sourceVolume, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -91605,26 +100109,32 @@ func UnmarshalImagePrototypeImageBySourceVolume(m map[string]json.RawMessage, re obj := new(ImagePrototypeImageBySourceVolume) err = core.UnmarshalPrimitive(m, "deprecation_at", &obj.DeprecationAt) if err != nil { + err = core.SDKErrorf(err, "", "deprecation_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "obsolescence_at", &obj.ObsolescenceAt) if err != nil { + err = core.SDKErrorf(err, "", "obsolescence_at-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "encryption_key-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "source_volume", &obj.SourceVolume, UnmarshalVolumeIdentity) if err != nil { + err = core.SDKErrorf(err, "", "source_volume-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -91645,6 +100155,9 @@ func (*VpcV1) NewInstanceCatalogOfferingPrototypeCatalogOfferingByOffering(offer Offering: offering, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -91657,6 +100170,7 @@ func UnmarshalInstanceCatalogOfferingPrototypeCatalogOfferingByOffering(m map[st obj := new(InstanceCatalogOfferingPrototypeCatalogOfferingByOffering) err = core.UnmarshalModel(m, "offering", &obj.Offering, UnmarshalCatalogOfferingIdentity) if err != nil { + err = core.SDKErrorf(err, "", "offering-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -91678,6 +100192,9 @@ func (*VpcV1) NewInstanceCatalogOfferingPrototypeCatalogOfferingByVersion(versio Version: version, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -91690,6 +100207,7 @@ func UnmarshalInstanceCatalogOfferingPrototypeCatalogOfferingByVersion(m map[str obj := new(InstanceCatalogOfferingPrototypeCatalogOfferingByVersion) err = core.UnmarshalModel(m, "version", &obj.Version, UnmarshalCatalogOfferingVersionIdentity) if err != nil { + err = core.SDKErrorf(err, "", "version-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -91736,22 +100254,27 @@ func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototype(m map[ obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototype) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "run_at", &obj.RunAt) if err != nil { + err = core.SDKErrorf(err, "", "run_at-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupPrototype) if err != nil { + err = core.SDKErrorf(err, "", "group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManagerPrototype) if err != nil { + err = core.SDKErrorf(err, "", "manager-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec) if err != nil { + err = core.SDKErrorf(err, "", "cron_spec-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -91865,62 +100388,77 @@ func UnmarshalInstanceGroupManagerActionScheduledAction(m map[string]json.RawMes obj := new(InstanceGroupManagerActionScheduledAction) err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { + err = core.SDKErrorf(err, "", "auto_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "auto_delete_timeout", &obj.AutoDeleteTimeout) if err != nil { + err = core.SDKErrorf(err, "", "auto_delete_timeout-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt) if err != nil { + err = core.SDKErrorf(err, "", "updated_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "action_type", &obj.ActionType) if err != nil { + err = core.SDKErrorf(err, "", "action_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec) if err != nil { + err = core.SDKErrorf(err, "", "cron_spec-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "last_applied_at", &obj.LastAppliedAt) if err != nil { + err = core.SDKErrorf(err, "", "last_applied_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "next_run_at", &obj.NextRunAt) if err != nil { + err = core.SDKErrorf(err, "", "next_run_at-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroup) if err != nil { + err = core.SDKErrorf(err, "", "group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManager) if err != nil { + err = core.SDKErrorf(err, "", "manager-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -91982,50 +100520,62 @@ func UnmarshalInstanceGroupManagerAutoScale(m map[string]json.RawMessage, result obj := new(InstanceGroupManagerAutoScale) err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "management_enabled", &obj.ManagementEnabled) if err != nil { + err = core.SDKErrorf(err, "", "management_enabled-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt) if err != nil { + err = core.SDKErrorf(err, "", "updated_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "aggregation_window", &obj.AggregationWindow) if err != nil { + err = core.SDKErrorf(err, "", "aggregation_window-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "cooldown", &obj.Cooldown) if err != nil { + err = core.SDKErrorf(err, "", "cooldown-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "manager_type", &obj.ManagerType) if err != nil { + err = core.SDKErrorf(err, "", "manager_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount) if err != nil { + err = core.SDKErrorf(err, "", "max_membership_count-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount) if err != nil { + err = core.SDKErrorf(err, "", "min_membership_count-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "policies", &obj.Policies, UnmarshalInstanceGroupManagerPolicyReference) if err != nil { + err = core.SDKErrorf(err, "", "policies-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -92072,6 +100622,9 @@ func (*VpcV1) NewInstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPo PolicyType: core.StringPtr(policyType), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -92084,18 +100637,22 @@ func UnmarshalInstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolic obj := new(InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "metric_type", &obj.MetricType) if err != nil { + err = core.SDKErrorf(err, "", "metric_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "metric_value", &obj.MetricValue) if err != nil { + err = core.SDKErrorf(err, "", "metric_value-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "policy_type", &obj.PolicyType) if err != nil { + err = core.SDKErrorf(err, "", "policy_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -92155,34 +100712,42 @@ func UnmarshalInstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy(m map[s obj := new(InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy) err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt) if err != nil { + err = core.SDKErrorf(err, "", "updated_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "metric_type", &obj.MetricType) if err != nil { + err = core.SDKErrorf(err, "", "metric_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "metric_value", &obj.MetricValue) if err != nil { + err = core.SDKErrorf(err, "", "metric_value-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "policy_type", &obj.PolicyType) if err != nil { + err = core.SDKErrorf(err, "", "policy_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -92228,6 +100793,9 @@ func (*VpcV1) NewInstanceGroupManagerPrototypeInstanceGroupManagerAutoScaleProto MaxMembershipCount: core.Int64Ptr(maxMembershipCount), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -92240,30 +100808,37 @@ func UnmarshalInstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototyp obj := new(InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype) err = core.UnmarshalPrimitive(m, "management_enabled", &obj.ManagementEnabled) if err != nil { + err = core.SDKErrorf(err, "", "management_enabled-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "aggregation_window", &obj.AggregationWindow) if err != nil { + err = core.SDKErrorf(err, "", "aggregation_window-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "cooldown", &obj.Cooldown) if err != nil { + err = core.SDKErrorf(err, "", "cooldown-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "manager_type", &obj.ManagerType) if err != nil { + err = core.SDKErrorf(err, "", "manager_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount) if err != nil { + err = core.SDKErrorf(err, "", "max_membership_count-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount) if err != nil { + err = core.SDKErrorf(err, "", "min_membership_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -92296,6 +100871,9 @@ func (*VpcV1) NewInstanceGroupManagerPrototypeInstanceGroupManagerScheduledProto ManagerType: core.StringPtr(managerType), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -92308,14 +100886,17 @@ func UnmarshalInstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototyp obj := new(InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype) err = core.UnmarshalPrimitive(m, "management_enabled", &obj.ManagementEnabled) if err != nil { + err = core.SDKErrorf(err, "", "management_enabled-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "manager_type", &obj.ManagerType) if err != nil { + err = core.SDKErrorf(err, "", "manager_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -92365,34 +100946,42 @@ func UnmarshalInstanceGroupManagerScheduled(m map[string]json.RawMessage, result obj := new(InstanceGroupManagerScheduled) err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "management_enabled", &obj.ManagementEnabled) if err != nil { + err = core.SDKErrorf(err, "", "management_enabled-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt) if err != nil { + err = core.SDKErrorf(err, "", "updated_at-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "actions", &obj.Actions, UnmarshalInstanceGroupManagerActionReference) if err != nil { + err = core.SDKErrorf(err, "", "actions-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "manager_type", &obj.ManagerType) if err != nil { + err = core.SDKErrorf(err, "", "manager_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -92431,26 +101020,32 @@ func UnmarshalInstanceGroupManagerScheduledActionManagerAutoScale(m map[string]j obj := new(InstanceGroupManagerScheduledActionManagerAutoScale) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceGroupManagerReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount) if err != nil { + err = core.SDKErrorf(err, "", "max_membership_count-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount) if err != nil { + err = core.SDKErrorf(err, "", "min_membership_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -92496,18 +101091,22 @@ func UnmarshalInstanceGroupManagerScheduledActionManagerPrototypeAutoScaleProtot obj := new(InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype) err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount) if err != nil { + err = core.SDKErrorf(err, "", "max_membership_count-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount) if err != nil { + err = core.SDKErrorf(err, "", "min_membership_count-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -92549,14 +101148,17 @@ func UnmarshalInstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNe obj := new(InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -92635,38 +101237,47 @@ func UnmarshalInstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNe obj := new(InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext) err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing) if err != nil { + err = core.SDKErrorf(err, "", "allow_ip_spoofing-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { + err = core.SDKErrorf(err, "", "auto_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "enable_infrastructure_nat", &obj.EnableInfrastructureNat) if err != nil { + err = core.SDKErrorf(err, "", "enable_infrastructure_nat-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "ips", &obj.Ips, UnmarshalVirtualNetworkInterfaceIPPrototype) if err != nil { + err = core.SDKErrorf(err, "", "ips-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalVirtualNetworkInterfacePrimaryIPPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "security_groups-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -92686,6 +101297,9 @@ func (*VpcV1) NewInstancePatchProfileInstanceProfileIdentityByHref(href string) Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -92698,6 +101312,7 @@ func UnmarshalInstancePatchProfileInstanceProfileIdentityByHref(m map[string]jso obj := new(InstancePatchProfileInstanceProfileIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -92717,6 +101332,9 @@ func (*VpcV1) NewInstancePatchProfileInstanceProfileIdentityByName(name string) Name: core.StringPtr(name), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -92729,6 +101347,7 @@ func UnmarshalInstancePatchProfileInstanceProfileIdentityByName(m map[string]jso obj := new(InstancePatchProfileInstanceProfileIdentityByName) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -92770,14 +101389,17 @@ func UnmarshalInstancePlacementTargetPatchDedicatedHostGroupIdentity(m map[strin obj := new(InstancePlacementTargetPatchDedicatedHostGroupIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -92819,14 +101441,17 @@ func UnmarshalInstancePlacementTargetPatchDedicatedHostIdentity(m map[string]jso obj := new(InstancePlacementTargetPatchDedicatedHostIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -92868,14 +101493,17 @@ func UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentity(m map[s obj := new(InstancePlacementTargetPrototypeDedicatedHostGroupIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -92917,14 +101545,17 @@ func UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentity(m map[string obj := new(InstancePlacementTargetPrototypeDedicatedHostIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -92966,14 +101597,17 @@ func UnmarshalInstancePlacementTargetPrototypePlacementGroupIdentity(m map[strin obj := new(InstancePlacementTargetPrototypePlacementGroupIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -93018,26 +101652,32 @@ func UnmarshalInstancePlacementTargetDedicatedHostGroupReference(m map[string]js obj := new(InstancePlacementTargetDedicatedHostGroupReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalDedicatedHostGroupReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -93082,26 +101722,32 @@ func UnmarshalInstancePlacementTargetDedicatedHostReference(m map[string]json.Ra obj := new(InstancePlacementTargetDedicatedHostReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalDedicatedHostReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -93146,26 +101792,32 @@ func UnmarshalInstancePlacementTargetPlacementGroupReference(m map[string]json.R obj := new(InstancePlacementTargetPlacementGroupReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalPlacementGroupReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -93195,6 +101847,7 @@ func UnmarshalInstanceProfileBandwidthDependent(m map[string]json.RawMessage, re obj := new(InstanceProfileBandwidthDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -93230,14 +101883,17 @@ func UnmarshalInstanceProfileBandwidthEnum(m map[string]json.RawMessage, result obj := new(InstanceProfileBandwidthEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -93270,10 +101926,12 @@ func UnmarshalInstanceProfileBandwidthFixed(m map[string]json.RawMessage, result obj := new(InstanceProfileBandwidthFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -93315,22 +101973,27 @@ func UnmarshalInstanceProfileBandwidthRange(m map[string]json.RawMessage, result obj := new(InstanceProfileBandwidthRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -93359,6 +102022,7 @@ func UnmarshalInstanceProfileDiskQuantityDependent(m map[string]json.RawMessage, obj := new(InstanceProfileDiskQuantityDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -93393,14 +102057,17 @@ func UnmarshalInstanceProfileDiskQuantityEnum(m map[string]json.RawMessage, resu obj := new(InstanceProfileDiskQuantityEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -93432,10 +102099,12 @@ func UnmarshalInstanceProfileDiskQuantityFixed(m map[string]json.RawMessage, res obj := new(InstanceProfileDiskQuantityFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -93476,22 +102145,27 @@ func UnmarshalInstanceProfileDiskQuantityRange(m map[string]json.RawMessage, res obj := new(InstanceProfileDiskQuantityRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -93521,6 +102195,7 @@ func UnmarshalInstanceProfileDiskSizeDependent(m map[string]json.RawMessage, res obj := new(InstanceProfileDiskSizeDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -93555,14 +102230,17 @@ func UnmarshalInstanceProfileDiskSizeEnum(m map[string]json.RawMessage, result i obj := new(InstanceProfileDiskSizeEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -93594,10 +102272,12 @@ func UnmarshalInstanceProfileDiskSizeFixed(m map[string]json.RawMessage, result obj := new(InstanceProfileDiskSizeFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -93638,22 +102318,27 @@ func UnmarshalInstanceProfileDiskSizeRange(m map[string]json.RawMessage, result obj := new(InstanceProfileDiskSizeRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -93682,6 +102367,7 @@ func UnmarshalInstanceProfileGpuDependent(m map[string]json.RawMessage, result i obj := new(InstanceProfileGpuDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -93716,14 +102402,17 @@ func UnmarshalInstanceProfileGpuEnum(m map[string]json.RawMessage, result interf obj := new(InstanceProfileGpuEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -93755,10 +102444,12 @@ func UnmarshalInstanceProfileGpuFixed(m map[string]json.RawMessage, result inter obj := new(InstanceProfileGpuFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -93787,6 +102478,7 @@ func UnmarshalInstanceProfileGpuMemoryDependent(m map[string]json.RawMessage, re obj := new(InstanceProfileGpuMemoryDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -93821,14 +102513,17 @@ func UnmarshalInstanceProfileGpuMemoryEnum(m map[string]json.RawMessage, result obj := new(InstanceProfileGpuMemoryEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -93860,10 +102555,12 @@ func UnmarshalInstanceProfileGpuMemoryFixed(m map[string]json.RawMessage, result obj := new(InstanceProfileGpuMemoryFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -93904,22 +102601,27 @@ func UnmarshalInstanceProfileGpuMemoryRange(m map[string]json.RawMessage, result obj := new(InstanceProfileGpuMemoryRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -93960,22 +102662,27 @@ func UnmarshalInstanceProfileGpuRange(m map[string]json.RawMessage, result inter obj := new(InstanceProfileGpuRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -93995,6 +102702,9 @@ func (*VpcV1) NewInstanceProfileIdentityByHref(href string) (_model *InstancePro Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -94007,6 +102717,7 @@ func UnmarshalInstanceProfileIdentityByHref(m map[string]json.RawMessage, result obj := new(InstanceProfileIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -94026,6 +102737,9 @@ func (*VpcV1) NewInstanceProfileIdentityByName(name string) (_model *InstancePro Name: core.StringPtr(name), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -94038,6 +102752,7 @@ func UnmarshalInstanceProfileIdentityByName(m map[string]json.RawMessage, result obj := new(InstanceProfileIdentityByName) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -94066,6 +102781,7 @@ func UnmarshalInstanceProfileMemoryDependent(m map[string]json.RawMessage, resul obj := new(InstanceProfileMemoryDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -94100,14 +102816,17 @@ func UnmarshalInstanceProfileMemoryEnum(m map[string]json.RawMessage, result int obj := new(InstanceProfileMemoryEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -94139,10 +102858,12 @@ func UnmarshalInstanceProfileMemoryFixed(m map[string]json.RawMessage, result in obj := new(InstanceProfileMemoryFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -94183,22 +102904,27 @@ func UnmarshalInstanceProfileMemoryRange(m map[string]json.RawMessage, result in obj := new(InstanceProfileMemoryRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -94228,6 +102954,7 @@ func UnmarshalInstanceProfileNumaCountDependent(m map[string]json.RawMessage, re obj := new(InstanceProfileNumaCountDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -94259,10 +102986,12 @@ func UnmarshalInstanceProfileNumaCountFixed(m map[string]json.RawMessage, result obj := new(InstanceProfileNumaCountFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -94291,6 +103020,7 @@ func UnmarshalInstanceProfileNetworkAttachmentCountDependent(m map[string]json.R obj := new(InstanceProfileNetworkAttachmentCountDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -94325,14 +103055,17 @@ func UnmarshalInstanceProfileNetworkAttachmentCountRange(m map[string]json.RawMe obj := new(InstanceProfileNetworkAttachmentCountRange) err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -94361,6 +103094,7 @@ func UnmarshalInstanceProfileNetworkInterfaceCountDependent(m map[string]json.Ra obj := new(InstanceProfileNetworkInterfaceCountDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -94395,14 +103129,17 @@ func UnmarshalInstanceProfileNetworkInterfaceCountRange(m map[string]json.RawMes obj := new(InstanceProfileNetworkInterfaceCountRange) err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -94431,6 +103168,7 @@ func UnmarshalInstanceProfilePortSpeedDependent(m map[string]json.RawMessage, re obj := new(InstanceProfilePortSpeedDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -94462,10 +103200,12 @@ func UnmarshalInstanceProfilePortSpeedFixed(m map[string]json.RawMessage, result obj := new(InstanceProfilePortSpeedFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -94494,6 +103234,7 @@ func UnmarshalInstanceProfileVcpuDependent(m map[string]json.RawMessage, result obj := new(InstanceProfileVcpuDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -94528,14 +103269,17 @@ func UnmarshalInstanceProfileVcpuEnum(m map[string]json.RawMessage, result inter obj := new(InstanceProfileVcpuEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -94567,10 +103311,12 @@ func UnmarshalInstanceProfileVcpuFixed(m map[string]json.RawMessage, result inte obj := new(InstanceProfileVcpuFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -94611,22 +103357,27 @@ func UnmarshalInstanceProfileVcpuRange(m map[string]json.RawMessage, result inte obj := new(InstanceProfileVcpuRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -94656,6 +103407,7 @@ func UnmarshalInstanceProfileVolumeBandwidthDependent(m map[string]json.RawMessa obj := new(InstanceProfileVolumeBandwidthDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -94691,14 +103443,17 @@ func UnmarshalInstanceProfileVolumeBandwidthEnum(m map[string]json.RawMessage, r obj := new(InstanceProfileVolumeBandwidthEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -94730,10 +103485,12 @@ func UnmarshalInstanceProfileVolumeBandwidthFixed(m map[string]json.RawMessage, obj := new(InstanceProfileVolumeBandwidthFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -94775,22 +103532,27 @@ func UnmarshalInstanceProfileVolumeBandwidthRange(m map[string]json.RawMessage, obj := new(InstanceProfileVolumeBandwidthRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -94913,82 +103675,102 @@ func UnmarshalInstancePrototypeInstanceByCatalogOffering(m map[string]json.RawMe obj := new(InstancePrototypeInstanceByCatalogOffering) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "catalog_offering", &obj.CatalogOffering, UnmarshalInstanceCatalogOfferingPrototype) if err != nil { + err = core.SDKErrorf(err, "", "catalog_offering-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_interface-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -95105,82 +103887,102 @@ func UnmarshalInstancePrototypeInstanceByImage(m map[string]json.RawMessage, res obj := new(InstancePrototypeInstanceByImage) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity) if err != nil { + err = core.SDKErrorf(err, "", "image-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_interface-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -95294,78 +104096,97 @@ func UnmarshalInstancePrototypeInstanceBySourceSnapshot(m map[string]json.RawMes obj := new(InstancePrototypeInstanceBySourceSnapshot) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceBySourceSnapshotContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_interface-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -95487,6 +104308,9 @@ func (*VpcV1) NewInstancePrototypeInstanceBySourceTemplate(sourceTemplate Instan SourceTemplate: sourceTemplate, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -95499,90 +104323,112 @@ func UnmarshalInstancePrototypeInstanceBySourceTemplate(m map[string]json.RawMes obj := new(InstancePrototypeInstanceBySourceTemplate) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "catalog_offering", &obj.CatalogOffering, UnmarshalInstanceCatalogOfferingPrototype) if err != nil { + err = core.SDKErrorf(err, "", "catalog_offering-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity) if err != nil { + err = core.SDKErrorf(err, "", "image-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_interface-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "source_template", &obj.SourceTemplate, UnmarshalInstanceTemplateIdentity) if err != nil { + err = core.SDKErrorf(err, "", "source_template-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -95696,78 +104542,97 @@ func UnmarshalInstancePrototypeInstanceByVolume(m map[string]json.RawMessage, re obj := new(InstancePrototypeInstanceByVolume) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByVolumeContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_interface-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -95787,6 +104652,9 @@ func (*VpcV1) NewInstanceTemplateIdentityByCRN(crn string) (_model *InstanceTemp CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -95799,6 +104667,7 @@ func UnmarshalInstanceTemplateIdentityByCRN(m map[string]json.RawMessage, result obj := new(InstanceTemplateIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -95818,6 +104687,9 @@ func (*VpcV1) NewInstanceTemplateIdentityByHref(href string) (_model *InstanceTe Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -95830,6 +104702,7 @@ func UnmarshalInstanceTemplateIdentityByHref(m map[string]json.RawMessage, resul obj := new(InstanceTemplateIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -95849,6 +104722,9 @@ func (*VpcV1) NewInstanceTemplateIdentityByID(id string) (_model *InstanceTempla ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -95861,6 +104737,7 @@ func UnmarshalInstanceTemplateIdentityByID(m map[string]json.RawMessage, result obj := new(InstanceTemplateIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -95981,82 +104858,102 @@ func UnmarshalInstanceTemplatePrototypeInstanceTemplateByCatalogOffering(m map[s obj := new(InstanceTemplatePrototypeInstanceTemplateByCatalogOffering) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "catalog_offering", &obj.CatalogOffering, UnmarshalInstanceCatalogOfferingPrototype) if err != nil { + err = core.SDKErrorf(err, "", "catalog_offering-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_interface-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -96171,82 +105068,102 @@ func UnmarshalInstanceTemplatePrototypeInstanceTemplateByImage(m map[string]json obj := new(InstanceTemplatePrototypeInstanceTemplateByImage) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity) if err != nil { + err = core.SDKErrorf(err, "", "image-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_interface-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -96358,78 +105275,97 @@ func UnmarshalInstanceTemplatePrototypeInstanceTemplateBySourceSnapshot(m map[st obj := new(InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceBySourceSnapshotContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_interface-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -96549,6 +105485,9 @@ func (*VpcV1) NewInstanceTemplatePrototypeInstanceTemplateBySourceTemplate(sourc SourceTemplate: sourceTemplate, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -96561,90 +105500,112 @@ func UnmarshalInstanceTemplatePrototypeInstanceTemplateBySourceTemplate(m map[st obj := new(InstanceTemplatePrototypeInstanceTemplateBySourceTemplate) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "catalog_offering", &obj.CatalogOffering, UnmarshalInstanceCatalogOfferingPrototype) if err != nil { + err = core.SDKErrorf(err, "", "catalog_offering-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity) if err != nil { + err = core.SDKErrorf(err, "", "image-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_interface-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "source_template", &obj.SourceTemplate, UnmarshalInstanceTemplateIdentity) if err != nil { + err = core.SDKErrorf(err, "", "source_template-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -96777,98 +105738,122 @@ func UnmarshalInstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext(m obj := new(InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "catalog_offering", &obj.CatalogOffering, UnmarshalInstanceCatalogOfferingPrototype) if err != nil { + err = core.SDKErrorf(err, "", "catalog_offering-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_interface-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -96995,98 +105980,122 @@ func UnmarshalInstanceTemplateInstanceByImageInstanceTemplateContext(m map[strin obj := new(InstanceTemplateInstanceByImageInstanceTemplateContext) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity) if err != nil { + err = core.SDKErrorf(err, "", "image-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_interface-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -97210,94 +106219,117 @@ func UnmarshalInstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext(m obj := new(InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceBySourceSnapshotContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_interface-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -97317,6 +106349,9 @@ func (*VpcV1) NewKeyIdentityByCRN(crn string) (_model *KeyIdentityByCRN, err err CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -97329,6 +106364,7 @@ func UnmarshalKeyIdentityByCRN(m map[string]json.RawMessage, result interface{}) obj := new(KeyIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -97349,6 +106385,9 @@ func (*VpcV1) NewKeyIdentityByFingerprint(fingerprint string) (_model *KeyIdenti Fingerprint: core.StringPtr(fingerprint), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -97361,6 +106400,7 @@ func UnmarshalKeyIdentityByFingerprint(m map[string]json.RawMessage, result inte obj := new(KeyIdentityByFingerprint) err = core.UnmarshalPrimitive(m, "fingerprint", &obj.Fingerprint) if err != nil { + err = core.SDKErrorf(err, "", "fingerprint-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -97380,6 +106420,9 @@ func (*VpcV1) NewKeyIdentityByHref(href string) (_model *KeyIdentityByHref, err Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -97392,6 +106435,7 @@ func UnmarshalKeyIdentityByHref(m map[string]json.RawMessage, result interface{} obj := new(KeyIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -97411,6 +106455,9 @@ func (*VpcV1) NewKeyIdentityByID(id string) (_model *KeyIdentityByID, err error) ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -97423,6 +106470,7 @@ func UnmarshalKeyIdentityByID(m map[string]json.RawMessage, result interface{}) obj := new(KeyIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -97442,6 +106490,9 @@ func (*VpcV1) NewLegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketI Name: core.StringPtr(name), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -97454,6 +106505,7 @@ func UnmarshalLegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIden obj := new(LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -97473,6 +106525,9 @@ func (*VpcV1) NewLoadBalancerIdentityByCRN(crn string) (_model *LoadBalancerIden CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -97485,6 +106540,7 @@ func UnmarshalLoadBalancerIdentityByCRN(m map[string]json.RawMessage, result int obj := new(LoadBalancerIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -97504,6 +106560,9 @@ func (*VpcV1) NewLoadBalancerIdentityByHref(href string) (_model *LoadBalancerId Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -97516,6 +106575,7 @@ func UnmarshalLoadBalancerIdentityByHref(m map[string]json.RawMessage, result in obj := new(LoadBalancerIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -97535,6 +106595,9 @@ func (*VpcV1) NewLoadBalancerIdentityByID(id string) (_model *LoadBalancerIdenti ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -97547,6 +106610,7 @@ func UnmarshalLoadBalancerIdentityByID(m map[string]json.RawMessage, result inte obj := new(LoadBalancerIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -97566,6 +106630,9 @@ func (*VpcV1) NewLoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByH Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -97578,6 +106645,7 @@ func UnmarshalLoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref obj := new(LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -97597,6 +106665,9 @@ func (*VpcV1) NewLoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByI ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -97609,6 +106680,7 @@ func UnmarshalLoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByID(m obj := new(LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -97628,6 +106700,9 @@ func (*VpcV1) NewLoadBalancerListenerIdentityByHref(href string) (_model *LoadBa Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -97640,6 +106715,7 @@ func UnmarshalLoadBalancerListenerIdentityByHref(m map[string]json.RawMessage, r obj := new(LoadBalancerListenerIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -97659,6 +106735,9 @@ func (*VpcV1) NewLoadBalancerListenerIdentityByID(id string) (_model *LoadBalanc ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -97671,6 +106750,7 @@ func UnmarshalLoadBalancerListenerIdentityByID(m map[string]json.RawMessage, res obj := new(LoadBalancerListenerIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -97699,14 +106779,17 @@ func UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTT obj := new(LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch) err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode) if err != nil { + err = core.SDKErrorf(err, "", "http_status_code-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "listener", &obj.Listener, UnmarshalLoadBalancerListenerIdentity) if err != nil { + err = core.SDKErrorf(err, "", "listener-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "uri", &obj.URI) if err != nil { + err = core.SDKErrorf(err, "", "uri-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -97732,10 +106815,12 @@ func UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRed obj := new(LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch) err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode) if err != nil { + err = core.SDKErrorf(err, "", "http_status_code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "url", &obj.URL) if err != nil { + err = core.SDKErrorf(err, "", "url-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -97773,10 +106858,12 @@ func UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity(m ma obj := new(LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -97803,6 +106890,9 @@ func (*VpcV1) NewLoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPo Listener: listener, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -97815,14 +106905,17 @@ func UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolic obj := new(LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype) err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode) if err != nil { + err = core.SDKErrorf(err, "", "http_status_code-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "listener", &obj.Listener, UnmarshalLoadBalancerListenerIdentity) if err != nil { + err = core.SDKErrorf(err, "", "listener-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "uri", &obj.URI) if err != nil { + err = core.SDKErrorf(err, "", "uri-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -97846,6 +106939,9 @@ func (*VpcV1) NewLoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPo URL: core.StringPtr(url), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -97858,10 +106954,12 @@ func UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolic obj := new(LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype) err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode) if err != nil { + err = core.SDKErrorf(err, "", "http_status_code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "url", &obj.URL) if err != nil { + err = core.SDKErrorf(err, "", "url-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -97899,10 +106997,12 @@ func UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity( obj := new(LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -97930,14 +107030,17 @@ func UnmarshalLoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRed obj := new(LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect) err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode) if err != nil { + err = core.SDKErrorf(err, "", "http_status_code-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "listener", &obj.Listener, UnmarshalLoadBalancerListenerReference) if err != nil { + err = core.SDKErrorf(err, "", "listener-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "uri", &obj.URI) if err != nil { + err = core.SDKErrorf(err, "", "uri-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -97963,10 +107066,12 @@ func UnmarshalLoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirect obj := new(LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL) err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode) if err != nil { + err = core.SDKErrorf(err, "", "http_status_code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "url", &obj.URL) if err != nil { + err = core.SDKErrorf(err, "", "url-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -97999,18 +107104,22 @@ func UnmarshalLoadBalancerListenerPolicyTargetLoadBalancerPoolReference(m map[st obj := new(LoadBalancerListenerPolicyTargetLoadBalancerPoolReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalLoadBalancerPoolReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -98030,6 +107139,9 @@ func (*VpcV1) NewLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref(href str Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -98042,6 +107154,7 @@ func UnmarshalLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref(m map[strin obj := new(LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -98061,6 +107174,9 @@ func (*VpcV1) NewLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID(id string) ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -98073,6 +107189,7 @@ func UnmarshalLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID(m map[string] obj := new(LoadBalancerPoolIdentityLoadBalancerPoolIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -98095,6 +107212,9 @@ func (*VpcV1) NewLoadBalancerPoolMemberTargetPrototypeIP(address string) (_model Address: core.StringPtr(address), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -98107,6 +107227,7 @@ func UnmarshalLoadBalancerPoolMemberTargetPrototypeIP(m map[string]json.RawMessa obj := new(LoadBalancerPoolMemberTargetPrototypeIP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -98148,14 +107269,17 @@ func UnmarshalLoadBalancerPoolMemberTargetPrototypeInstanceIdentity(m map[string obj := new(LoadBalancerPoolMemberTargetPrototypeInstanceIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -98181,6 +107305,7 @@ func UnmarshalLoadBalancerPoolMemberTargetIP(m map[string]json.RawMessage, resul obj := new(LoadBalancerPoolMemberTargetIP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -98216,22 +107341,27 @@ func UnmarshalLoadBalancerPoolMemberTargetInstanceReference(m map[string]json.Ra obj := new(LoadBalancerPoolMemberTargetInstanceReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -98251,6 +107381,9 @@ func (*VpcV1) NewLoadBalancerProfileIdentityByHref(href string) (_model *LoadBal Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -98263,6 +107396,7 @@ func UnmarshalLoadBalancerProfileIdentityByHref(m map[string]json.RawMessage, re obj := new(LoadBalancerProfileIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -98282,6 +107416,9 @@ func (*VpcV1) NewLoadBalancerProfileIdentityByName(name string) (_model *LoadBal Name: core.StringPtr(name), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -98294,6 +107431,7 @@ func UnmarshalLoadBalancerProfileIdentityByName(m map[string]json.RawMessage, re obj := new(LoadBalancerProfileIdentityByName) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -98322,6 +107460,7 @@ func UnmarshalLoadBalancerProfileInstanceGroupsSupportedDependent(m map[string]j obj := new(LoadBalancerProfileInstanceGroupsSupportedDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -98353,10 +107492,12 @@ func UnmarshalLoadBalancerProfileInstanceGroupsSupportedFixed(m map[string]json. obj := new(LoadBalancerProfileInstanceGroupsSupportedFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -98385,6 +107526,7 @@ func UnmarshalLoadBalancerProfileRouteModeSupportedDependent(m map[string]json.R obj := new(LoadBalancerProfileRouteModeSupportedDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -98416,10 +107558,12 @@ func UnmarshalLoadBalancerProfileRouteModeSupportedFixed(m map[string]json.RawMe obj := new(LoadBalancerProfileRouteModeSupportedFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -98448,6 +107592,7 @@ func UnmarshalLoadBalancerProfileSecurityGroupsSupportedDependent(m map[string]j obj := new(LoadBalancerProfileSecurityGroupsSupportedDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -98479,10 +107624,12 @@ func UnmarshalLoadBalancerProfileSecurityGroupsSupportedFixed(m map[string]json. obj := new(LoadBalancerProfileSecurityGroupsSupportedFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -98511,6 +107658,7 @@ func UnmarshalLoadBalancerProfileUDPSupportedDependent(m map[string]json.RawMess obj := new(LoadBalancerProfileUDPSupportedDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -98542,10 +107690,12 @@ func UnmarshalLoadBalancerProfileUDPSupportedFixed(m map[string]json.RawMessage, obj := new(LoadBalancerProfileUDPSupportedFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -98565,6 +107715,9 @@ func (*VpcV1) NewNetworkACLIdentityByCRN(crn string) (_model *NetworkACLIdentity CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -98577,6 +107730,7 @@ func UnmarshalNetworkACLIdentityByCRN(m map[string]json.RawMessage, result inter obj := new(NetworkACLIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -98596,6 +107750,9 @@ func (*VpcV1) NewNetworkACLIdentityByHref(href string) (_model *NetworkACLIdenti Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -98608,6 +107765,7 @@ func UnmarshalNetworkACLIdentityByHref(m map[string]json.RawMessage, result inte obj := new(NetworkACLIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -98627,6 +107785,9 @@ func (*VpcV1) NewNetworkACLIdentityByID(id string) (_model *NetworkACLIdentityBy ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -98639,6 +107800,7 @@ func UnmarshalNetworkACLIdentityByID(m map[string]json.RawMessage, result interf obj := new(NetworkACLIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -98668,6 +107830,9 @@ func (*VpcV1) NewNetworkACLPrototypeNetworkACLByRules(vpc VPCIdentityIntf) (_mod VPC: vpc, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -98680,18 +107845,22 @@ func UnmarshalNetworkACLPrototypeNetworkACLByRules(m map[string]json.RawMessage, obj := new(NetworkACLPrototypeNetworkACLByRules) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "rules", &obj.Rules, UnmarshalNetworkACLRulePrototypeNetworkACLContext) if err != nil { + err = core.SDKErrorf(err, "", "rules-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -98721,6 +107890,9 @@ func (*VpcV1) NewNetworkACLPrototypeNetworkACLBySourceNetworkACL(vpc VPCIdentity SourceNetworkACL: sourceNetworkACL, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -98733,18 +107905,22 @@ func UnmarshalNetworkACLPrototypeNetworkACLBySourceNetworkACL(m map[string]json. obj := new(NetworkACLPrototypeNetworkACLBySourceNetworkACL) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "source_network_acl", &obj.SourceNetworkACL, UnmarshalNetworkACLIdentity) if err != nil { + err = core.SDKErrorf(err, "", "source_network_acl-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -98764,6 +107940,9 @@ func (*VpcV1) NewNetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref(href stri Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -98776,6 +107955,7 @@ func UnmarshalNetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref(m map[string obj := new(NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -98795,6 +107975,9 @@ func (*VpcV1) NewNetworkACLRuleBeforePatchNetworkACLRuleIdentityByID(id string) ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -98807,6 +107990,7 @@ func UnmarshalNetworkACLRuleBeforePatchNetworkACLRuleIdentityByID(m map[string]j obj := new(NetworkACLRuleBeforePatchNetworkACLRuleIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -98826,6 +108010,9 @@ func (*VpcV1) NewNetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref(href Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -98838,6 +108025,7 @@ func UnmarshalNetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref(m map[st obj := new(NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -98857,6 +108045,9 @@ func (*VpcV1) NewNetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID(id stri ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -98869,6 +108060,7 @@ func UnmarshalNetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID(m map[stri obj := new(NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -98948,46 +108140,57 @@ func UnmarshalNetworkACLRuleItemNetworkACLRuleProtocolAll(m map[string]json.RawM obj := new(NetworkACLRuleItemNetworkACLRuleProtocolAll) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { + err = core.SDKErrorf(err, "", "action-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleReference) if err != nil { + err = core.SDKErrorf(err, "", "before-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) if err != nil { + err = core.SDKErrorf(err, "", "destination-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { + err = core.SDKErrorf(err, "", "direction-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { + err = core.SDKErrorf(err, "", "ip_version-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "source", &obj.Source) if err != nil { + err = core.SDKErrorf(err, "", "source-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { + err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -99077,54 +108280,67 @@ func UnmarshalNetworkACLRuleItemNetworkACLRuleProtocolIcmp(m map[string]json.Raw obj := new(NetworkACLRuleItemNetworkACLRuleProtocolIcmp) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { + err = core.SDKErrorf(err, "", "action-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleReference) if err != nil { + err = core.SDKErrorf(err, "", "before-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) if err != nil { + err = core.SDKErrorf(err, "", "destination-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { + err = core.SDKErrorf(err, "", "direction-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { + err = core.SDKErrorf(err, "", "ip_version-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "source", &obj.Source) if err != nil { + err = core.SDKErrorf(err, "", "source-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { + err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -99217,62 +108433,77 @@ func UnmarshalNetworkACLRuleItemNetworkACLRuleProtocolTcpudp(m map[string]json.R obj := new(NetworkACLRuleItemNetworkACLRuleProtocolTcpudp) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { + err = core.SDKErrorf(err, "", "action-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleReference) if err != nil { + err = core.SDKErrorf(err, "", "before-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) if err != nil { + err = core.SDKErrorf(err, "", "destination-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { + err = core.SDKErrorf(err, "", "direction-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { + err = core.SDKErrorf(err, "", "ip_version-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "source", &obj.Source) if err != nil { + err = core.SDKErrorf(err, "", "source-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "destination_port_max", &obj.DestinationPortMax) if err != nil { + err = core.SDKErrorf(err, "", "destination_port_max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "destination_port_min", &obj.DestinationPortMin) if err != nil { + err = core.SDKErrorf(err, "", "destination_port_min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { + err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "source_port_max", &obj.SourcePortMax) if err != nil { + err = core.SDKErrorf(err, "", "source_port_max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "source_port_min", &obj.SourcePortMin) if err != nil { + err = core.SDKErrorf(err, "", "source_port_min-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -99341,6 +108572,9 @@ func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolA Protocol: core.StringPtr(protocol), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -99353,30 +108587,37 @@ func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllP obj := new(NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { + err = core.SDKErrorf(err, "", "action-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) if err != nil { + err = core.SDKErrorf(err, "", "destination-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { + err = core.SDKErrorf(err, "", "direction-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { + err = core.SDKErrorf(err, "", "ip_version-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "source", &obj.Source) if err != nil { + err = core.SDKErrorf(err, "", "source-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { + err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -99455,6 +108696,9 @@ func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolI Protocol: core.StringPtr(protocol), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -99467,38 +108711,47 @@ func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp obj := new(NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpPrototype) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { + err = core.SDKErrorf(err, "", "action-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) if err != nil { + err = core.SDKErrorf(err, "", "destination-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { + err = core.SDKErrorf(err, "", "direction-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { + err = core.SDKErrorf(err, "", "ip_version-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "source", &obj.Source) if err != nil { + err = core.SDKErrorf(err, "", "source-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { + err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -99580,6 +108833,9 @@ func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolT Protocol: core.StringPtr(protocol), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -99592,46 +108848,57 @@ func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpu obj := new(NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototype) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { + err = core.SDKErrorf(err, "", "action-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) if err != nil { + err = core.SDKErrorf(err, "", "destination-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { + err = core.SDKErrorf(err, "", "direction-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { + err = core.SDKErrorf(err, "", "ip_version-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "source", &obj.Source) if err != nil { + err = core.SDKErrorf(err, "", "source-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "destination_port_max", &obj.DestinationPortMax) if err != nil { + err = core.SDKErrorf(err, "", "destination_port_max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "destination_port_min", &obj.DestinationPortMin) if err != nil { + err = core.SDKErrorf(err, "", "destination_port_min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { + err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "source_port_max", &obj.SourcePortMax) if err != nil { + err = core.SDKErrorf(err, "", "source_port_max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "source_port_min", &obj.SourcePortMin) if err != nil { + err = core.SDKErrorf(err, "", "source_port_min-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -99702,6 +108969,9 @@ func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype(actio Protocol: core.StringPtr(protocol), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -99714,34 +108984,42 @@ func UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype(m map[st obj := new(NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { + err = core.SDKErrorf(err, "", "action-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleBeforePrototype) if err != nil { + err = core.SDKErrorf(err, "", "before-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) if err != nil { + err = core.SDKErrorf(err, "", "destination-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { + err = core.SDKErrorf(err, "", "direction-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { + err = core.SDKErrorf(err, "", "ip_version-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "source", &obj.Source) if err != nil { + err = core.SDKErrorf(err, "", "source-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { + err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -99822,6 +109100,9 @@ func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototype(acti Protocol: core.StringPtr(protocol), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -99834,42 +109115,52 @@ func UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototype(m map[s obj := new(NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototype) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { + err = core.SDKErrorf(err, "", "action-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleBeforePrototype) if err != nil { + err = core.SDKErrorf(err, "", "before-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) if err != nil { + err = core.SDKErrorf(err, "", "destination-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { + err = core.SDKErrorf(err, "", "direction-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { + err = core.SDKErrorf(err, "", "ip_version-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "source", &obj.Source) if err != nil { + err = core.SDKErrorf(err, "", "source-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { + err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -99953,6 +109244,9 @@ func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototype(ac Protocol: core.StringPtr(protocol), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -99965,50 +109259,62 @@ func UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototype(m map obj := new(NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototype) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { + err = core.SDKErrorf(err, "", "action-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleBeforePrototype) if err != nil { + err = core.SDKErrorf(err, "", "before-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) if err != nil { + err = core.SDKErrorf(err, "", "destination-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { + err = core.SDKErrorf(err, "", "direction-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { + err = core.SDKErrorf(err, "", "ip_version-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "source", &obj.Source) if err != nil { + err = core.SDKErrorf(err, "", "source-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "destination_port_max", &obj.DestinationPortMax) if err != nil { + err = core.SDKErrorf(err, "", "destination_port_max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "destination_port_min", &obj.DestinationPortMin) if err != nil { + err = core.SDKErrorf(err, "", "destination_port_min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { + err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "source_port_max", &obj.SourcePortMax) if err != nil { + err = core.SDKErrorf(err, "", "source_port_max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "source_port_min", &obj.SourcePortMin) if err != nil { + err = core.SDKErrorf(err, "", "source_port_min-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -100087,46 +109393,57 @@ func UnmarshalNetworkACLRuleNetworkACLRuleProtocolAll(m map[string]json.RawMessa obj := new(NetworkACLRuleNetworkACLRuleProtocolAll) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { + err = core.SDKErrorf(err, "", "action-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleReference) if err != nil { + err = core.SDKErrorf(err, "", "before-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) if err != nil { + err = core.SDKErrorf(err, "", "destination-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { + err = core.SDKErrorf(err, "", "direction-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { + err = core.SDKErrorf(err, "", "ip_version-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "source", &obj.Source) if err != nil { + err = core.SDKErrorf(err, "", "source-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { + err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -100215,54 +109532,67 @@ func UnmarshalNetworkACLRuleNetworkACLRuleProtocolIcmp(m map[string]json.RawMess obj := new(NetworkACLRuleNetworkACLRuleProtocolIcmp) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { + err = core.SDKErrorf(err, "", "action-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleReference) if err != nil { + err = core.SDKErrorf(err, "", "before-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) if err != nil { + err = core.SDKErrorf(err, "", "destination-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { + err = core.SDKErrorf(err, "", "direction-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { + err = core.SDKErrorf(err, "", "ip_version-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "source", &obj.Source) if err != nil { + err = core.SDKErrorf(err, "", "source-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { + err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -100354,62 +109684,77 @@ func UnmarshalNetworkACLRuleNetworkACLRuleProtocolTcpudp(m map[string]json.RawMe obj := new(NetworkACLRuleNetworkACLRuleProtocolTcpudp) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { + err = core.SDKErrorf(err, "", "action-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleReference) if err != nil { + err = core.SDKErrorf(err, "", "before-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) if err != nil { + err = core.SDKErrorf(err, "", "destination-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { + err = core.SDKErrorf(err, "", "direction-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { + err = core.SDKErrorf(err, "", "ip_version-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "source", &obj.Source) if err != nil { + err = core.SDKErrorf(err, "", "source-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "destination_port_max", &obj.DestinationPortMax) if err != nil { + err = core.SDKErrorf(err, "", "destination_port_max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "destination_port_min", &obj.DestinationPortMin) if err != nil { + err = core.SDKErrorf(err, "", "destination_port_min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { + err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "source_port_max", &obj.SourcePortMax) if err != nil { + err = core.SDKErrorf(err, "", "source_port_max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "source_port_min", &obj.SourcePortMin) if err != nil { + err = core.SDKErrorf(err, "", "source_port_min-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -100447,10 +109792,12 @@ func UnmarshalNetworkInterfaceIPPrototypeReservedIPIdentity(m map[string]json.Ra obj := new(NetworkInterfaceIPPrototypeReservedIPIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -100484,14 +109831,17 @@ func UnmarshalNetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceCont obj := new(NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { + err = core.SDKErrorf(err, "", "auto_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -100511,6 +109861,9 @@ func (*VpcV1) NewOperatingSystemIdentityByHref(href string) (_model *OperatingSy Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -100523,6 +109876,7 @@ func UnmarshalOperatingSystemIdentityByHref(m map[string]json.RawMessage, result obj := new(OperatingSystemIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -100542,6 +109896,9 @@ func (*VpcV1) NewOperatingSystemIdentityByName(name string) (_model *OperatingSy Name: core.StringPtr(name), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -100554,6 +109911,7 @@ func UnmarshalOperatingSystemIdentityByName(m map[string]json.RawMessage, result obj := new(OperatingSystemIdentityByName) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -100599,18 +109957,22 @@ func UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentity(m map[string]js obj := new(PublicGatewayFloatingIPPrototypeFloatingIPIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -100638,10 +110000,12 @@ func UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext(m obj := new(PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -100661,6 +110025,9 @@ func (*VpcV1) NewPublicGatewayIdentityPublicGatewayIdentityByCRN(crn string) (_m CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -100673,6 +110040,7 @@ func UnmarshalPublicGatewayIdentityPublicGatewayIdentityByCRN(m map[string]json. obj := new(PublicGatewayIdentityPublicGatewayIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -100692,6 +110060,9 @@ func (*VpcV1) NewPublicGatewayIdentityPublicGatewayIdentityByHref(href string) ( Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -100704,6 +110075,7 @@ func UnmarshalPublicGatewayIdentityPublicGatewayIdentityByHref(m map[string]json obj := new(PublicGatewayIdentityPublicGatewayIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -100723,6 +110095,9 @@ func (*VpcV1) NewPublicGatewayIdentityPublicGatewayIdentityByID(id string) (_mod ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -100735,6 +110110,7 @@ func UnmarshalPublicGatewayIdentityPublicGatewayIdentityByID(m map[string]json.R obj := new(PublicGatewayIdentityPublicGatewayIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -100754,6 +110130,9 @@ func (*VpcV1) NewRegionIdentityByHref(href string) (_model *RegionIdentityByHref Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -100766,6 +110145,7 @@ func UnmarshalRegionIdentityByHref(m map[string]json.RawMessage, result interfac obj := new(RegionIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -100785,6 +110165,9 @@ func (*VpcV1) NewRegionIdentityByName(name string) (_model *RegionIdentityByName Name: core.StringPtr(name), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -100797,6 +110180,7 @@ func UnmarshalRegionIdentityByName(m map[string]json.RawMessage, result interfac obj := new(RegionIdentityByName) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -100816,6 +110200,9 @@ func (*VpcV1) NewReservationIdentityByCRN(crn string) (_model *ReservationIdenti CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -100828,6 +110215,7 @@ func UnmarshalReservationIdentityByCRN(m map[string]json.RawMessage, result inte obj := new(ReservationIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -100847,6 +110235,9 @@ func (*VpcV1) NewReservationIdentityByHref(href string) (_model *ReservationIden Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -100859,6 +110250,7 @@ func UnmarshalReservationIdentityByHref(m map[string]json.RawMessage, result int obj := new(ReservationIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -100878,6 +110270,9 @@ func (*VpcV1) NewReservationIdentityByID(id string) (_model *ReservationIdentity ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -100890,6 +110285,7 @@ func UnmarshalReservationIdentityByID(m map[string]json.RawMessage, result inter obj := new(ReservationIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -100931,14 +110327,17 @@ func UnmarshalReservedIPTargetPrototypeEndpointGatewayIdentity(m map[string]json obj := new(ReservedIPTargetPrototypeEndpointGatewayIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -100980,14 +110379,17 @@ func UnmarshalReservedIPTargetPrototypeVirtualNetworkInterfaceIdentity(m map[str obj := new(ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -101038,22 +110440,27 @@ func UnmarshalReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetCont obj := new(ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalBareMetalServerNetworkInterfaceReferenceTargetContextDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -101098,26 +110505,32 @@ func UnmarshalReservedIPTargetEndpointGatewayReference(m map[string]json.RawMess obj := new(ReservedIPTargetEndpointGatewayReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalEndpointGatewayReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -101153,14 +110566,17 @@ func UnmarshalReservedIPTargetGenericResourceReference(m map[string]json.RawMess obj := new(ReservedIPTargetGenericResourceReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalGenericResourceReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -101205,26 +110621,32 @@ func UnmarshalReservedIPTargetLoadBalancerReference(m map[string]json.RawMessage obj := new(ReservedIPTargetLoadBalancerReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalLoadBalancerReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -101275,22 +110697,27 @@ func UnmarshalReservedIPTargetNetworkInterfaceReferenceTargetContext(m map[strin obj := new(ReservedIPTargetNetworkInterfaceReferenceTargetContext) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalNetworkInterfaceReferenceTargetContextDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -101335,26 +110762,32 @@ func UnmarshalReservedIPTargetVPNGatewayReference(m map[string]json.RawMessage, obj := new(ReservedIPTargetVPNGatewayReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVPNGatewayReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -101399,26 +110832,32 @@ func UnmarshalReservedIPTargetVPNServerReference(m map[string]json.RawMessage, r obj := new(ReservedIPTargetVPNServerReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVPNServerReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -101459,22 +110898,27 @@ func UnmarshalReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetCo obj := new(ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -101494,6 +110938,9 @@ func (*VpcV1) NewResourceGroupIdentityByID(id string) (_model *ResourceGroupIden ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -101506,6 +110953,7 @@ func UnmarshalResourceGroupIdentityByID(m map[string]json.RawMessage, result int obj := new(ResourceGroupIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -101550,26 +110998,32 @@ func UnmarshalRouteCreatorVPNGatewayReference(m map[string]json.RawMessage, resu obj := new(RouteCreatorVPNGatewayReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVPNGatewayReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -101614,26 +111068,32 @@ func UnmarshalRouteCreatorVPNServerReference(m map[string]json.RawMessage, resul obj := new(RouteCreatorVPNServerReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVPNServerReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -101659,6 +111119,7 @@ func UnmarshalRouteNextHopIP(m map[string]json.RawMessage, result interface{}) ( obj := new(RouteNextHopIP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -101696,6 +111157,7 @@ func UnmarshalRouteNextHopPatchRouteNextHopIP(m map[string]json.RawMessage, resu obj := new(RouteNextHopPatchRouteNextHopIP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -101733,10 +111195,12 @@ func UnmarshalRouteNextHopPatchVPNGatewayConnectionIdentity(m map[string]json.Ra obj := new(RouteNextHopPatchVPNGatewayConnectionIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -101778,22 +111242,27 @@ func UnmarshalRouteNextHopVPNGatewayConnectionReference(m map[string]json.RawMes obj := new(RouteNextHopVPNGatewayConnectionReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVPNGatewayConnectionReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -101831,6 +111300,7 @@ func UnmarshalRoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP(m map[str obj := new(RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -101868,10 +111338,12 @@ func UnmarshalRoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIden obj := new(RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -101891,6 +111363,9 @@ func (*VpcV1) NewRoutingTableIdentityByHref(href string) (_model *RoutingTableId Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -101903,6 +111378,7 @@ func UnmarshalRoutingTableIdentityByHref(m map[string]json.RawMessage, result in obj := new(RoutingTableIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -101922,6 +111398,9 @@ func (*VpcV1) NewRoutingTableIdentityByID(id string) (_model *RoutingTableIdenti ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -101934,6 +111413,7 @@ func UnmarshalRoutingTableIdentityByID(m map[string]json.RawMessage, result inte obj := new(RoutingTableIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -101953,6 +111433,9 @@ func (*VpcV1) NewSecurityGroupIdentityByCRN(crn string) (_model *SecurityGroupId CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -101965,6 +111448,7 @@ func UnmarshalSecurityGroupIdentityByCRN(m map[string]json.RawMessage, result in obj := new(SecurityGroupIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -101984,6 +111468,9 @@ func (*VpcV1) NewSecurityGroupIdentityByHref(href string) (_model *SecurityGroup Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -101996,6 +111483,7 @@ func UnmarshalSecurityGroupIdentityByHref(m map[string]json.RawMessage, result i obj := new(SecurityGroupIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -102015,6 +111503,9 @@ func (*VpcV1) NewSecurityGroupIdentityByID(id string) (_model *SecurityGroupIden ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -102027,6 +111518,7 @@ func UnmarshalSecurityGroupIdentityByID(m map[string]json.RawMessage, result int obj := new(SecurityGroupIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -102049,6 +111541,9 @@ func (*VpcV1) NewSecurityGroupRuleLocalPatchCIDR(cidrBlock string) (_model *Secu CIDRBlock: core.StringPtr(cidrBlock), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -102061,6 +111556,7 @@ func UnmarshalSecurityGroupRuleLocalPatchCIDR(m map[string]json.RawMessage, resu obj := new(SecurityGroupRuleLocalPatchCIDR) err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) if err != nil { + err = core.SDKErrorf(err, "", "cidr_block-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -102083,6 +111579,9 @@ func (*VpcV1) NewSecurityGroupRuleLocalPatchIP(address string) (_model *Security Address: core.StringPtr(address), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -102095,6 +111594,7 @@ func UnmarshalSecurityGroupRuleLocalPatchIP(m map[string]json.RawMessage, result obj := new(SecurityGroupRuleLocalPatchIP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -102117,6 +111617,9 @@ func (*VpcV1) NewSecurityGroupRuleLocalPrototypeCIDR(cidrBlock string) (_model * CIDRBlock: core.StringPtr(cidrBlock), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -102129,6 +111632,7 @@ func UnmarshalSecurityGroupRuleLocalPrototypeCIDR(m map[string]json.RawMessage, obj := new(SecurityGroupRuleLocalPrototypeCIDR) err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) if err != nil { + err = core.SDKErrorf(err, "", "cidr_block-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -102151,6 +111655,9 @@ func (*VpcV1) NewSecurityGroupRuleLocalPrototypeIP(address string) (_model *Secu Address: core.StringPtr(address), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -102163,6 +111670,7 @@ func UnmarshalSecurityGroupRuleLocalPrototypeIP(m map[string]json.RawMessage, re obj := new(SecurityGroupRuleLocalPrototypeIP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -102188,6 +111696,7 @@ func UnmarshalSecurityGroupRuleLocalCIDR(m map[string]json.RawMessage, result in obj := new(SecurityGroupRuleLocalCIDR) err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) if err != nil { + err = core.SDKErrorf(err, "", "cidr_block-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -102213,6 +111722,7 @@ func UnmarshalSecurityGroupRuleLocalIP(m map[string]json.RawMessage, result inte obj := new(SecurityGroupRuleLocalIP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -102281,6 +111791,9 @@ func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll(directio Protocol: core.StringPtr(protocol), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -102293,22 +111806,27 @@ func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll(m map[strin obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll) err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { + err = core.SDKErrorf(err, "", "direction-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { + err = core.SDKErrorf(err, "", "ip_version-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "local", &obj.Local, UnmarshalSecurityGroupRuleLocalPrototype) if err != nil { + err = core.SDKErrorf(err, "", "local-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { + err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRuleRemotePrototype) if err != nil { + err = core.SDKErrorf(err, "", "remote-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -102387,6 +111905,9 @@ func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp(directi Protocol: core.StringPtr(protocol), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -102399,30 +111920,37 @@ func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp(m map[stri obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { + err = core.SDKErrorf(err, "", "direction-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { + err = core.SDKErrorf(err, "", "ip_version-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "local", &obj.Local, UnmarshalSecurityGroupRuleLocalPrototype) if err != nil { + err = core.SDKErrorf(err, "", "local-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { + err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRuleRemotePrototype) if err != nil { + err = core.SDKErrorf(err, "", "remote-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -102507,6 +112035,9 @@ func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp(direc Protocol: core.StringPtr(protocol), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -102519,30 +112050,37 @@ func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp(m map[st obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp) err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { + err = core.SDKErrorf(err, "", "direction-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { + err = core.SDKErrorf(err, "", "ip_version-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "local", &obj.Local, UnmarshalSecurityGroupRuleLocalPrototype) if err != nil { + err = core.SDKErrorf(err, "", "local-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "port_max", &obj.PortMax) if err != nil { + err = core.SDKErrorf(err, "", "port_max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "port_min", &obj.PortMin) if err != nil { + err = core.SDKErrorf(err, "", "port_min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { + err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRuleRemotePrototype) if err != nil { + err = core.SDKErrorf(err, "", "remote-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -102565,6 +112103,9 @@ func (*VpcV1) NewSecurityGroupRuleRemotePatchCIDR(cidrBlock string) (_model *Sec CIDRBlock: core.StringPtr(cidrBlock), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -102577,6 +112118,7 @@ func UnmarshalSecurityGroupRuleRemotePatchCIDR(m map[string]json.RawMessage, res obj := new(SecurityGroupRuleRemotePatchCIDR) err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) if err != nil { + err = core.SDKErrorf(err, "", "cidr_block-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -102599,6 +112141,9 @@ func (*VpcV1) NewSecurityGroupRuleRemotePatchIP(address string) (_model *Securit Address: core.StringPtr(address), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -102611,6 +112156,7 @@ func UnmarshalSecurityGroupRuleRemotePatchIP(m map[string]json.RawMessage, resul obj := new(SecurityGroupRuleRemotePatchIP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -102652,14 +112198,17 @@ func UnmarshalSecurityGroupRuleRemotePatchSecurityGroupIdentity(m map[string]jso obj := new(SecurityGroupRuleRemotePatchSecurityGroupIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -102682,6 +112231,9 @@ func (*VpcV1) NewSecurityGroupRuleRemotePrototypeCIDR(cidrBlock string) (_model CIDRBlock: core.StringPtr(cidrBlock), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -102694,6 +112246,7 @@ func UnmarshalSecurityGroupRuleRemotePrototypeCIDR(m map[string]json.RawMessage, obj := new(SecurityGroupRuleRemotePrototypeCIDR) err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) if err != nil { + err = core.SDKErrorf(err, "", "cidr_block-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -102716,6 +112269,9 @@ func (*VpcV1) NewSecurityGroupRuleRemotePrototypeIP(address string) (_model *Sec Address: core.StringPtr(address), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -102728,6 +112284,7 @@ func UnmarshalSecurityGroupRuleRemotePrototypeIP(m map[string]json.RawMessage, r obj := new(SecurityGroupRuleRemotePrototypeIP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -102769,14 +112326,17 @@ func UnmarshalSecurityGroupRuleRemotePrototypeSecurityGroupIdentity(m map[string obj := new(SecurityGroupRuleRemotePrototypeSecurityGroupIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -102802,6 +112362,7 @@ func UnmarshalSecurityGroupRuleRemoteCIDR(m map[string]json.RawMessage, result i obj := new(SecurityGroupRuleRemoteCIDR) err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) if err != nil { + err = core.SDKErrorf(err, "", "cidr_block-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -102827,6 +112388,7 @@ func UnmarshalSecurityGroupRuleRemoteIP(m map[string]json.RawMessage, result int obj := new(SecurityGroupRuleRemoteIP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -102862,22 +112424,27 @@ func UnmarshalSecurityGroupRuleRemoteSecurityGroupReference(m map[string]json.Ra obj := new(SecurityGroupRuleRemoteSecurityGroupReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalSecurityGroupReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -102943,30 +112510,37 @@ func UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolAll(m map[string]json.Ra obj := new(SecurityGroupRuleSecurityGroupRuleProtocolAll) err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { + err = core.SDKErrorf(err, "", "direction-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { + err = core.SDKErrorf(err, "", "ip_version-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "local", &obj.Local, UnmarshalSecurityGroupRuleLocal) if err != nil { + err = core.SDKErrorf(err, "", "local-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRuleRemote) if err != nil { + err = core.SDKErrorf(err, "", "remote-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { + err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -103038,38 +112612,47 @@ func UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolIcmp(m map[string]json.R obj := new(SecurityGroupRuleSecurityGroupRuleProtocolIcmp) err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { + err = core.SDKErrorf(err, "", "direction-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { + err = core.SDKErrorf(err, "", "ip_version-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "local", &obj.Local, UnmarshalSecurityGroupRuleLocal) if err != nil { + err = core.SDKErrorf(err, "", "local-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRuleRemote) if err != nil { + err = core.SDKErrorf(err, "", "remote-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { + err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -103145,38 +112728,47 @@ func UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolTcpudp(m map[string]json obj := new(SecurityGroupRuleSecurityGroupRuleProtocolTcpudp) err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { + err = core.SDKErrorf(err, "", "direction-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { + err = core.SDKErrorf(err, "", "ip_version-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "local", &obj.Local, UnmarshalSecurityGroupRuleLocal) if err != nil { + err = core.SDKErrorf(err, "", "local-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRuleRemote) if err != nil { + err = core.SDKErrorf(err, "", "remote-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "port_max", &obj.PortMax) if err != nil { + err = core.SDKErrorf(err, "", "port_max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "port_min", &obj.PortMin) if err != nil { + err = core.SDKErrorf(err, "", "port_min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { + err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -103227,22 +112819,27 @@ func UnmarshalSecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferen obj := new(SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalBareMetalServerNetworkInterfaceReferenceTargetContextDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -103287,26 +112884,32 @@ func UnmarshalSecurityGroupTargetReferenceEndpointGatewayReference(m map[string] obj := new(SecurityGroupTargetReferenceEndpointGatewayReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalEndpointGatewayReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -103351,26 +112954,32 @@ func UnmarshalSecurityGroupTargetReferenceLoadBalancerReference(m map[string]jso obj := new(SecurityGroupTargetReferenceLoadBalancerReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalLoadBalancerReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -103421,22 +113030,27 @@ func UnmarshalSecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext obj := new(SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalNetworkInterfaceReferenceTargetContextDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -103481,26 +113095,32 @@ func UnmarshalSecurityGroupTargetReferenceVPNServerReference(m map[string]json.R obj := new(SecurityGroupTargetReferenceVPNServerReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVPNServerReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -103551,34 +113171,42 @@ func UnmarshalSecurityGroupTargetReferenceVirtualNetworkInterfaceReference(m map obj := new(SecurityGroupTargetReferenceVirtualNetworkInterfaceReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVirtualNetworkInterfaceReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -103598,6 +113226,9 @@ func (*VpcV1) NewShareIdentityByCRN(crn string) (_model *ShareIdentityByCRN, err CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -103610,6 +113241,7 @@ func UnmarshalShareIdentityByCRN(m map[string]json.RawMessage, result interface{ obj := new(ShareIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -103629,6 +113261,9 @@ func (*VpcV1) NewShareIdentityByHref(href string) (_model *ShareIdentityByHref, Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -103641,6 +113276,7 @@ func UnmarshalShareIdentityByHref(m map[string]json.RawMessage, result interface obj := new(ShareIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -103660,6 +113296,9 @@ func (*VpcV1) NewShareIdentityByID(id string) (_model *ShareIdentityByID, err er ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -103672,6 +113311,7 @@ func UnmarshalShareIdentityByID(m map[string]json.RawMessage, result interface{} obj := new(ShareIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -103720,6 +113360,9 @@ func (*VpcV1) NewShareMountTargetPrototypeShareMountTargetByAccessControlModeSec VirtualNetworkInterface: virtualNetworkInterface, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -103732,14 +113375,17 @@ func UnmarshalShareMountTargetPrototypeShareMountTargetByAccessControlModeSecuri obj := new(ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "transit_encryption", &obj.TransitEncryption) if err != nil { + err = core.SDKErrorf(err, "", "transit_encryption-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "virtual_network_interface", &obj.VirtualNetworkInterface, UnmarshalShareMountTargetVirtualNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "virtual_network_interface-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -103781,6 +113427,9 @@ func (*VpcV1) NewShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC VPC: vpc, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -103793,14 +113442,17 @@ func UnmarshalShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC(m obj := new(ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "transit_encryption", &obj.TransitEncryption) if err != nil { + err = core.SDKErrorf(err, "", "transit_encryption-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -103842,14 +113494,17 @@ func UnmarshalShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInte obj := new(ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -103928,38 +113583,47 @@ func UnmarshalShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInte obj := new(ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext) err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing) if err != nil { + err = core.SDKErrorf(err, "", "allow_ip_spoofing-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { + err = core.SDKErrorf(err, "", "auto_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "enable_infrastructure_nat", &obj.EnableInfrastructureNat) if err != nil { + err = core.SDKErrorf(err, "", "enable_infrastructure_nat-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "ips", &obj.Ips, UnmarshalVirtualNetworkInterfaceIPPrototype) if err != nil { + err = core.SDKErrorf(err, "", "ips-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalVirtualNetworkInterfacePrimaryIPPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "security_groups-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -103998,18 +113662,22 @@ func UnmarshalShareProfileCapacityDependentRange(m map[string]json.RawMessage, r obj := new(ShareProfileCapacityDependentRange) err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -104044,14 +113712,17 @@ func UnmarshalShareProfileCapacityEnum(m map[string]json.RawMessage, result inte obj := new(ShareProfileCapacityEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -104083,10 +113754,12 @@ func UnmarshalShareProfileCapacityFixed(m map[string]json.RawMessage, result int obj := new(ShareProfileCapacityFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -104127,22 +113800,27 @@ func UnmarshalShareProfileCapacityRange(m map[string]json.RawMessage, result int obj := new(ShareProfileCapacityRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -104181,18 +113859,22 @@ func UnmarshalShareProfileIopsDependentRange(m map[string]json.RawMessage, resul obj := new(ShareProfileIopsDependentRange) err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -104227,14 +113909,17 @@ func UnmarshalShareProfileIopsEnum(m map[string]json.RawMessage, result interfac obj := new(ShareProfileIopsEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -104266,10 +113951,12 @@ func UnmarshalShareProfileIopsFixed(m map[string]json.RawMessage, result interfa obj := new(ShareProfileIopsFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -104310,22 +113997,27 @@ func UnmarshalShareProfileIopsRange(m map[string]json.RawMessage, result interfa obj := new(ShareProfileIopsRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -104345,6 +114037,9 @@ func (*VpcV1) NewShareProfileIdentityByHref(href string) (_model *ShareProfileId Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -104357,6 +114052,7 @@ func UnmarshalShareProfileIdentityByHref(m map[string]json.RawMessage, result in obj := new(ShareProfileIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -104376,6 +114072,9 @@ func (*VpcV1) NewShareProfileIdentityByName(name string) (_model *ShareProfileId Name: core.StringPtr(name), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -104388,6 +114087,7 @@ func UnmarshalShareProfileIdentityByName(m map[string]json.RawMessage, result in obj := new(ShareProfileIdentityByName) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -104419,9 +114119,8 @@ type SharePrototypeShareBySize struct { // Tags for this resource. UserTags []string `json:"user_tags,omitempty"` - // The zone this file share will reside in. - // - // For a replica share, this must be a different zone in the same region as the source share. + // The zone this file share will reside in. For a replica share, this must be a different zone in the same region as + // the source share. Zone ZoneIdentityIntf `json:"zone" validate:"required"` // The access control mode for the share: @@ -104475,6 +114174,9 @@ func (*VpcV1) NewSharePrototypeShareBySize(profile ShareProfileIdentityIntf, zon Size: core.Int64Ptr(size), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -104487,50 +114189,62 @@ func UnmarshalSharePrototypeShareBySize(m map[string]json.RawMessage, result int obj := new(SharePrototypeShareBySize) err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { + err = core.SDKErrorf(err, "", "iops-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "mount_targets", &obj.MountTargets, UnmarshalShareMountTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "mount_targets-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalShareProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "replica_share", &obj.ReplicaShare, UnmarshalSharePrototypeShareContext) if err != nil { + err = core.SDKErrorf(err, "", "replica_share-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { + err = core.SDKErrorf(err, "", "user_tags-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "access_control_mode", &obj.AccessControlMode) if err != nil { + err = core.SDKErrorf(err, "", "access_control_mode-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "encryption_key-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "initial_owner", &obj.InitialOwner, UnmarshalShareInitialOwner) if err != nil { + err = core.SDKErrorf(err, "", "initial_owner-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "size", &obj.Size) if err != nil { + err = core.SDKErrorf(err, "", "size-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -104563,9 +114277,8 @@ type SharePrototypeShareBySourceShare struct { // Tags for this resource. UserTags []string `json:"user_tags,omitempty"` - // The zone this file share will reside in. - // - // For a replica share, this must be a different zone in the same region as the source share. + // The zone this file share will reside in. For a replica share, this must be a different zone in the same region as + // the source share. Zone ZoneIdentityIntf `json:"zone" validate:"required"` // The root key to use to wrap the data encryption key for the share. @@ -104600,6 +114313,9 @@ func (*VpcV1) NewSharePrototypeShareBySourceShare(profile ShareProfileIdentityIn SourceShare: sourceShare, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -104612,46 +114328,57 @@ func UnmarshalSharePrototypeShareBySourceShare(m map[string]json.RawMessage, res obj := new(SharePrototypeShareBySourceShare) err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { + err = core.SDKErrorf(err, "", "iops-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "mount_targets", &obj.MountTargets, UnmarshalShareMountTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "mount_targets-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalShareProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "replica_share", &obj.ReplicaShare, UnmarshalSharePrototypeShareContext) if err != nil { + err = core.SDKErrorf(err, "", "replica_share-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { + err = core.SDKErrorf(err, "", "user_tags-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "encryption_key-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "replication_cron_spec", &obj.ReplicationCronSpec) if err != nil { + err = core.SDKErrorf(err, "", "replication_cron_spec-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "source_share", &obj.SourceShare, UnmarshalShareIdentity) if err != nil { + err = core.SDKErrorf(err, "", "source_share-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -104683,6 +114410,9 @@ func (*VpcV1) NewSnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnap Snapshots: snapshots, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -104695,18 +114425,22 @@ func UnmarshalSnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapsho obj := new(SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots) err = core.UnmarshalPrimitive(m, "delete_snapshots_on_delete", &obj.DeleteSnapshotsOnDelete) if err != nil { + err = core.SDKErrorf(err, "", "delete_snapshots_on_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "snapshots", &obj.Snapshots, UnmarshalSnapshotPrototypeSnapshotConsistencyGroupContext) if err != nil { + err = core.SDKErrorf(err, "", "snapshots-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -104726,6 +114460,9 @@ func (*VpcV1) NewSnapshotIdentityByCRN(crn string) (_model *SnapshotIdentityByCR CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -104738,6 +114475,7 @@ func UnmarshalSnapshotIdentityByCRN(m map[string]json.RawMessage, result interfa obj := new(SnapshotIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -104757,6 +114495,9 @@ func (*VpcV1) NewSnapshotIdentityByHref(href string) (_model *SnapshotIdentityBy Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -104769,6 +114510,7 @@ func UnmarshalSnapshotIdentityByHref(m map[string]json.RawMessage, result interf obj := new(SnapshotIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -104788,6 +114530,9 @@ func (*VpcV1) NewSnapshotIdentityByID(id string) (_model *SnapshotIdentityByID, ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -104800,6 +114545,7 @@ func UnmarshalSnapshotIdentityByID(m map[string]json.RawMessage, result interfac obj := new(SnapshotIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -104843,6 +114589,9 @@ func (*VpcV1) NewSnapshotPrototypeSnapshotBySourceSnapshot(sourceSnapshot *Snaps SourceSnapshot: sourceSnapshot, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -104855,26 +114604,32 @@ func UnmarshalSnapshotPrototypeSnapshotBySourceSnapshot(m map[string]json.RawMes obj := new(SnapshotPrototypeSnapshotBySourceSnapshot) err = core.UnmarshalModel(m, "clones", &obj.Clones, UnmarshalSnapshotClonePrototype) if err != nil { + err = core.SDKErrorf(err, "", "clones-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { + err = core.SDKErrorf(err, "", "user_tags-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "encryption_key-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "source_snapshot", &obj.SourceSnapshot, UnmarshalSnapshotIdentityByCRN) if err != nil { + err = core.SDKErrorf(err, "", "source_snapshot-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -104906,6 +114661,9 @@ func (*VpcV1) NewSnapshotPrototypeSnapshotBySourceVolume(sourceVolume VolumeIden SourceVolume: sourceVolume, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -104918,22 +114676,27 @@ func UnmarshalSnapshotPrototypeSnapshotBySourceVolume(m map[string]json.RawMessa obj := new(SnapshotPrototypeSnapshotBySourceVolume) err = core.UnmarshalModel(m, "clones", &obj.Clones, UnmarshalSnapshotClonePrototype) if err != nil { + err = core.SDKErrorf(err, "", "clones-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { + err = core.SDKErrorf(err, "", "user_tags-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "source_volume", &obj.SourceVolume, UnmarshalVolumeIdentity) if err != nil { + err = core.SDKErrorf(err, "", "source_volume-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -104953,6 +114716,9 @@ func (*VpcV1) NewSubnetIdentityByCRN(crn string) (_model *SubnetIdentityByCRN, e CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -104965,6 +114731,7 @@ func UnmarshalSubnetIdentityByCRN(m map[string]json.RawMessage, result interface obj := new(SubnetIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -104984,6 +114751,9 @@ func (*VpcV1) NewSubnetIdentityByHref(href string) (_model *SubnetIdentityByHref Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -104996,6 +114766,7 @@ func UnmarshalSubnetIdentityByHref(m map[string]json.RawMessage, result interfac obj := new(SubnetIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -105015,6 +114786,9 @@ func (*VpcV1) NewSubnetIdentityByID(id string) (_model *SubnetIdentityByID, err ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -105027,6 +114801,7 @@ func UnmarshalSubnetIdentityByID(m map[string]json.RawMessage, result interface{ obj := new(SubnetIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -105085,6 +114860,9 @@ func (*VpcV1) NewSubnetPrototypeSubnetByCIDR(vpc VPCIdentityIntf, ipv4CIDRBlock Ipv4CIDRBlock: core.StringPtr(ipv4CIDRBlock), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -105097,38 +114875,47 @@ func UnmarshalSubnetPrototypeSubnetByCIDR(m map[string]json.RawMessage, result i obj := new(SubnetPrototypeSubnetByCIDR) err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { + err = core.SDKErrorf(err, "", "ip_version-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_acl", &obj.NetworkACL, UnmarshalNetworkACLIdentity) if err != nil { + err = core.SDKErrorf(err, "", "network_acl-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "public_gateway", &obj.PublicGateway, UnmarshalPublicGatewayIdentity) if err != nil { + err = core.SDKErrorf(err, "", "public_gateway-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "routing_table", &obj.RoutingTable, UnmarshalRoutingTableIdentity) if err != nil { + err = core.SDKErrorf(err, "", "routing_table-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "ipv4_cidr_block", &obj.Ipv4CIDRBlock) if err != nil { + err = core.SDKErrorf(err, "", "ipv4_cidr_block-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -105185,6 +114972,9 @@ func (*VpcV1) NewSubnetPrototypeSubnetByTotalCount(vpc VPCIdentityIntf, totalIpv Zone: zone, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -105197,38 +114987,47 @@ func UnmarshalSubnetPrototypeSubnetByTotalCount(m map[string]json.RawMessage, re obj := new(SubnetPrototypeSubnetByTotalCount) err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { + err = core.SDKErrorf(err, "", "ip_version-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_acl", &obj.NetworkACL, UnmarshalNetworkACLIdentity) if err != nil { + err = core.SDKErrorf(err, "", "network_acl-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "public_gateway", &obj.PublicGateway, UnmarshalPublicGatewayIdentity) if err != nil { + err = core.SDKErrorf(err, "", "public_gateway-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "routing_table", &obj.RoutingTable, UnmarshalRoutingTableIdentity) if err != nil { + err = core.SDKErrorf(err, "", "routing_table-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_ipv4_address_count", &obj.TotalIpv4AddressCount) if err != nil { + err = core.SDKErrorf(err, "", "total_ipv4_address_count-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -105248,6 +115047,9 @@ func (*VpcV1) NewSubnetPublicGatewayPatchPublicGatewayIdentityByCRN(crn string) CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -105260,6 +115062,7 @@ func UnmarshalSubnetPublicGatewayPatchPublicGatewayIdentityByCRN(m map[string]js obj := new(SubnetPublicGatewayPatchPublicGatewayIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -105279,6 +115082,9 @@ func (*VpcV1) NewSubnetPublicGatewayPatchPublicGatewayIdentityByHref(href string Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -105291,6 +115097,7 @@ func UnmarshalSubnetPublicGatewayPatchPublicGatewayIdentityByHref(m map[string]j obj := new(SubnetPublicGatewayPatchPublicGatewayIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -105310,6 +115117,9 @@ func (*VpcV1) NewSubnetPublicGatewayPatchPublicGatewayIdentityByID(id string) (_ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -105322,6 +115132,7 @@ func UnmarshalSubnetPublicGatewayPatchPublicGatewayIdentityByID(m map[string]jso obj := new(SubnetPublicGatewayPatchPublicGatewayIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -105341,6 +115152,9 @@ func (*VpcV1) NewTrustedProfileIdentityTrustedProfileByCRN(crn string) (_model * CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -105353,6 +115167,7 @@ func UnmarshalTrustedProfileIdentityTrustedProfileByCRN(m map[string]json.RawMes obj := new(TrustedProfileIdentityTrustedProfileByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -105372,6 +115187,9 @@ func (*VpcV1) NewTrustedProfileIdentityTrustedProfileByID(id string) (_model *Tr ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -105384,6 +115202,7 @@ func UnmarshalTrustedProfileIdentityTrustedProfileByID(m map[string]json.RawMess obj := new(TrustedProfileIdentityTrustedProfileByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -105424,6 +115243,9 @@ func (*VpcV1) NewVpcdnsResolverPrototypeVpcdnsResolverTypeManualPrototype(manual Type: core.StringPtr(typeVar), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -105436,10 +115258,12 @@ func UnmarshalVpcdnsResolverPrototypeVpcdnsResolverTypeManualPrototype(m map[str obj := new(VpcdnsResolverPrototypeVpcdnsResolverTypeManualPrototype) err = core.UnmarshalModel(m, "manual_servers", &obj.ManualServers, UnmarshalDnsServerPrototype) if err != nil { + err = core.SDKErrorf(err, "", "manual_servers-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -105470,6 +115294,7 @@ func UnmarshalVpcdnsResolverPrototypeVpcdnsResolverTypeSystemPrototype(m map[str obj := new(VpcdnsResolverPrototypeVpcdnsResolverTypeSystemPrototype) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -105510,14 +115335,17 @@ func UnmarshalVpcdnsResolverTypeDelegated(m map[string]json.RawMessage, result i obj := new(VpcdnsResolverTypeDelegated) err = core.UnmarshalModel(m, "servers", &obj.Servers, UnmarshalDnsServer) if err != nil { + err = core.SDKErrorf(err, "", "servers-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReferenceDnsResolverContext) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -105564,14 +115392,17 @@ func UnmarshalVpcdnsResolverTypeManual(m map[string]json.RawMessage, result inte obj := new(VpcdnsResolverTypeManual) err = core.UnmarshalModel(m, "servers", &obj.Servers, UnmarshalDnsServer) if err != nil { + err = core.SDKErrorf(err, "", "servers-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "manual_servers", &obj.ManualServers, UnmarshalDnsServer) if err != nil { + err = core.SDKErrorf(err, "", "manual_servers-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -105651,14 +115482,17 @@ func UnmarshalVpcdnsResolverTypeSystem(m map[string]json.RawMessage, result inte obj := new(VpcdnsResolverTypeSystem) err = core.UnmarshalModel(m, "servers", &obj.Servers, UnmarshalDnsServer) if err != nil { + err = core.SDKErrorf(err, "", "servers-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "configuration", &obj.Configuration) if err != nil { + err = core.SDKErrorf(err, "", "configuration-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -105678,6 +115512,9 @@ func (*VpcV1) NewVpcdnsResolverVPCPatchVPCIdentityByCRN(crn string) (_model *Vpc CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -105690,6 +115527,7 @@ func UnmarshalVpcdnsResolverVPCPatchVPCIdentityByCRN(m map[string]json.RawMessag obj := new(VpcdnsResolverVPCPatchVPCIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -105709,6 +115547,9 @@ func (*VpcV1) NewVpcdnsResolverVPCPatchVPCIdentityByHref(href string) (_model *V Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -105721,6 +115562,7 @@ func UnmarshalVpcdnsResolverVPCPatchVPCIdentityByHref(m map[string]json.RawMessa obj := new(VpcdnsResolverVPCPatchVPCIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -105740,6 +115582,9 @@ func (*VpcV1) NewVpcdnsResolverVPCPatchVPCIdentityByID(id string) (_model *Vpcdn ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -105752,6 +115597,7 @@ func UnmarshalVpcdnsResolverVPCPatchVPCIdentityByID(m map[string]json.RawMessage obj := new(VpcdnsResolverVPCPatchVPCIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -105771,6 +115617,9 @@ func (*VpcV1) NewVPCIdentityByCRN(crn string) (_model *VPCIdentityByCRN, err err CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -105783,6 +115632,7 @@ func UnmarshalVPCIdentityByCRN(m map[string]json.RawMessage, result interface{}) obj := new(VPCIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -105802,6 +115652,9 @@ func (*VpcV1) NewVPCIdentityByHref(href string) (_model *VPCIdentityByHref, err Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -105814,6 +115667,7 @@ func UnmarshalVPCIdentityByHref(m map[string]json.RawMessage, result interface{} obj := new(VPCIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -105833,6 +115687,9 @@ func (*VpcV1) NewVPCIdentityByID(id string) (_model *VPCIdentityByID, err error) ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -105845,6 +115702,403 @@ func UnmarshalVPCIdentityByID(m map[string]json.RawMessage, result interface{}) obj := new(VPCIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn : VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn struct +// This model "extends" VPNGatewayConnectionIkeIdentityPrototype +type VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn struct { + // The IKE identity type. + Type *string `json:"type" validate:"required"` + + // The IKE identity FQDN value. + Value *string `json:"value" validate:"required"` +} + +// Constants associated with the VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn.Type property. +// The IKE identity type. +const ( + VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdnTypeFqdnConst = "fqdn" + VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdnTypeHostnameConst = "hostname" + VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdnTypeIpv4AddressConst = "ipv4_address" + VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdnTypeKeyIDConst = "key_id" +) + +// NewVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn : Instantiate VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn (Generic Model Constructor) +func (*VpcV1) NewVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn(typeVar string, value string) (_model *VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn, err error) { + _model = &VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn{ + Type: core.StringPtr(typeVar), + Value: core.StringPtr(value), + } + err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } + return +} + +func (*VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn) isaVPNGatewayConnectionIkeIdentityPrototype() bool { + return true +} + +// UnmarshalVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn unmarshals an instance of VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn) + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "value", &obj.Value) + if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityHostname : VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityHostname struct +// This model "extends" VPNGatewayConnectionIkeIdentityPrototype +type VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityHostname struct { + // The IKE identity type. + Type *string `json:"type" validate:"required"` + + // The IKE identity hostname value. + Value *string `json:"value" validate:"required"` +} + +// Constants associated with the VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityHostname.Type property. +// The IKE identity type. +const ( + VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityHostnameTypeFqdnConst = "fqdn" + VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityHostnameTypeHostnameConst = "hostname" + VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityHostnameTypeIpv4AddressConst = "ipv4_address" + VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityHostnameTypeKeyIDConst = "key_id" +) + +// NewVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityHostname : Instantiate VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityHostname (Generic Model Constructor) +func (*VpcV1) NewVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityHostname(typeVar string, value string) (_model *VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityHostname, err error) { + _model = &VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityHostname{ + Type: core.StringPtr(typeVar), + Value: core.StringPtr(value), + } + err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } + return +} + +func (*VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityHostname) isaVPNGatewayConnectionIkeIdentityPrototype() bool { + return true +} + +// UnmarshalVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityHostname unmarshals an instance of VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityHostname from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityHostname(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityHostname) + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "value", &obj.Value) + if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityIPv4 : VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityIPv4 struct +// This model "extends" VPNGatewayConnectionIkeIdentityPrototype +type VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityIPv4 struct { + // The IKE identity type. + Type *string `json:"type" validate:"required"` + + // The IKE identity IPv4 address value. + Value *string `json:"value" validate:"required"` +} + +// Constants associated with the VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityIPv4.Type property. +// The IKE identity type. +const ( + VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityIPv4TypeFqdnConst = "fqdn" + VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityIPv4TypeHostnameConst = "hostname" + VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityIPv4TypeIpv4AddressConst = "ipv4_address" + VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityIPv4TypeKeyIDConst = "key_id" +) + +// NewVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityIPv4 : Instantiate VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityIPv4 (Generic Model Constructor) +func (*VpcV1) NewVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityIPv4(typeVar string, value string) (_model *VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityIPv4, err error) { + _model = &VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityIPv4{ + Type: core.StringPtr(typeVar), + Value: core.StringPtr(value), + } + err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } + return +} + +func (*VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityIPv4) isaVPNGatewayConnectionIkeIdentityPrototype() bool { + return true +} + +// UnmarshalVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityIPv4 unmarshals an instance of VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityIPv4 from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityIPv4(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityIPv4) + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "value", &obj.Value) + if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityKeyID : VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityKeyID struct +// This model "extends" VPNGatewayConnectionIkeIdentityPrototype +type VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityKeyID struct { + // The IKE identity type. + Type *string `json:"type" validate:"required"` + + // The base64-encoded IKE identity key ID value. + Value *string `json:"value" validate:"required"` +} + +// Constants associated with the VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityKeyID.Type property. +// The IKE identity type. +const ( + VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityKeyIDTypeFqdnConst = "fqdn" + VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityKeyIDTypeHostnameConst = "hostname" + VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityKeyIDTypeIpv4AddressConst = "ipv4_address" + VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityKeyIDTypeKeyIDConst = "key_id" +) + +// NewVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityKeyID : Instantiate VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityKeyID (Generic Model Constructor) +func (*VpcV1) NewVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityKeyID(typeVar string, value string) (_model *VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityKeyID, err error) { + _model = &VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityKeyID{ + Type: core.StringPtr(typeVar), + Value: core.StringPtr(value), + } + err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } + return +} + +func (*VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityKeyID) isaVPNGatewayConnectionIkeIdentityPrototype() bool { + return true +} + +// UnmarshalVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityKeyID unmarshals an instance of VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityKeyID from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityKeyID(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityKeyID) + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "value", &obj.Value) + if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityFqdn : VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityFqdn struct +// This model "extends" VPNGatewayConnectionIkeIdentity +type VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityFqdn struct { + // The IKE identity type. + // + // The enumerated values for this property may + // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + Type *string `json:"type" validate:"required"` + + // The IKE identity FQDN value. + Value *string `json:"value" validate:"required"` +} + +// Constants associated with the VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityFqdn.Type property. +// The IKE identity type. +// +// The enumerated values for this property may +// [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. +const ( + VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityFqdnTypeFqdnConst = "fqdn" + VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityFqdnTypeHostnameConst = "hostname" + VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityFqdnTypeIpv4AddressConst = "ipv4_address" + VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityFqdnTypeKeyIDConst = "key_id" +) + +func (*VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityFqdn) isaVPNGatewayConnectionIkeIdentity() bool { + return true +} + +// UnmarshalVPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityFqdn unmarshals an instance of VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityFqdn from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityFqdn(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityFqdn) + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "value", &obj.Value) + if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityHostname : VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityHostname struct +// This model "extends" VPNGatewayConnectionIkeIdentity +type VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityHostname struct { + // The IKE identity type. + // + // The enumerated values for this property may + // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + Type *string `json:"type" validate:"required"` + + // The IKE identity hostname value. + Value *string `json:"value" validate:"required"` +} + +// Constants associated with the VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityHostname.Type property. +// The IKE identity type. +// +// The enumerated values for this property may +// [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. +const ( + VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityHostnameTypeFqdnConst = "fqdn" + VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityHostnameTypeHostnameConst = "hostname" + VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityHostnameTypeIpv4AddressConst = "ipv4_address" + VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityHostnameTypeKeyIDConst = "key_id" +) + +func (*VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityHostname) isaVPNGatewayConnectionIkeIdentity() bool { + return true +} + +// UnmarshalVPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityHostname unmarshals an instance of VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityHostname from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityHostname(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityHostname) + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "value", &obj.Value) + if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityIPv4 : VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityIPv4 struct +// This model "extends" VPNGatewayConnectionIkeIdentity +type VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityIPv4 struct { + // The IKE identity type. + // + // The enumerated values for this property may + // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + Type *string `json:"type" validate:"required"` + + // The IKE identity IPv4 address value. + Value *string `json:"value" validate:"required"` +} + +// Constants associated with the VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityIPv4.Type property. +// The IKE identity type. +// +// The enumerated values for this property may +// [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. +const ( + VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityIPv4TypeFqdnConst = "fqdn" + VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityIPv4TypeHostnameConst = "hostname" + VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityIPv4TypeIpv4AddressConst = "ipv4_address" + VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityIPv4TypeKeyIDConst = "key_id" +) + +func (*VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityIPv4) isaVPNGatewayConnectionIkeIdentity() bool { + return true +} + +// UnmarshalVPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityIPv4 unmarshals an instance of VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityIPv4 from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityIPv4(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityIPv4) + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "value", &obj.Value) + if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityKeyID : VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityKeyID struct +// This model "extends" VPNGatewayConnectionIkeIdentity +type VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityKeyID struct { + // The IKE identity type. + // + // The enumerated values for this property may + // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + Type *string `json:"type" validate:"required"` + + // The base64-encoded IKE identity key ID value. + Value *string `json:"value" validate:"required"` +} + +// Constants associated with the VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityKeyID.Type property. +// The IKE identity type. +// +// The enumerated values for this property may +// [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. +const ( + VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityKeyIDTypeFqdnConst = "fqdn" + VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityKeyIDTypeHostnameConst = "hostname" + VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityKeyIDTypeIpv4AddressConst = "ipv4_address" + VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityKeyIDTypeKeyIDConst = "key_id" +) + +func (*VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityKeyID) isaVPNGatewayConnectionIkeIdentity() bool { + return true +} + +// UnmarshalVPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityKeyID unmarshals an instance of VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityKeyID from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityKeyID(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityKeyID) + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "value", &obj.Value) + if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -105864,6 +116118,9 @@ func (*VpcV1) NewVPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref(href Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -105876,6 +116133,7 @@ func UnmarshalVPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref(m map[st obj := new(VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -105895,6 +116153,9 @@ func (*VpcV1) NewVPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID(id stri ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -105907,6 +116168,7 @@ func UnmarshalVPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID(m map[stri obj := new(VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -105926,6 +116188,9 @@ func (*VpcV1) NewVPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref(h Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -105938,6 +116203,7 @@ func UnmarshalVPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref(m ma obj := new(VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -105957,6 +116223,9 @@ func (*VpcV1) NewVPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID(id ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -105969,6 +116238,7 @@ func UnmarshalVPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID(m map[ obj := new(VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -105988,6 +116258,9 @@ func (*VpcV1) NewVPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref(h Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -106000,6 +116273,7 @@ func UnmarshalVPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref(m ma obj := new(VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -106019,6 +116293,9 @@ func (*VpcV1) NewVPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID(id ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -106031,6 +116308,7 @@ func UnmarshalVPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID(m map[ obj := new(VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -106050,6 +116328,9 @@ func (*VpcV1) NewVPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHr Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -106062,6 +116343,7 @@ func UnmarshalVPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref( obj := new(VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -106081,6 +116363,9 @@ func (*VpcV1) NewVPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -106093,6 +116378,95 @@ func UnmarshalVPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID(m obj := new(VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch : The peer VPN gateway for this connection. If `peer.type` is `ipv4_address`, only `peer.address` may be specified. If +// `peer.type` is fqdn, only `peer.fqdn` may be specified. +// Models which "extend" this model: +// - VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch +// - VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFqdnPatch +// This model "extends" VPNGatewayConnectionPeerPatch +type VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch struct { + // The IP address of the peer VPN gateway for this connection. + Address *string `json:"address,omitempty"` + + // The FQDN of the peer VPN gateway for this connection. + Fqdn *string `json:"fqdn,omitempty"` +} + +func (*VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch) isaVPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch() bool { + return true +} + +type VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchIntf interface { + VPNGatewayConnectionPeerPatchIntf + isaVPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch() bool +} + +func (*VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch) isaVPNGatewayConnectionPeerPatch() bool { + return true +} + +// UnmarshalVPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch unmarshals an instance of VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch) + err = core.UnmarshalPrimitive(m, "address", &obj.Address) + if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "fqdn", &obj.Fqdn) + if err != nil { + err = core.SDKErrorf(err, "", "fqdn-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch : The peer VPN gateway for this connection. If `peer.type` is `ipv4_address`, only `peer.address` may be specified. If +// `peer.type` is fqdn, only `peer.fqdn` may be specified. +// Models which "extend" this model: +// - VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch +// - VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFqdnPatch +// This model "extends" VPNGatewayConnectionPeerPatch +type VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch struct { + // The IP address of the peer VPN gateway for this connection. + Address *string `json:"address,omitempty"` + + // The FQDN of the peer VPN gateway for this connection. + Fqdn *string `json:"fqdn,omitempty"` +} + +func (*VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch) isaVPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch() bool { + return true +} + +type VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchIntf interface { + VPNGatewayConnectionPeerPatchIntf + isaVPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch() bool +} + +func (*VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch) isaVPNGatewayConnectionPeerPatch() bool { + return true +} + +// UnmarshalVPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch unmarshals an instance of VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch) + err = core.UnmarshalPrimitive(m, "address", &obj.Address) + if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "fqdn", &obj.Fqdn) + if err != nil { + err = core.SDKErrorf(err, "", "fqdn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -106113,6 +116487,15 @@ type VPNGatewayConnectionPolicyMode struct { DeadPeerDetection *VPNGatewayConnectionDpd `json:"dead_peer_detection" validate:"required"` + // The establish mode of the VPN gateway connection: + // - `bidirectional`: Either side of the VPN gateway can initiate IKE protocol + // negotiations or rekeying processes. + // - `peer_only`: Only the peer can initiate IKE protocol negotiations for this VPN gateway + // connection. Additionally, the peer is responsible for initiating the rekeying process + // after the connection is established. If rekeying does not occur, the VPN gateway + // connection will be brought down after its lifetime expires. + EstablishMode *string `json:"establish_mode" validate:"required"` + // The VPN connection's canonical URL. Href *string `json:"href" validate:"required"` @@ -106133,9 +116516,6 @@ type VPNGatewayConnectionPolicyMode struct { // The name for this VPN gateway connection. The name is unique across all connections for the VPN gateway. Name *string `json:"name" validate:"required"` - // The IP address of the peer VPN gateway. - PeerAddress *string `json:"peer_address" validate:"required"` - // The pre-shared key. Psk *string `json:"psk" validate:"required"` @@ -106148,11 +116528,9 @@ type VPNGatewayConnectionPolicyMode struct { // The reasons for the current VPN gateway connection status (if any). StatusReasons []VPNGatewayConnectionStatusReason `json:"status_reasons" validate:"required"` - // The local CIDRs for this resource. - LocalCIDRs []string `json:"local_cidrs" validate:"required"` + Local *VPNGatewayConnectionPolicyModeLocal `json:"local" validate:"required"` - // The peer CIDRs for this resource. - PeerCIDRs []string `json:"peer_cidrs" validate:"required"` + Peer VPNGatewayConnectionPolicyModePeerIntf `json:"peer" validate:"required"` } // Constants associated with the VPNGatewayConnectionPolicyMode.AuthenticationMode property. @@ -106161,6 +116539,19 @@ const ( VPNGatewayConnectionPolicyModeAuthenticationModePskConst = "psk" ) +// Constants associated with the VPNGatewayConnectionPolicyMode.EstablishMode property. +// The establish mode of the VPN gateway connection: +// - `bidirectional`: Either side of the VPN gateway can initiate IKE protocol +// negotiations or rekeying processes. +// - `peer_only`: Only the peer can initiate IKE protocol negotiations for this VPN gateway +// connection. Additionally, the peer is responsible for initiating the rekeying process +// after the connection is established. If rekeying does not occur, the VPN gateway +// connection will be brought down after its lifetime expires. +const ( + VPNGatewayConnectionPolicyModeEstablishModeBidirectionalConst = "bidirectional" + VPNGatewayConnectionPolicyModeEstablishModePeerOnlyConst = "peer_only" +) + // Constants associated with the VPNGatewayConnectionPolicyMode.Mode property. // The mode of the VPN gateway. const ( @@ -106190,70 +116581,307 @@ func UnmarshalVPNGatewayConnectionPolicyMode(m map[string]json.RawMessage, resul obj := new(VPNGatewayConnectionPolicyMode) err = core.UnmarshalPrimitive(m, "admin_state_up", &obj.AdminStateUp) if err != nil { + err = core.SDKErrorf(err, "", "admin_state_up-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "authentication_mode", &obj.AuthenticationMode) if err != nil { + err = core.SDKErrorf(err, "", "authentication_mode-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "dead_peer_detection", &obj.DeadPeerDetection, UnmarshalVPNGatewayConnectionDpd) if err != nil { + err = core.SDKErrorf(err, "", "dead_peer_detection-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "establish_mode", &obj.EstablishMode) + if err != nil { + err = core.SDKErrorf(err, "", "establish_mode-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalIkePolicyReference) if err != nil { + err = core.SDKErrorf(err, "", "ike_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalIPsecPolicyReference) if err != nil { + err = core.SDKErrorf(err, "", "ipsec_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "mode", &obj.Mode) if err != nil { + err = core.SDKErrorf(err, "", "mode-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "peer_address", &obj.PeerAddress) - if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "psk", &obj.Psk) if err != nil { + err = core.SDKErrorf(err, "", "psk-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "status_reasons", &obj.StatusReasons, UnmarshalVPNGatewayConnectionStatusReason) if err != nil { + err = core.SDKErrorf(err, "", "status_reasons-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "local_cidrs", &obj.LocalCIDRs) + err = core.UnmarshalModel(m, "local", &obj.Local, UnmarshalVPNGatewayConnectionPolicyModeLocal) if err != nil { + err = core.SDKErrorf(err, "", "local-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "peer_cidrs", &obj.PeerCIDRs) + err = core.UnmarshalModel(m, "peer", &obj.Peer, UnmarshalVPNGatewayConnectionPolicyModePeer) if err != nil { + err = core.SDKErrorf(err, "", "peer-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress : VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress struct +// This model "extends" VPNGatewayConnectionPolicyModePeerPrototype +type VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress struct { + // The peer CIDRs for this VPN gateway connection. + CIDRs []string `json:"cidrs" validate:"required"` + + // The peer IKE identity to use. + // + // If unspecified: + // - If `peer.address` is specified, the `type` will be `ipv4_address`, and the `value` will be `peer.address`. + // - If `peer.fqdn` is specified, the `type` will be `fqdn`, and the `value` will be `peer.fqdn`. + IkeIdentity VPNGatewayConnectionIkeIdentityPrototypeIntf `json:"ike_identity,omitempty"` + + // The IP address of the peer VPN gateway for this connection. + Address *string `json:"address" validate:"required"` +} + +// NewVPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress : Instantiate VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress (Generic Model Constructor) +func (*VpcV1) NewVPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress(cidrs []string, address string) (_model *VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress, err error) { + _model = &VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress{ + CIDRs: cidrs, + Address: core.StringPtr(address), + } + err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } + return +} + +func (*VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress) isaVPNGatewayConnectionPolicyModePeerPrototype() bool { + return true +} + +// UnmarshalVPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress unmarshals an instance of VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress) + err = core.UnmarshalPrimitive(m, "cidrs", &obj.CIDRs) + if err != nil { + err = core.SDKErrorf(err, "", "cidrs-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "ike_identity", &obj.IkeIdentity, UnmarshalVPNGatewayConnectionIkeIdentityPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "ike_identity-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "address", &obj.Address) + if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFqdn : VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFqdn struct +// This model "extends" VPNGatewayConnectionPolicyModePeerPrototype +type VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFqdn struct { + // The peer CIDRs for this VPN gateway connection. + CIDRs []string `json:"cidrs" validate:"required"` + + // The peer IKE identity to use. + // + // If unspecified: + // - If `peer.address` is specified, the `type` will be `ipv4_address`, and the `value` will be `peer.address`. + // - If `peer.fqdn` is specified, the `type` will be `fqdn`, and the `value` will be `peer.fqdn`. + IkeIdentity VPNGatewayConnectionIkeIdentityPrototypeIntf `json:"ike_identity,omitempty"` + + // The FQDN of the peer VPN gateway for this connection. + Fqdn *string `json:"fqdn" validate:"required"` +} + +// NewVPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFqdn : Instantiate VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFqdn (Generic Model Constructor) +func (*VpcV1) NewVPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFqdn(cidrs []string, fqdn string) (_model *VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFqdn, err error) { + _model = &VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFqdn{ + CIDRs: cidrs, + Fqdn: core.StringPtr(fqdn), + } + err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } + return +} + +func (*VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFqdn) isaVPNGatewayConnectionPolicyModePeerPrototype() bool { + return true +} + +// UnmarshalVPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFqdn unmarshals an instance of VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFqdn from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFqdn(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFqdn) + err = core.UnmarshalPrimitive(m, "cidrs", &obj.CIDRs) + if err != nil { + err = core.SDKErrorf(err, "", "cidrs-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "ike_identity", &obj.IkeIdentity, UnmarshalVPNGatewayConnectionIkeIdentityPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "ike_identity-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "fqdn", &obj.Fqdn) + if err != nil { + err = core.SDKErrorf(err, "", "fqdn-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress : VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress struct +// This model "extends" VPNGatewayConnectionPolicyModePeer +type VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress struct { + // The peer CIDRs for this VPN gateway connection. + CIDRs []string `json:"cidrs" validate:"required"` + + // The peer IKE identity. + IkeIdentity VPNGatewayConnectionIkeIdentityIntf `json:"ike_identity" validate:"required"` + + // Indicates whether `peer.address` or `peer.fqdn` is used. + Type *string `json:"type" validate:"required"` + + // The IP address of the peer VPN gateway for this connection. + Address *string `json:"address" validate:"required"` +} + +// Constants associated with the VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress.Type property. +// Indicates whether `peer.address` or `peer.fqdn` is used. +const ( + VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddressTypeAddressConst = "address" + VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddressTypeFqdnConst = "fqdn" +) + +func (*VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress) isaVPNGatewayConnectionPolicyModePeer() bool { + return true +} + +// UnmarshalVPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress unmarshals an instance of VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress) + err = core.UnmarshalPrimitive(m, "cidrs", &obj.CIDRs) + if err != nil { + err = core.SDKErrorf(err, "", "cidrs-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "ike_identity", &obj.IkeIdentity, UnmarshalVPNGatewayConnectionIkeIdentity) + if err != nil { + err = core.SDKErrorf(err, "", "ike_identity-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "address", &obj.Address) + if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFqdn : VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFqdn struct +// This model "extends" VPNGatewayConnectionPolicyModePeer +type VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFqdn struct { + // The peer CIDRs for this VPN gateway connection. + CIDRs []string `json:"cidrs" validate:"required"` + + // The peer IKE identity. + IkeIdentity VPNGatewayConnectionIkeIdentityIntf `json:"ike_identity" validate:"required"` + + // Indicates whether `peer.address` or `peer.fqdn` is used. + Type *string `json:"type" validate:"required"` + + // The FQDN of the peer VPN gateway for this connection. + Fqdn *string `json:"fqdn" validate:"required"` +} + +// Constants associated with the VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFqdn.Type property. +// Indicates whether `peer.address` or `peer.fqdn` is used. +const ( + VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFqdnTypeAddressConst = "address" + VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFqdnTypeFqdnConst = "fqdn" +) + +func (*VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFqdn) isaVPNGatewayConnectionPolicyModePeer() bool { + return true +} + +// UnmarshalVPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFqdn unmarshals an instance of VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFqdn from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFqdn(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFqdn) + err = core.UnmarshalPrimitive(m, "cidrs", &obj.CIDRs) + if err != nil { + err = core.SDKErrorf(err, "", "cidrs-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "ike_identity", &obj.IkeIdentity, UnmarshalVPNGatewayConnectionIkeIdentity) + if err != nil { + err = core.SDKErrorf(err, "", "ike_identity-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "fqdn", &obj.Fqdn) + if err != nil { + err = core.SDKErrorf(err, "", "fqdn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -106268,6 +116896,15 @@ type VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype struct DeadPeerDetection *VPNGatewayConnectionDpdPrototype `json:"dead_peer_detection,omitempty"` + // The establish mode of the VPN gateway connection: + // - `bidirectional`: Either side of the VPN gateway can initiate IKE protocol + // negotiations or rekeying processes. + // - `peer_only`: Only the peer can initiate IKE protocol negotiations for this VPN gateway + // connection. Additionally, the peer is responsible for initiating the rekeying process + // after the connection is established. If rekeying does not occur, the VPN gateway + // connection will be brought down after its lifetime expires. + EstablishMode *string `json:"establish_mode,omitempty"` + IkePolicy VPNGatewayConnectionIkePolicyPrototypeIntf `json:"ike_policy,omitempty"` IpsecPolicy VPNGatewayConnectionIPsecPolicyPrototypeIntf `json:"ipsec_policy,omitempty"` @@ -106276,28 +116913,38 @@ type VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype struct // unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` - // The IP address of the peer VPN gateway. - PeerAddress *string `json:"peer_address" validate:"required"` - // The pre-shared key. Psk *string `json:"psk" validate:"required"` - // The local CIDRs for this resource. - LocalCIDRs []string `json:"local_cidrs" validate:"required"` + Local *VPNGatewayConnectionPolicyModeLocalPrototype `json:"local" validate:"required"` - // The peer CIDRs for this resource. - PeerCIDRs []string `json:"peer_cidrs" validate:"required"` + Peer VPNGatewayConnectionPolicyModePeerPrototypeIntf `json:"peer" validate:"required"` } +// Constants associated with the VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype.EstablishMode property. +// The establish mode of the VPN gateway connection: +// - `bidirectional`: Either side of the VPN gateway can initiate IKE protocol +// negotiations or rekeying processes. +// - `peer_only`: Only the peer can initiate IKE protocol negotiations for this VPN gateway +// connection. Additionally, the peer is responsible for initiating the rekeying process +// after the connection is established. If rekeying does not occur, the VPN gateway +// connection will be brought down after its lifetime expires. +const ( + VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototypeEstablishModeBidirectionalConst = "bidirectional" + VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototypeEstablishModePeerOnlyConst = "peer_only" +) + // NewVPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype : Instantiate VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype (Generic Model Constructor) -func (*VpcV1) NewVPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype(peerAddress string, psk string, localCIDRs []string, peerCIDRs []string) (_model *VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype, err error) { +func (*VpcV1) NewVPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype(psk string, local *VPNGatewayConnectionPolicyModeLocalPrototype, peer VPNGatewayConnectionPolicyModePeerPrototypeIntf) (_model *VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype, err error) { _model = &VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype{ - PeerAddress: core.StringPtr(peerAddress), - Psk: core.StringPtr(psk), - LocalCIDRs: localCIDRs, - PeerCIDRs: peerCIDRs, + Psk: core.StringPtr(psk), + Local: local, + Peer: peer, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -106310,38 +116957,47 @@ func UnmarshalVPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototy obj := new(VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype) err = core.UnmarshalPrimitive(m, "admin_state_up", &obj.AdminStateUp) if err != nil { + err = core.SDKErrorf(err, "", "admin_state_up-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "dead_peer_detection", &obj.DeadPeerDetection, UnmarshalVPNGatewayConnectionDpdPrototype) if err != nil { + err = core.SDKErrorf(err, "", "dead_peer_detection-error", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalVPNGatewayConnectionIkePolicyPrototype) + err = core.UnmarshalPrimitive(m, "establish_mode", &obj.EstablishMode) if err != nil { + err = core.SDKErrorf(err, "", "establish_mode-error", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalVPNGatewayConnectionIPsecPolicyPrototype) + err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalVPNGatewayConnectionIkePolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "ike_policy-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "name", &obj.Name) + err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalVPNGatewayConnectionIPsecPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "ipsec_policy-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "peer_address", &obj.PeerAddress) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "psk", &obj.Psk) if err != nil { + err = core.SDKErrorf(err, "", "psk-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "local_cidrs", &obj.LocalCIDRs) + err = core.UnmarshalModel(m, "local", &obj.Local, UnmarshalVPNGatewayConnectionPolicyModeLocalPrototype) if err != nil { + err = core.SDKErrorf(err, "", "local-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "peer_cidrs", &obj.PeerCIDRs) + err = core.UnmarshalModel(m, "peer", &obj.Peer, UnmarshalVPNGatewayConnectionPolicyModePeerPrototype) if err != nil { + err = core.SDKErrorf(err, "", "peer-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -106356,6 +117012,15 @@ type VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype s DeadPeerDetection *VPNGatewayConnectionDpdPrototype `json:"dead_peer_detection,omitempty"` + // The establish mode of the VPN gateway connection: + // - `bidirectional`: Either side of the VPN gateway can initiate IKE protocol + // negotiations or rekeying processes. + // - `peer_only`: Only the peer can initiate IKE protocol negotiations for this VPN gateway + // connection. Additionally, the peer is responsible for initiating the rekeying process + // after the connection is established. If rekeying does not occur, the VPN gateway + // connection will be brought down after its lifetime expires. + EstablishMode *string `json:"establish_mode,omitempty"` + IkePolicy VPNGatewayConnectionIkePolicyPrototypeIntf `json:"ike_policy,omitempty"` IpsecPolicy VPNGatewayConnectionIPsecPolicyPrototypeIntf `json:"ipsec_policy,omitempty"` @@ -106364,16 +117029,30 @@ type VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype s // unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` - // The IP address of the peer VPN gateway. - PeerAddress *string `json:"peer_address" validate:"required"` - // The pre-shared key. Psk *string `json:"psk" validate:"required"` + Local *VPNGatewayConnectionStaticRouteModeLocalPrototype `json:"local,omitempty"` + + Peer VPNGatewayConnectionStaticRouteModePeerPrototypeIntf `json:"peer" validate:"required"` + // Routing protocols are disabled for this VPN gateway connection. RoutingProtocol *string `json:"routing_protocol,omitempty"` } +// Constants associated with the VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype.EstablishMode property. +// The establish mode of the VPN gateway connection: +// - `bidirectional`: Either side of the VPN gateway can initiate IKE protocol +// negotiations or rekeying processes. +// - `peer_only`: Only the peer can initiate IKE protocol negotiations for this VPN gateway +// connection. Additionally, the peer is responsible for initiating the rekeying process +// after the connection is established. If rekeying does not occur, the VPN gateway +// connection will be brought down after its lifetime expires. +const ( + VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototypeEstablishModeBidirectionalConst = "bidirectional" + VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototypeEstablishModePeerOnlyConst = "peer_only" +) + // Constants associated with the VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype.RoutingProtocol property. // Routing protocols are disabled for this VPN gateway connection. const ( @@ -106381,12 +117060,15 @@ const ( ) // NewVPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype : Instantiate VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype (Generic Model Constructor) -func (*VpcV1) NewVPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype(peerAddress string, psk string) (_model *VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype, err error) { +func (*VpcV1) NewVPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype(psk string, peer VPNGatewayConnectionStaticRouteModePeerPrototypeIntf) (_model *VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype, err error) { _model = &VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype{ - PeerAddress: core.StringPtr(peerAddress), - Psk: core.StringPtr(psk), + Psk: core.StringPtr(psk), + Peer: peer, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -106399,34 +117081,52 @@ func UnmarshalVPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePr obj := new(VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype) err = core.UnmarshalPrimitive(m, "admin_state_up", &obj.AdminStateUp) if err != nil { + err = core.SDKErrorf(err, "", "admin_state_up-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "dead_peer_detection", &obj.DeadPeerDetection, UnmarshalVPNGatewayConnectionDpdPrototype) if err != nil { + err = core.SDKErrorf(err, "", "dead_peer_detection-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "establish_mode", &obj.EstablishMode) + if err != nil { + err = core.SDKErrorf(err, "", "establish_mode-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalVPNGatewayConnectionIkePolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "ike_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalVPNGatewayConnectionIPsecPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "ipsec_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "peer_address", &obj.PeerAddress) + err = core.UnmarshalPrimitive(m, "psk", &obj.Psk) if err != nil { + err = core.SDKErrorf(err, "", "psk-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "psk", &obj.Psk) + err = core.UnmarshalModel(m, "local", &obj.Local, UnmarshalVPNGatewayConnectionStaticRouteModeLocalPrototype) if err != nil { + err = core.SDKErrorf(err, "", "local-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "peer", &obj.Peer, UnmarshalVPNGatewayConnectionStaticRouteModePeerPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "peer-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "routing_protocol", &obj.RoutingProtocol) if err != nil { + err = core.SDKErrorf(err, "", "routing_protocol-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -106449,6 +117149,15 @@ type VPNGatewayConnectionRouteMode struct { DeadPeerDetection *VPNGatewayConnectionDpd `json:"dead_peer_detection" validate:"required"` + // The establish mode of the VPN gateway connection: + // - `bidirectional`: Either side of the VPN gateway can initiate IKE protocol + // negotiations or rekeying processes. + // - `peer_only`: Only the peer can initiate IKE protocol negotiations for this VPN gateway + // connection. Additionally, the peer is responsible for initiating the rekeying process + // after the connection is established. If rekeying does not occur, the VPN gateway + // connection will be brought down after its lifetime expires. + EstablishMode *string `json:"establish_mode" validate:"required"` + // The VPN connection's canonical URL. Href *string `json:"href" validate:"required"` @@ -106469,9 +117178,6 @@ type VPNGatewayConnectionRouteMode struct { // The name for this VPN gateway connection. The name is unique across all connections for the VPN gateway. Name *string `json:"name" validate:"required"` - // The IP address of the peer VPN gateway. - PeerAddress *string `json:"peer_address" validate:"required"` - // The pre-shared key. Psk *string `json:"psk" validate:"required"` @@ -106484,6 +117190,10 @@ type VPNGatewayConnectionRouteMode struct { // The reasons for the current VPN gateway connection status (if any). StatusReasons []VPNGatewayConnectionStatusReason `json:"status_reasons" validate:"required"` + Local *VPNGatewayConnectionStaticRouteModeLocal `json:"local,omitempty"` + + Peer VPNGatewayConnectionStaticRouteModePeerIntf `json:"peer,omitempty"` + // Routing protocols are disabled for this VPN gateway connection. RoutingProtocol *string `json:"routing_protocol,omitempty"` @@ -106497,6 +117207,19 @@ const ( VPNGatewayConnectionRouteModeAuthenticationModePskConst = "psk" ) +// Constants associated with the VPNGatewayConnectionRouteMode.EstablishMode property. +// The establish mode of the VPN gateway connection: +// - `bidirectional`: Either side of the VPN gateway can initiate IKE protocol +// negotiations or rekeying processes. +// - `peer_only`: Only the peer can initiate IKE protocol negotiations for this VPN gateway +// connection. Additionally, the peer is responsible for initiating the rekeying process +// after the connection is established. If rekeying does not occur, the VPN gateway +// connection will be brought down after its lifetime expires. +const ( + VPNGatewayConnectionRouteModeEstablishModeBidirectionalConst = "bidirectional" + VPNGatewayConnectionRouteModeEstablishModePeerOnlyConst = "peer_only" +) + // Constants associated with the VPNGatewayConnectionRouteMode.Mode property. // The mode of the VPN gateway. const ( @@ -106538,73 +117261,210 @@ func (*VPNGatewayConnectionRouteMode) isaVPNGatewayConnection() bool { // UnmarshalVPNGatewayConnectionRouteMode unmarshals an instance of VPNGatewayConnectionRouteMode from the specified map of raw messages. func UnmarshalVPNGatewayConnectionRouteMode(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(VPNGatewayConnectionRouteMode) - err = core.UnmarshalPrimitive(m, "admin_state_up", &obj.AdminStateUp) + // Retrieve discriminator value to determine correct "subclass". + var discValue string + err = core.UnmarshalPrimitive(m, "routing_protocol", &discValue) if err != nil { + errMsg := fmt.Sprintf("error unmarshalling discriminator property 'routing_protocol': %s", err.Error()) + err = core.SDKErrorf(err, errMsg, "discriminator-unmarshal-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "authentication_mode", &obj.AuthenticationMode) - if err != nil { + if discValue == "" { + err = core.SDKErrorf(err, "required discriminator property 'routing_protocol' not found in JSON object", "missing-discriminator", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) - if err != nil { - return + if discValue == "none" { + err = core.UnmarshalModel(m, "", result, UnmarshalVPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode-error", common.GetComponentInfo()) + } + } else { + errMsg := fmt.Sprintf("unrecognized value for discriminator property 'routing_protocol': %s", discValue) + err = core.SDKErrorf(err, errMsg, "invalid-discriminator", common.GetComponentInfo()) } - err = core.UnmarshalModel(m, "dead_peer_detection", &obj.DeadPeerDetection, UnmarshalVPNGatewayConnectionDpd) - if err != nil { - return + return +} + +// VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress : VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress struct +// This model "extends" VPNGatewayConnectionStaticRouteModePeerPrototype +type VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress struct { + // The peer IKE identity to use. + // + // If unspecified: + // - If `peer.address` is specified, the `type` will be `ipv4_address`, and the `value` will be `peer.address`. + // - If `peer.fqdn` is specified, the `type` will be `fqdn`, and the `value` will be `peer.fqdn`. + IkeIdentity VPNGatewayConnectionIkeIdentityPrototypeIntf `json:"ike_identity,omitempty"` + + // The IP address of the peer VPN gateway for this connection. + Address *string `json:"address" validate:"required"` +} + +// NewVPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress : Instantiate VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress (Generic Model Constructor) +func (*VpcV1) NewVPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress(address string) (_model *VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress, err error) { + _model = &VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress{ + Address: core.StringPtr(address), } - err = core.UnmarshalPrimitive(m, "href", &obj.Href) + err = core.ValidateStruct(_model, "required parameters") if err != nil { - return + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) } - err = core.UnmarshalPrimitive(m, "id", &obj.ID) + return +} + +func (*VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress) isaVPNGatewayConnectionStaticRouteModePeerPrototype() bool { + return true +} + +// UnmarshalVPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress unmarshals an instance of VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress) + err = core.UnmarshalModel(m, "ike_identity", &obj.IkeIdentity, UnmarshalVPNGatewayConnectionIkeIdentityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "ike_identity-error", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalIkePolicyReference) + err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalIPsecPolicyReference) - if err != nil { - return + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn : VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn struct +// This model "extends" VPNGatewayConnectionStaticRouteModePeerPrototype +type VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn struct { + // The peer IKE identity to use. + // + // If unspecified: + // - If `peer.address` is specified, the `type` will be `ipv4_address`, and the `value` will be `peer.address`. + // - If `peer.fqdn` is specified, the `type` will be `fqdn`, and the `value` will be `peer.fqdn`. + IkeIdentity VPNGatewayConnectionIkeIdentityPrototypeIntf `json:"ike_identity,omitempty"` + + // The FQDN of the peer VPN gateway for this connection. + Fqdn *string `json:"fqdn" validate:"required"` +} + +// NewVPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn : Instantiate VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn (Generic Model Constructor) +func (*VpcV1) NewVPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn(fqdn string) (_model *VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn, err error) { + _model = &VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn{ + Fqdn: core.StringPtr(fqdn), } - err = core.UnmarshalPrimitive(m, "mode", &obj.Mode) + err = core.ValidateStruct(_model, "required parameters") if err != nil { - return + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) } - err = core.UnmarshalPrimitive(m, "name", &obj.Name) + return +} + +func (*VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn) isaVPNGatewayConnectionStaticRouteModePeerPrototype() bool { + return true +} + +// UnmarshalVPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn unmarshals an instance of VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn) + err = core.UnmarshalModel(m, "ike_identity", &obj.IkeIdentity, UnmarshalVPNGatewayConnectionIkeIdentityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "ike_identity-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "peer_address", &obj.PeerAddress) + err = core.UnmarshalPrimitive(m, "fqdn", &obj.Fqdn) if err != nil { + err = core.SDKErrorf(err, "", "fqdn-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "psk", &obj.Psk) + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress : VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress struct +// This model "extends" VPNGatewayConnectionStaticRouteModePeer +type VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress struct { + // The peer IKE identity. + IkeIdentity VPNGatewayConnectionIkeIdentityIntf `json:"ike_identity" validate:"required"` + + // Indicates whether `peer.address` or `peer.fqdn` is used. + Type *string `json:"type" validate:"required"` + + // The IP address of the peer VPN gateway for this connection. + Address *string `json:"address" validate:"required"` +} + +// Constants associated with the VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress.Type property. +// Indicates whether `peer.address` or `peer.fqdn` is used. +const ( + VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddressTypeAddressConst = "address" + VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddressTypeFqdnConst = "fqdn" +) + +func (*VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress) isaVPNGatewayConnectionStaticRouteModePeer() bool { + return true +} + +// UnmarshalVPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress unmarshals an instance of VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress) + err = core.UnmarshalModel(m, "ike_identity", &obj.IkeIdentity, UnmarshalVPNGatewayConnectionIkeIdentity) if err != nil { + err = core.SDKErrorf(err, "", "ike_identity-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) + err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "status", &obj.Status) + err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "status_reasons", &obj.StatusReasons, UnmarshalVPNGatewayConnectionStatusReason) + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFqdn : VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFqdn struct +// This model "extends" VPNGatewayConnectionStaticRouteModePeer +type VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFqdn struct { + // The peer IKE identity. + IkeIdentity VPNGatewayConnectionIkeIdentityIntf `json:"ike_identity" validate:"required"` + + // Indicates whether `peer.address` or `peer.fqdn` is used. + Type *string `json:"type" validate:"required"` + + // The FQDN of the peer VPN gateway for this connection. + Fqdn *string `json:"fqdn" validate:"required"` +} + +// Constants associated with the VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFqdn.Type property. +// Indicates whether `peer.address` or `peer.fqdn` is used. +const ( + VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFqdnTypeAddressConst = "address" + VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFqdnTypeFqdnConst = "fqdn" +) + +func (*VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFqdn) isaVPNGatewayConnectionStaticRouteModePeer() bool { + return true +} + +// UnmarshalVPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFqdn unmarshals an instance of VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFqdn from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFqdn(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFqdn) + err = core.UnmarshalModel(m, "ike_identity", &obj.IkeIdentity, UnmarshalVPNGatewayConnectionIkeIdentity) if err != nil { + err = core.SDKErrorf(err, "", "ike_identity-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "routing_protocol", &obj.RoutingProtocol) + err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "tunnels", &obj.Tunnels, UnmarshalVPNGatewayConnectionStaticRouteModeTunnel) + err = core.UnmarshalPrimitive(m, "fqdn", &obj.Fqdn) if err != nil { + err = core.SDKErrorf(err, "", "fqdn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -106716,66 +117576,82 @@ func UnmarshalVPNGatewayPolicyMode(m map[string]json.RawMessage, result interfac obj := new(VPNGatewayPolicyMode) err = core.UnmarshalModel(m, "connections", &obj.Connections, UnmarshalVPNGatewayConnectionReference) if err != nil { + err = core.SDKErrorf(err, "", "connections-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "health_reasons", &obj.HealthReasons, UnmarshalVPNGatewayHealthReason) if err != nil { + err = core.SDKErrorf(err, "", "health_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "health_state", &obj.HealthState) if err != nil { + err = core.SDKErrorf(err, "", "health_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "lifecycle_reasons", &obj.LifecycleReasons, UnmarshalVPNGatewayLifecycleReason) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "members", &obj.Members, UnmarshalVPNGatewayMember) if err != nil { + err = core.SDKErrorf(err, "", "members-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "mode", &obj.Mode) if err != nil { + err = core.SDKErrorf(err, "", "mode-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -106809,6 +117685,9 @@ func (*VpcV1) NewVPNGatewayPrototypeVPNGatewayPolicyModePrototype(subnet SubnetI Subnet: subnet, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -106821,18 +117700,22 @@ func UnmarshalVPNGatewayPrototypeVPNGatewayPolicyModePrototype(m map[string]json obj := new(VPNGatewayPrototypeVPNGatewayPolicyModePrototype) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "mode", &obj.Mode) if err != nil { + err = core.SDKErrorf(err, "", "mode-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -106866,6 +117749,9 @@ func (*VpcV1) NewVPNGatewayPrototypeVPNGatewayRouteModePrototype(subnet SubnetId Subnet: subnet, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -106878,18 +117764,22 @@ func UnmarshalVPNGatewayPrototypeVPNGatewayRouteModePrototype(m map[string]json. obj := new(VPNGatewayPrototypeVPNGatewayRouteModePrototype) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "mode", &obj.Mode) if err != nil { + err = core.SDKErrorf(err, "", "mode-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -107001,66 +117891,82 @@ func UnmarshalVPNGatewayRouteMode(m map[string]json.RawMessage, result interface obj := new(VPNGatewayRouteMode) err = core.UnmarshalModel(m, "connections", &obj.Connections, UnmarshalVPNGatewayConnectionReference) if err != nil { + err = core.SDKErrorf(err, "", "connections-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "health_reasons", &obj.HealthReasons, UnmarshalVPNGatewayHealthReason) if err != nil { + err = core.SDKErrorf(err, "", "health_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "health_state", &obj.HealthState) if err != nil { + err = core.SDKErrorf(err, "", "health_state-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "lifecycle_reasons", &obj.LifecycleReasons, UnmarshalVPNGatewayLifecycleReason) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_reasons-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "members", &obj.Members, UnmarshalVPNGatewayMember) if err != nil { + err = core.SDKErrorf(err, "", "members-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference) if err != nil { + err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "mode", &obj.Mode) if err != nil { + err = core.SDKErrorf(err, "", "mode-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -107096,14 +118002,17 @@ func UnmarshalVPNServerAuthenticationByCertificate(m map[string]json.RawMessage, obj := new(VPNServerAuthenticationByCertificate) err = core.UnmarshalPrimitive(m, "method", &obj.Method) if err != nil { + err = core.SDKErrorf(err, "", "method-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "client_ca", &obj.ClientCa, UnmarshalCertificateInstanceReference) if err != nil { + err = core.SDKErrorf(err, "", "client_ca-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crl", &obj.Crl) if err != nil { + err = core.SDKErrorf(err, "", "crl-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -107136,10 +118045,12 @@ func UnmarshalVPNServerAuthenticationByUsername(m map[string]json.RawMessage, re obj := new(VPNServerAuthenticationByUsername) err = core.UnmarshalPrimitive(m, "method", &obj.Method) if err != nil { + err = core.SDKErrorf(err, "", "method-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "identity_provider", &obj.IdentityProvider, UnmarshalVPNServerAuthenticationByUsernameIDProvider) if err != nil { + err = core.SDKErrorf(err, "", "identity_provider-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -107173,6 +118084,9 @@ func (*VpcV1) NewVPNServerAuthenticationByUsernameIDProviderByIam(providerType s ProviderType: core.StringPtr(providerType), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -107185,6 +118099,7 @@ func UnmarshalVPNServerAuthenticationByUsernameIDProviderByIam(m map[string]json obj := new(VPNServerAuthenticationByUsernameIDProviderByIam) err = core.UnmarshalPrimitive(m, "provider_type", &obj.ProviderType) if err != nil { + err = core.SDKErrorf(err, "", "provider_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -107218,6 +118133,9 @@ func (*VpcV1) NewVPNServerAuthenticationPrototypeVPNServerAuthenticationByCertif ClientCa: clientCa, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -107230,14 +118148,17 @@ func UnmarshalVPNServerAuthenticationPrototypeVPNServerAuthenticationByCertifica obj := new(VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype) err = core.UnmarshalPrimitive(m, "method", &obj.Method) if err != nil { + err = core.SDKErrorf(err, "", "method-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "client_ca", &obj.ClientCa, UnmarshalCertificateInstanceIdentity) if err != nil { + err = core.SDKErrorf(err, "", "client_ca-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crl", &obj.Crl) if err != nil { + err = core.SDKErrorf(err, "", "crl-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -107268,6 +118189,9 @@ func (*VpcV1) NewVPNServerAuthenticationPrototypeVPNServerAuthenticationByUserna IdentityProvider: identityProvider, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -107280,10 +118204,12 @@ func UnmarshalVPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernameP obj := new(VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype) err = core.UnmarshalPrimitive(m, "method", &obj.Method) if err != nil { + err = core.SDKErrorf(err, "", "method-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "identity_provider", &obj.IdentityProvider, UnmarshalVPNServerAuthenticationByUsernameIDProvider) if err != nil { + err = core.SDKErrorf(err, "", "identity_provider-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -107322,10 +118248,12 @@ func UnmarshalVirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetwork obj := new(VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContext) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -107359,14 +118287,17 @@ func UnmarshalVirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetwor obj := new(VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { + err = core.SDKErrorf(err, "", "auto_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -107405,10 +118336,12 @@ func UnmarshalVirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtual obj := new(VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -107442,14 +118375,17 @@ func UnmarshalVirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtua obj := new(VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { + err = core.SDKErrorf(err, "", "auto_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -107488,18 +118424,22 @@ func UnmarshalVirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentRefer obj := new(VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -107537,18 +118477,22 @@ func UnmarshalVirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVir obj := new(VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -107590,22 +118534,27 @@ func UnmarshalVirtualNetworkInterfaceTargetShareMountTargetReference(m map[strin obj := new(VirtualNetworkInterfaceTargetShareMountTargetReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalShareMountTargetReferenceDeleted) if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -107647,14 +118596,17 @@ func UnmarshalVolumeAttachmentPrototypeVolumeVolumeIdentity(m map[string]json.Ra obj := new(VolumeAttachmentPrototypeVolumeVolumeIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -107719,34 +118671,42 @@ func UnmarshalVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext(m ma obj := new(VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext) err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { + err = core.SDKErrorf(err, "", "iops-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { + err = core.SDKErrorf(err, "", "user_tags-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity) if err != nil { + err = core.SDKErrorf(err, "", "capacity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "encryption_key-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "source_snapshot", &obj.SourceSnapshot, UnmarshalSnapshotIdentity) if err != nil { + err = core.SDKErrorf(err, "", "source_snapshot-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -107766,6 +118726,9 @@ func (*VpcV1) NewVolumeIdentityByCRN(crn string) (_model *VolumeIdentityByCRN, e CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -107778,6 +118741,7 @@ func UnmarshalVolumeIdentityByCRN(m map[string]json.RawMessage, result interface obj := new(VolumeIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -107797,6 +118761,9 @@ func (*VpcV1) NewVolumeIdentityByHref(href string) (_model *VolumeIdentityByHref Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -107809,6 +118776,7 @@ func UnmarshalVolumeIdentityByHref(m map[string]json.RawMessage, result interfac obj := new(VolumeIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -107828,6 +118796,9 @@ func (*VpcV1) NewVolumeIdentityByID(id string) (_model *VolumeIdentityByID, err ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -107840,6 +118811,7 @@ func UnmarshalVolumeIdentityByID(m map[string]json.RawMessage, result interface{ obj := new(VolumeIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -107859,6 +118831,9 @@ func (*VpcV1) NewVolumeProfileIdentityByHref(href string) (_model *VolumeProfile Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -107871,6 +118846,7 @@ func UnmarshalVolumeProfileIdentityByHref(m map[string]json.RawMessage, result i obj := new(VolumeProfileIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -107890,6 +118866,9 @@ func (*VpcV1) NewVolumeProfileIdentityByName(name string) (_model *VolumeProfile Name: core.StringPtr(name), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -107902,6 +118881,7 @@ func UnmarshalVolumeProfileIdentityByName(m map[string]json.RawMessage, result i obj := new(VolumeProfileIdentityByName) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -107950,6 +118930,9 @@ func (*VpcV1) NewVolumePrototypeVolumeByCapacity(profile VolumeProfileIdentityIn Capacity: core.Int64Ptr(capacity), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -107962,34 +118945,42 @@ func UnmarshalVolumePrototypeVolumeByCapacity(m map[string]json.RawMessage, resu obj := new(VolumePrototypeVolumeByCapacity) err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { + err = core.SDKErrorf(err, "", "iops-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { + err = core.SDKErrorf(err, "", "user_tags-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity) if err != nil { + err = core.SDKErrorf(err, "", "capacity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "encryption_key-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -108041,6 +119032,9 @@ func (*VpcV1) NewVolumePrototypeVolumeBySourceSnapshot(profile VolumeProfileIden SourceSnapshot: sourceSnapshot, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -108053,38 +119047,47 @@ func UnmarshalVolumePrototypeVolumeBySourceSnapshot(m map[string]json.RawMessage obj := new(VolumePrototypeVolumeBySourceSnapshot) err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { + err = core.SDKErrorf(err, "", "iops-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { + err = core.SDKErrorf(err, "", "user_tags-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity) if err != nil { + err = core.SDKErrorf(err, "", "capacity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "encryption_key-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "source_snapshot", &obj.SourceSnapshot, UnmarshalSnapshotIdentity) if err != nil { + err = core.SDKErrorf(err, "", "source_snapshot-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -108104,6 +119107,9 @@ func (*VpcV1) NewZoneIdentityByHref(href string) (_model *ZoneIdentityByHref, er Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -108116,6 +119122,7 @@ func UnmarshalZoneIdentityByHref(m map[string]json.RawMessage, result interface{ obj := new(ZoneIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -108135,6 +119142,9 @@ func (*VpcV1) NewZoneIdentityByName(name string) (_model *ZoneIdentityByName, er Name: core.StringPtr(name), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -108147,6 +119157,7 @@ func UnmarshalZoneIdentityByName(m map[string]json.RawMessage, result interface{ obj := new(ZoneIdentityByName) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -108166,6 +119177,9 @@ func (*VpcV1) NewBackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityB CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -108182,6 +119196,7 @@ func UnmarshalBackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCR obj := new(BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -108201,6 +119216,9 @@ func (*VpcV1) NewBareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfac CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -108217,6 +119235,7 @@ func UnmarshalBareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVi obj := new(BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -108236,6 +119255,9 @@ func (*VpcV1) NewBareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfac Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -108252,6 +119274,7 @@ func UnmarshalBareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVi obj := new(BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -108271,6 +119294,9 @@ func (*VpcV1) NewBareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfac ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -108287,6 +119313,7 @@ func UnmarshalBareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVi obj := new(BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -108306,6 +119333,9 @@ func (*VpcV1) NewEndpointGatewayReservedIPReservedIPIdentityByHref(href string) Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -108322,6 +119352,7 @@ func UnmarshalEndpointGatewayReservedIPReservedIPIdentityByHref(m map[string]jso obj := new(EndpointGatewayReservedIPReservedIPIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -108341,6 +119372,9 @@ func (*VpcV1) NewEndpointGatewayReservedIPReservedIPIdentityByID(id string) (_mo ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -108357,6 +119391,7 @@ func UnmarshalEndpointGatewayReservedIPReservedIPIdentityByID(m map[string]json. obj := new(EndpointGatewayReservedIPReservedIPIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -108387,6 +119422,9 @@ func (*VpcV1) NewEndpointGatewayTargetPrototypeProviderCloudServiceIdentityProvi CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -108403,10 +119441,12 @@ func UnmarshalEndpointGatewayTargetPrototypeProviderCloudServiceIdentityProvider obj := new(EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN) err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -108438,6 +119478,9 @@ func (*VpcV1) NewEndpointGatewayTargetPrototypeProviderInfrastructureServiceIden Name: core.StringPtr(name), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -108454,10 +119497,12 @@ func UnmarshalEndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentit obj := new(EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName) err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -108481,6 +119526,9 @@ func (*VpcV1) NewFloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBar Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -108497,6 +119545,7 @@ func UnmarshalFloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMe obj := new(FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -108521,6 +119570,9 @@ func (*VpcV1) NewFloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBar ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -108537,6 +119589,7 @@ func UnmarshalFloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMe obj := new(FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -108560,6 +119613,9 @@ func (*VpcV1) NewFloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceId Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -108576,6 +119632,7 @@ func UnmarshalFloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdent obj := new(FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -108600,6 +119657,9 @@ func (*VpcV1) NewFloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceId ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -108616,6 +119676,7 @@ func UnmarshalFloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdent obj := new(FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -108635,6 +119696,9 @@ func (*VpcV1) NewFloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetw CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -108651,6 +119715,7 @@ func UnmarshalFloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetwork obj := new(FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -108670,6 +119735,9 @@ func (*VpcV1) NewFloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetw Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -108686,6 +119754,7 @@ func UnmarshalFloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetwork obj := new(FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -108705,6 +119774,9 @@ func (*VpcV1) NewFloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetw ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -108721,6 +119793,7 @@ func UnmarshalFloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetwork obj := new(FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -108744,6 +119817,9 @@ func (*VpcV1) NewFloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentit Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -108760,6 +119836,7 @@ func UnmarshalFloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBa obj := new(FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -108784,6 +119861,9 @@ func (*VpcV1) NewFloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentit ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -108800,6 +119880,7 @@ func UnmarshalFloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBa obj := new(FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -108823,6 +119904,9 @@ func (*VpcV1) NewFloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfa Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -108839,6 +119923,7 @@ func UnmarshalFloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceI obj := new(FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -108863,6 +119948,9 @@ func (*VpcV1) NewFloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfa ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -108879,6 +119967,7 @@ func UnmarshalFloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceI obj := new(FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -108898,6 +119987,9 @@ func (*VpcV1) NewFloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtual CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -108914,6 +120006,7 @@ func UnmarshalFloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNet obj := new(FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -108933,6 +120026,9 @@ func (*VpcV1) NewFloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtual Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -108949,6 +120045,7 @@ func UnmarshalFloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNet obj := new(FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -108968,6 +120065,9 @@ func (*VpcV1) NewFloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtual ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -108984,6 +120084,7 @@ func UnmarshalFloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNet obj := new(FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -109003,6 +120104,9 @@ func (*VpcV1) NewFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentity CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -109019,6 +120123,7 @@ func UnmarshalFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByC obj := new(FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -109038,6 +120143,9 @@ func (*VpcV1) NewFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentity Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -109054,6 +120162,7 @@ func UnmarshalFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByH obj := new(FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -109073,6 +120182,9 @@ func (*VpcV1) NewFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentity ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -109089,6 +120201,7 @@ func UnmarshalFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByI obj := new(FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -109108,6 +120221,9 @@ func (*VpcV1) NewFlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentit Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -109124,6 +120240,7 @@ func UnmarshalFlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityIn obj := new(FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -109143,6 +120260,9 @@ func (*VpcV1) NewFlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentit ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -109159,6 +120279,7 @@ func UnmarshalFlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityIn obj := new(FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -109182,6 +120303,9 @@ func (*VpcV1) NewFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkI Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -109198,6 +120322,7 @@ func UnmarshalFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInte obj := new(FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -109222,6 +120347,9 @@ func (*VpcV1) NewFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkI ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -109238,6 +120366,7 @@ func UnmarshalFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInte obj := new(FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -109257,6 +120386,9 @@ func (*VpcV1) NewFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCR CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -109273,6 +120405,7 @@ func UnmarshalFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN(m obj := new(FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -109292,6 +120425,9 @@ func (*VpcV1) NewFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHr Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -109308,6 +120444,7 @@ func UnmarshalFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref( obj := new(FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -109327,6 +120464,9 @@ func (*VpcV1) NewFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -109343,6 +120483,7 @@ func UnmarshalFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID(m obj := new(FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -109362,6 +120503,9 @@ func (*VpcV1) NewFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN(crn CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -109378,6 +120522,7 @@ func UnmarshalFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN(m map[s obj := new(FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -109397,6 +120542,9 @@ func (*VpcV1) NewFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref(hre Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -109413,6 +120561,7 @@ func UnmarshalFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref(m map[ obj := new(FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -109432,6 +120581,9 @@ func (*VpcV1) NewFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID(id st ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -109448,6 +120600,7 @@ func UnmarshalFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID(m map[st obj := new(FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -109467,6 +120620,9 @@ func (*VpcV1) NewFlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityV CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -109483,6 +120639,7 @@ func UnmarshalFlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirt obj := new(FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -109502,6 +120659,9 @@ func (*VpcV1) NewFlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityV Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -109518,6 +120678,7 @@ func UnmarshalFlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirt obj := new(FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -109537,6 +120698,9 @@ func (*VpcV1) NewFlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityV ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -109553,6 +120717,7 @@ func UnmarshalFlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirt obj := new(FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -109600,18 +120765,22 @@ func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronS obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec) if err != nil { + err = core.SDKErrorf(err, "", "cron_spec-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupPrototype) if err != nil { + err = core.SDKErrorf(err, "", "group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManagerPrototype) if err != nil { + err = core.SDKErrorf(err, "", "manager-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -109658,18 +120827,22 @@ func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "run_at", &obj.RunAt) if err != nil { + err = core.SDKErrorf(err, "", "run_at-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupPrototype) if err != nil { + err = core.SDKErrorf(err, "", "group-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManagerPrototype) if err != nil { + err = core.SDKErrorf(err, "", "manager-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -109773,58 +120946,72 @@ func UnmarshalInstanceGroupManagerActionScheduledActionGroupTarget(m map[string] obj := new(InstanceGroupManagerActionScheduledActionGroupTarget) err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { + err = core.SDKErrorf(err, "", "auto_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "auto_delete_timeout", &obj.AutoDeleteTimeout) if err != nil { + err = core.SDKErrorf(err, "", "auto_delete_timeout-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt) if err != nil { + err = core.SDKErrorf(err, "", "updated_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "action_type", &obj.ActionType) if err != nil { + err = core.SDKErrorf(err, "", "action_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec) if err != nil { + err = core.SDKErrorf(err, "", "cron_spec-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "last_applied_at", &obj.LastAppliedAt) if err != nil { + err = core.SDKErrorf(err, "", "last_applied_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "next_run_at", &obj.NextRunAt) if err != nil { + err = core.SDKErrorf(err, "", "next_run_at-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroup) if err != nil { + err = core.SDKErrorf(err, "", "group-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -109928,58 +121115,72 @@ func UnmarshalInstanceGroupManagerActionScheduledActionManagerTarget(m map[strin obj := new(InstanceGroupManagerActionScheduledActionManagerTarget) err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { + err = core.SDKErrorf(err, "", "auto_delete-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "auto_delete_timeout", &obj.AutoDeleteTimeout) if err != nil { + err = core.SDKErrorf(err, "", "auto_delete_timeout-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt) if err != nil { + err = core.SDKErrorf(err, "", "updated_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "action_type", &obj.ActionType) if err != nil { + err = core.SDKErrorf(err, "", "action_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec) if err != nil { + err = core.SDKErrorf(err, "", "cron_spec-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "last_applied_at", &obj.LastAppliedAt) if err != nil { + err = core.SDKErrorf(err, "", "last_applied_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "next_run_at", &obj.NextRunAt) if err != nil { + err = core.SDKErrorf(err, "", "next_run_at-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManager) if err != nil { + err = core.SDKErrorf(err, "", "manager-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -110005,6 +121206,9 @@ func (*VpcV1) NewInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePro Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -110021,14 +121225,17 @@ func UnmarshalInstanceGroupManagerScheduledActionManagerPrototypeAutoScaleProtot obj := new(InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref) err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount) if err != nil { + err = core.SDKErrorf(err, "", "max_membership_count-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount) if err != nil { + err = core.SDKErrorf(err, "", "min_membership_count-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -110054,6 +121261,9 @@ func (*VpcV1) NewInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePro ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -110070,14 +121280,17 @@ func UnmarshalInstanceGroupManagerScheduledActionManagerPrototypeAutoScaleProtot obj := new(InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID) err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount) if err != nil { + err = core.SDKErrorf(err, "", "max_membership_count-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount) if err != nil { + err = core.SDKErrorf(err, "", "min_membership_count-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -110097,6 +121310,9 @@ func (*VpcV1) NewInstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtua CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -110113,6 +121329,7 @@ func UnmarshalInstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNe obj := new(InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -110132,6 +121349,9 @@ func (*VpcV1) NewInstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtua Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -110148,6 +121368,7 @@ func UnmarshalInstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNe obj := new(InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -110167,6 +121388,9 @@ func (*VpcV1) NewInstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtua ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -110183,6 +121407,7 @@ func UnmarshalInstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNe obj := new(InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -110202,6 +121427,9 @@ func (*VpcV1) NewInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicated CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -110218,6 +121446,7 @@ func UnmarshalInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHos obj := new(InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -110237,6 +121466,9 @@ func (*VpcV1) NewInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicated Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -110253,6 +121485,7 @@ func UnmarshalInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHos obj := new(InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -110272,6 +121505,9 @@ func (*VpcV1) NewInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicated ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -110288,6 +121524,7 @@ func UnmarshalInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHos obj := new(InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -110307,6 +121544,9 @@ func (*VpcV1) NewInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostI CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -110323,6 +121563,7 @@ func UnmarshalInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIden obj := new(InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -110342,6 +121583,9 @@ func (*VpcV1) NewInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostI Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -110358,6 +121602,7 @@ func UnmarshalInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIden obj := new(InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -110377,6 +121622,9 @@ func (*VpcV1) NewInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostI ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -110393,6 +121641,7 @@ func UnmarshalInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIden obj := new(InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -110412,6 +121661,9 @@ func (*VpcV1) NewInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedic CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -110428,6 +121680,7 @@ func UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicate obj := new(InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -110447,6 +121700,9 @@ func (*VpcV1) NewInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedic Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -110463,6 +121719,7 @@ func UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicate obj := new(InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -110482,6 +121739,9 @@ func (*VpcV1) NewInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedic ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -110498,6 +121758,7 @@ func UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicate obj := new(InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -110517,6 +121778,9 @@ func (*VpcV1) NewInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedH CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -110533,6 +121797,7 @@ func UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHost obj := new(InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -110552,6 +121817,9 @@ func (*VpcV1) NewInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedH Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -110568,6 +121836,7 @@ func UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHost obj := new(InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -110587,6 +121856,9 @@ func (*VpcV1) NewInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedH ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -110603,6 +121875,7 @@ func UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHost obj := new(InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -110622,6 +121895,9 @@ func (*VpcV1) NewInstancePlacementTargetPrototypePlacementGroupIdentityPlacement CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -110638,6 +121914,7 @@ func UnmarshalInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGro obj := new(InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -110657,6 +121934,9 @@ func (*VpcV1) NewInstancePlacementTargetPrototypePlacementGroupIdentityPlacement Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -110673,6 +121953,7 @@ func UnmarshalInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGro obj := new(InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -110692,6 +121973,9 @@ func (*VpcV1) NewInstancePlacementTargetPrototypePlacementGroupIdentityPlacement ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -110708,6 +121992,7 @@ func UnmarshalInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGro obj := new(InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -110804,6 +122089,9 @@ func (*VpcV1) NewInstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOffe PrimaryNetworkAttachment: primaryNetworkAttachment, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -110820,74 +122108,92 @@ func UnmarshalInstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferin obj := new(InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "catalog_offering", &obj.CatalogOffering, UnmarshalInstanceCatalogOfferingPrototype) if err != nil { + err = core.SDKErrorf(err, "", "catalog_offering-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -110984,6 +122290,9 @@ func (*VpcV1) NewInstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOffe PrimaryNetworkInterface: primaryNetworkInterface, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -111000,74 +122309,92 @@ func UnmarshalInstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferin obj := new(InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "catalog_offering", &obj.CatalogOffering, UnmarshalInstanceCatalogOfferingPrototype) if err != nil { + err = core.SDKErrorf(err, "", "catalog_offering-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_interface-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -111165,6 +122492,9 @@ func (*VpcV1) NewInstancePrototypeInstanceByImageInstanceByImageInstanceByNetwor PrimaryNetworkAttachment: primaryNetworkAttachment, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -111181,74 +122511,92 @@ func UnmarshalInstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAt obj := new(InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity) if err != nil { + err = core.SDKErrorf(err, "", "image-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -111346,6 +122694,9 @@ func (*VpcV1) NewInstancePrototypeInstanceByImageInstanceByImageInstanceByNetwor PrimaryNetworkInterface: primaryNetworkInterface, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -111362,74 +122713,92 @@ func UnmarshalInstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkIn obj := new(InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity) if err != nil { + err = core.SDKErrorf(err, "", "image-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_interface-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -111524,6 +122893,9 @@ func (*VpcV1) NewInstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapsh PrimaryNetworkAttachment: primaryNetworkAttachment, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -111540,70 +122912,87 @@ func UnmarshalInstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotI obj := new(InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceBySourceSnapshotContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -111698,6 +123087,9 @@ func (*VpcV1) NewInstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapsh PrimaryNetworkInterface: primaryNetworkInterface, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -111714,70 +123106,87 @@ func UnmarshalInstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotI obj := new(InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceBySourceSnapshotContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_interface-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -111872,6 +123281,9 @@ func (*VpcV1) NewInstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetw PrimaryNetworkAttachment: primaryNetworkAttachment, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -111888,70 +123300,87 @@ func UnmarshalInstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetwork obj := new(InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByVolumeContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -112046,6 +123475,9 @@ func (*VpcV1) NewInstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetw PrimaryNetworkInterface: primaryNetworkInterface, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -112062,70 +123494,87 @@ func UnmarshalInstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetwork obj := new(InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByVolumeContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_interface-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -112220,6 +123669,9 @@ func (*VpcV1) NewInstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInsta PrimaryNetworkAttachment: primaryNetworkAttachment, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -112236,74 +123688,92 @@ func UnmarshalInstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstance obj := new(InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "catalog_offering", &obj.CatalogOffering, UnmarshalInstanceCatalogOfferingPrototype) if err != nil { + err = core.SDKErrorf(err, "", "catalog_offering-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -112398,6 +123868,9 @@ func (*VpcV1) NewInstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInsta PrimaryNetworkInterface: primaryNetworkInterface, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -112414,74 +123887,92 @@ func UnmarshalInstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstance obj := new(InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "catalog_offering", &obj.CatalogOffering, UnmarshalInstanceCatalogOfferingPrototype) if err != nil { + err = core.SDKErrorf(err, "", "catalog_offering-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_interface-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -112577,6 +124068,9 @@ func (*VpcV1) NewInstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplat PrimaryNetworkAttachment: primaryNetworkAttachment, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -112593,74 +124087,92 @@ func UnmarshalInstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateBy obj := new(InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity) if err != nil { + err = core.SDKErrorf(err, "", "image-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -112756,6 +124268,9 @@ func (*VpcV1) NewInstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplat PrimaryNetworkInterface: primaryNetworkInterface, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -112772,74 +124287,92 @@ func UnmarshalInstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateBy obj := new(InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity) if err != nil { + err = core.SDKErrorf(err, "", "image-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_interface-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -112932,6 +124465,9 @@ func (*VpcV1) NewInstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstan PrimaryNetworkAttachment: primaryNetworkAttachment, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -112948,70 +124484,87 @@ func UnmarshalInstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceT obj := new(InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceBySourceSnapshotContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -113104,6 +124657,9 @@ func (*VpcV1) NewInstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstan PrimaryNetworkInterface: primaryNetworkInterface, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -113120,70 +124676,87 @@ func UnmarshalInstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceT obj := new(InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceBySourceSnapshotContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_interface-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -113295,90 +124868,112 @@ func UnmarshalInstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextIn obj := new(InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "catalog_offering", &obj.CatalogOffering, UnmarshalInstanceCatalogOfferingPrototype) if err != nil { + err = core.SDKErrorf(err, "", "catalog_offering-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -113490,90 +125085,112 @@ func UnmarshalInstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextIn obj := new(InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "catalog_offering", &obj.CatalogOffering, UnmarshalInstanceCatalogOfferingPrototype) if err != nil { + err = core.SDKErrorf(err, "", "catalog_offering-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_interface-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -113686,90 +125303,112 @@ func UnmarshalInstanceTemplateInstanceByImageInstanceTemplateContextInstanceByIm obj := new(InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity) if err != nil { + err = core.SDKErrorf(err, "", "image-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -113882,90 +125521,112 @@ func UnmarshalInstanceTemplateInstanceByImageInstanceTemplateContextInstanceByIm obj := new(InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity) if err != nil { + err = core.SDKErrorf(err, "", "image-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_interface-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -114078,90 +125739,112 @@ func UnmarshalInstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextIns obj := new(InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceBySourceSnapshotContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -114277,94 +125960,117 @@ func UnmarshalInstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextIns obj := new(InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceBySourceSnapshotContext) if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalInstanceNetworkAttachmentPrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { + err = core.SDKErrorf(err, "", "primary_network_interface-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -114384,6 +126090,9 @@ func (*VpcV1) NewLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLo Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -114400,6 +126109,7 @@ func UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadB obj := new(LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -114419,6 +126129,9 @@ func (*VpcV1) NewLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLo ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -114435,6 +126148,7 @@ func UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadB obj := new(LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -114454,6 +126168,9 @@ func (*VpcV1) NewLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdenti Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -114470,6 +126187,7 @@ func UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityL obj := new(LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -114489,6 +126207,9 @@ func (*VpcV1) NewLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdenti ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -114505,6 +126226,7 @@ func UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityL obj := new(LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -114524,6 +126246,9 @@ func (*VpcV1) NewLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceId CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -114540,6 +126265,7 @@ func UnmarshalLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdent obj := new(LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -114559,6 +126285,9 @@ func (*VpcV1) NewLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceId Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -114575,6 +126304,7 @@ func UnmarshalLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdent obj := new(LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -114594,6 +126324,9 @@ func (*VpcV1) NewLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceId ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -114610,6 +126343,7 @@ func UnmarshalLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdent obj := new(LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -114629,6 +126363,9 @@ func (*VpcV1) NewNetworkInterfaceIPPrototypeReservedIPIdentityByHref(href string Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -114645,6 +126382,7 @@ func UnmarshalNetworkInterfaceIPPrototypeReservedIPIdentityByHref(m map[string]j obj := new(NetworkInterfaceIPPrototypeReservedIPIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -114664,6 +126402,9 @@ func (*VpcV1) NewNetworkInterfaceIPPrototypeReservedIPIdentityByID(id string) (_ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -114680,6 +126421,7 @@ func UnmarshalNetworkInterfaceIPPrototypeReservedIPIdentityByID(m map[string]jso obj := new(NetworkInterfaceIPPrototypeReservedIPIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -114699,6 +126441,9 @@ func (*VpcV1) NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIde Address: core.StringPtr(address), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -114715,6 +126460,7 @@ func UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdenti obj := new(PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -114734,6 +126480,9 @@ func (*VpcV1) NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIde CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -114750,6 +126499,7 @@ func UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdenti obj := new(PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -114769,6 +126519,9 @@ func (*VpcV1) NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIde Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -114785,6 +126538,7 @@ func UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdenti obj := new(PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -114804,6 +126558,9 @@ func (*VpcV1) NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIde ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -114820,6 +126577,7 @@ func UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdenti obj := new(PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -114839,6 +126597,9 @@ func (*VpcV1) NewReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGateway CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -114855,6 +126616,7 @@ func UnmarshalReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIde obj := new(ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -114874,6 +126636,9 @@ func (*VpcV1) NewReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGateway Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -114890,6 +126655,7 @@ func UnmarshalReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIde obj := new(ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -114909,6 +126675,9 @@ func (*VpcV1) NewReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGateway ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -114925,6 +126694,7 @@ func UnmarshalReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIde obj := new(ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -114944,6 +126714,9 @@ func (*VpcV1) NewReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtual CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -114960,6 +126733,7 @@ func UnmarshalReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNet obj := new(ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -114979,6 +126753,9 @@ func (*VpcV1) NewReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtual Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -114995,6 +126772,7 @@ func UnmarshalReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNet obj := new(ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -115014,6 +126792,9 @@ func (*VpcV1) NewReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtual ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -115030,6 +126811,7 @@ func UnmarshalReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNet obj := new(ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -115052,6 +126834,9 @@ func (*VpcV1) NewRouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP(address Address: core.StringPtr(address), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -115068,6 +126853,7 @@ func UnmarshalRouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP(m map[stri obj := new(RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -115094,6 +126880,9 @@ func (*VpcV1) NewRouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP(address Address: core.StringPtr(address), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -115110,6 +126899,7 @@ func UnmarshalRouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP(m map[strin obj := new(RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -115129,6 +126919,9 @@ func (*VpcV1) NewRouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnecti Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -115145,6 +126938,7 @@ func UnmarshalRouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionI obj := new(RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -115164,6 +126958,9 @@ func (*VpcV1) NewRouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnecti ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -115180,6 +126977,7 @@ func UnmarshalRouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionI obj := new(RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -115202,6 +127000,9 @@ func (*VpcV1) NewRoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNe Address: core.StringPtr(address), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -115218,6 +127019,7 @@ func UnmarshalRoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextH obj := new(RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -115244,6 +127046,9 @@ func (*VpcV1) NewRoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNe Address: core.StringPtr(address), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -115260,6 +127065,7 @@ func UnmarshalRoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextH obj := new(RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -115279,6 +127085,9 @@ func (*VpcV1) NewRoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionI Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -115295,6 +127104,7 @@ func UnmarshalRoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIden obj := new(RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -115314,6 +127124,9 @@ func (*VpcV1) NewRoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionI ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -115330,6 +127143,7 @@ func UnmarshalRoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIden obj := new(RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -115349,6 +127163,9 @@ func (*VpcV1) NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupI CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -115365,6 +127182,7 @@ func UnmarshalSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIden obj := new(SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -115384,6 +127202,9 @@ func (*VpcV1) NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupI Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -115400,6 +127221,7 @@ func UnmarshalSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIden obj := new(SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -115419,6 +127241,9 @@ func (*VpcV1) NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupI ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -115435,6 +127260,7 @@ func UnmarshalSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIden obj := new(SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -115454,6 +127280,9 @@ func (*VpcV1) NewSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGr CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -115470,6 +127299,7 @@ func UnmarshalSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroup obj := new(SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -115489,6 +127319,9 @@ func (*VpcV1) NewSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGr Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -115505,6 +127338,7 @@ func UnmarshalSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroup obj := new(SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -115524,6 +127358,9 @@ func (*VpcV1) NewSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGr ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -115540,6 +127377,7 @@ func UnmarshalSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroup obj := new(SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -115559,6 +127397,9 @@ func (*VpcV1) NewShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkI CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -115575,6 +127416,7 @@ func UnmarshalShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInte obj := new(ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -115594,6 +127436,9 @@ func (*VpcV1) NewShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkI Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -115610,6 +127455,7 @@ func UnmarshalShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInte obj := new(ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -115629,6 +127475,9 @@ func (*VpcV1) NewShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkI ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -115645,6 +127494,115 @@ func UnmarshalShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInte obj := new(ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch : VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch struct +// This model "extends" VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch +type VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch struct { + // The IP address of the peer VPN gateway for this connection. + Address *string `json:"address,omitempty"` +} + +func (*VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch) isaVPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch() bool { + return true +} + +func (*VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch) isaVPNGatewayConnectionPeerPatch() bool { + return true +} + +// UnmarshalVPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch unmarshals an instance of VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch) + err = core.UnmarshalPrimitive(m, "address", &obj.Address) + if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFqdnPatch : VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFqdnPatch struct +// This model "extends" VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch +type VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFqdnPatch struct { + // The FQDN of the peer VPN gateway for this connection. + Fqdn *string `json:"fqdn,omitempty"` +} + +func (*VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFqdnPatch) isaVPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch() bool { + return true +} + +func (*VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFqdnPatch) isaVPNGatewayConnectionPeerPatch() bool { + return true +} + +// UnmarshalVPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFqdnPatch unmarshals an instance of VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFqdnPatch from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFqdnPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFqdnPatch) + err = core.UnmarshalPrimitive(m, "fqdn", &obj.Fqdn) + if err != nil { + err = core.SDKErrorf(err, "", "fqdn-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch : VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch struct +// This model "extends" VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch +type VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch struct { + // The IP address of the peer VPN gateway for this connection. + Address *string `json:"address,omitempty"` +} + +func (*VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch) isaVPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch() bool { + return true +} + +func (*VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch) isaVPNGatewayConnectionPeerPatch() bool { + return true +} + +// UnmarshalVPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch unmarshals an instance of VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch) + err = core.UnmarshalPrimitive(m, "address", &obj.Address) + if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFqdnPatch : VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFqdnPatch struct +// This model "extends" VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch +type VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFqdnPatch struct { + // The FQDN of the peer VPN gateway for this connection. + Fqdn *string `json:"fqdn,omitempty"` +} + +func (*VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFqdnPatch) isaVPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch() bool { + return true +} + +func (*VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFqdnPatch) isaVPNGatewayConnectionPeerPatch() bool { + return true +} + +// UnmarshalVPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFqdnPatch unmarshals an instance of VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFqdnPatch from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFqdnPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFqdnPatch) + err = core.UnmarshalPrimitive(m, "fqdn", &obj.Fqdn) + if err != nil { + err = core.SDKErrorf(err, "", "fqdn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -115665,6 +127623,15 @@ type VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode struct { DeadPeerDetection *VPNGatewayConnectionDpd `json:"dead_peer_detection" validate:"required"` + // The establish mode of the VPN gateway connection: + // - `bidirectional`: Either side of the VPN gateway can initiate IKE protocol + // negotiations or rekeying processes. + // - `peer_only`: Only the peer can initiate IKE protocol negotiations for this VPN gateway + // connection. Additionally, the peer is responsible for initiating the rekeying process + // after the connection is established. If rekeying does not occur, the VPN gateway + // connection will be brought down after its lifetime expires. + EstablishMode *string `json:"establish_mode" validate:"required"` + // The VPN connection's canonical URL. Href *string `json:"href" validate:"required"` @@ -115685,9 +127652,6 @@ type VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode struct { // The name for this VPN gateway connection. The name is unique across all connections for the VPN gateway. Name *string `json:"name" validate:"required"` - // The IP address of the peer VPN gateway. - PeerAddress *string `json:"peer_address" validate:"required"` - // The pre-shared key. Psk *string `json:"psk" validate:"required"` @@ -115700,6 +127664,10 @@ type VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode struct { // The reasons for the current VPN gateway connection status (if any). StatusReasons []VPNGatewayConnectionStatusReason `json:"status_reasons" validate:"required"` + Local *VPNGatewayConnectionStaticRouteModeLocal `json:"local" validate:"required"` + + Peer VPNGatewayConnectionStaticRouteModePeerIntf `json:"peer" validate:"required"` + // Routing protocols are disabled for this VPN gateway connection. RoutingProtocol *string `json:"routing_protocol" validate:"required"` @@ -115713,6 +127681,19 @@ const ( VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteModeAuthenticationModePskConst = "psk" ) +// Constants associated with the VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode.EstablishMode property. +// The establish mode of the VPN gateway connection: +// - `bidirectional`: Either side of the VPN gateway can initiate IKE protocol +// negotiations or rekeying processes. +// - `peer_only`: Only the peer can initiate IKE protocol negotiations for this VPN gateway +// connection. Additionally, the peer is responsible for initiating the rekeying process +// after the connection is established. If rekeying does not occur, the VPN gateway +// connection will be brought down after its lifetime expires. +const ( + VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteModeEstablishModeBidirectionalConst = "bidirectional" + VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteModeEstablishModePeerOnlyConst = "peer_only" +) + // Constants associated with the VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode.Mode property. // The mode of the VPN gateway. const ( @@ -115752,70 +127733,97 @@ func UnmarshalVPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode(m obj := new(VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode) err = core.UnmarshalPrimitive(m, "admin_state_up", &obj.AdminStateUp) if err != nil { + err = core.SDKErrorf(err, "", "admin_state_up-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "authentication_mode", &obj.AuthenticationMode) if err != nil { + err = core.SDKErrorf(err, "", "authentication_mode-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "dead_peer_detection", &obj.DeadPeerDetection, UnmarshalVPNGatewayConnectionDpd) if err != nil { + err = core.SDKErrorf(err, "", "dead_peer_detection-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "establish_mode", &obj.EstablishMode) + if err != nil { + err = core.SDKErrorf(err, "", "establish_mode-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalIkePolicyReference) if err != nil { + err = core.SDKErrorf(err, "", "ike_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalIPsecPolicyReference) if err != nil { + err = core.SDKErrorf(err, "", "ipsec_policy-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "mode", &obj.Mode) if err != nil { + err = core.SDKErrorf(err, "", "mode-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "peer_address", &obj.PeerAddress) - if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "psk", &obj.Psk) if err != nil { + err = core.SDKErrorf(err, "", "psk-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "status_reasons", &obj.StatusReasons, UnmarshalVPNGatewayConnectionStatusReason) if err != nil { + err = core.SDKErrorf(err, "", "status_reasons-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "local", &obj.Local, UnmarshalVPNGatewayConnectionStaticRouteModeLocal) + if err != nil { + err = core.SDKErrorf(err, "", "local-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "peer", &obj.Peer, UnmarshalVPNGatewayConnectionStaticRouteModePeer) + if err != nil { + err = core.SDKErrorf(err, "", "peer-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "routing_protocol", &obj.RoutingProtocol) if err != nil { + err = core.SDKErrorf(err, "", "routing_protocol-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "tunnels", &obj.Tunnels, UnmarshalVPNGatewayConnectionStaticRouteModeTunnel) if err != nil { + err = core.SDKErrorf(err, "", "tunnels-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -115835,6 +127843,9 @@ func (*VpcV1) NewVirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetw Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -115851,6 +127862,7 @@ func UnmarshalVirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetwork obj := new(VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -115870,6 +127882,9 @@ func (*VpcV1) NewVirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetw ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -115886,6 +127901,7 @@ func UnmarshalVirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetwork obj := new(VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -115905,6 +127921,9 @@ func (*VpcV1) NewVirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirt Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -115921,6 +127940,7 @@ func UnmarshalVirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtual obj := new(VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -115940,6 +127960,9 @@ func (*VpcV1) NewVirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirt ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -115956,6 +127979,7 @@ func UnmarshalVirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtual obj := new(VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -115975,6 +127999,9 @@ func (*VpcV1) NewVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCR CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -115991,6 +128018,7 @@ func UnmarshalVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN(m obj := new(VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -116010,6 +128038,9 @@ func (*VpcV1) NewVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHr Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -116026,6 +128057,7 @@ func UnmarshalVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref( obj := new(VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -116045,6 +128077,9 @@ func (*VpcV1) NewVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -116061,6 +128096,7 @@ func UnmarshalVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID(m obj := new(VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -116106,6 +128142,9 @@ func (*VpcV1) NewVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVo Capacity: core.Int64Ptr(capacity), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -116122,30 +128161,37 @@ func UnmarshalVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolum obj := new(VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity) err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { + err = core.SDKErrorf(err, "", "iops-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { + err = core.SDKErrorf(err, "", "user_tags-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity) if err != nil { + err = core.SDKErrorf(err, "", "capacity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "encryption_key-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -116194,6 +128240,9 @@ func (*VpcV1) NewVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVo SourceSnapshot: sourceSnapshot, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -116210,34 +128259,42 @@ func UnmarshalVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolum obj := new(VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot) err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { + err = core.SDKErrorf(err, "", "iops-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity) if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { + err = core.SDKErrorf(err, "", "user_tags-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity) if err != nil { + err = core.SDKErrorf(err, "", "capacity-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { + err = core.SDKErrorf(err, "", "encryption_key-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "source_snapshot", &obj.SourceSnapshot, UnmarshalSnapshotIdentity) if err != nil { + err = core.SDKErrorf(err, "", "source_snapshot-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -116264,6 +128321,9 @@ func (*VpcV1) NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCr Group: group, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -116284,14 +128344,17 @@ func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronS obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec) if err != nil { + err = core.SDKErrorf(err, "", "cron_spec-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupPrototype) if err != nil { + err = core.SDKErrorf(err, "", "group-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -116318,6 +128381,9 @@ func (*VpcV1) NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCr Manager: manager, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -116338,14 +128404,17 @@ func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronS obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec) if err != nil { + err = core.SDKErrorf(err, "", "cron_spec-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManagerPrototype) if err != nil { + err = core.SDKErrorf(err, "", "manager-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -116371,6 +128440,9 @@ func (*VpcV1) NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRu Group: group, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -116391,14 +128463,17 @@ func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "run_at", &obj.RunAt) if err != nil { + err = core.SDKErrorf(err, "", "run_at-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupPrototype) if err != nil { + err = core.SDKErrorf(err, "", "group-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -116424,6 +128499,9 @@ func (*VpcV1) NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRu Manager: manager, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -116444,14 +128522,17 @@ func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "run_at", &obj.RunAt) if err != nil { + err = core.SDKErrorf(err, "", "run_at-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManagerPrototype) if err != nil { + err = core.SDKErrorf(err, "", "manager-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -116471,7 +128552,7 @@ type VpcsPager struct { // NewVpcsPager returns a new VpcsPager instance. func (vpc *VpcV1) NewVpcsPager(options *ListVpcsOptions) (pager *VpcsPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -116499,6 +128580,7 @@ func (pager *VpcsPager) GetNextWithContext(ctx context.Context) (page []VPC, err result, _, err := pager.client.ListVpcsWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -116507,7 +128589,8 @@ func (pager *VpcsPager) GetNextWithContext(ctx context.Context) (page []VPC, err var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -116526,6 +128609,7 @@ func (pager *VpcsPager) GetAllWithContext(ctx context.Context) (allItems []VPC, var nextPage []VPC nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -116535,12 +128619,16 @@ func (pager *VpcsPager) GetAllWithContext(ctx context.Context) (allItems []VPC, // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *VpcsPager) GetNext() (page []VPC, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *VpcsPager) GetAll() (allItems []VPC, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // VPCAddressPrefixesPager can be used to simplify the use of the "ListVPCAddressPrefixes" method. @@ -116556,7 +128644,7 @@ type VPCAddressPrefixesPager struct { // NewVPCAddressPrefixesPager returns a new VPCAddressPrefixesPager instance. func (vpc *VpcV1) NewVPCAddressPrefixesPager(options *ListVPCAddressPrefixesOptions) (pager *VPCAddressPrefixesPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -116584,6 +128672,7 @@ func (pager *VPCAddressPrefixesPager) GetNextWithContext(ctx context.Context) (p result, _, err := pager.client.ListVPCAddressPrefixesWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -116592,7 +128681,8 @@ func (pager *VPCAddressPrefixesPager) GetNextWithContext(ctx context.Context) (p var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -116611,6 +128701,7 @@ func (pager *VPCAddressPrefixesPager) GetAllWithContext(ctx context.Context) (al var nextPage []AddressPrefix nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -116620,12 +128711,16 @@ func (pager *VPCAddressPrefixesPager) GetAllWithContext(ctx context.Context) (al // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *VPCAddressPrefixesPager) GetNext() (page []AddressPrefix, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *VPCAddressPrefixesPager) GetAll() (allItems []AddressPrefix, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // VPCDnsResolutionBindingsPager can be used to simplify the use of the "ListVPCDnsResolutionBindings" method. @@ -116641,7 +128736,7 @@ type VPCDnsResolutionBindingsPager struct { // NewVPCDnsResolutionBindingsPager returns a new VPCDnsResolutionBindingsPager instance. func (vpc *VpcV1) NewVPCDnsResolutionBindingsPager(options *ListVPCDnsResolutionBindingsOptions) (pager *VPCDnsResolutionBindingsPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -116669,6 +128764,7 @@ func (pager *VPCDnsResolutionBindingsPager) GetNextWithContext(ctx context.Conte result, _, err := pager.client.ListVPCDnsResolutionBindingsWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -116677,7 +128773,8 @@ func (pager *VPCDnsResolutionBindingsPager) GetNextWithContext(ctx context.Conte var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -116696,6 +128793,7 @@ func (pager *VPCDnsResolutionBindingsPager) GetAllWithContext(ctx context.Contex var nextPage []VpcdnsResolutionBinding nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -116705,12 +128803,16 @@ func (pager *VPCDnsResolutionBindingsPager) GetAllWithContext(ctx context.Contex // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *VPCDnsResolutionBindingsPager) GetNext() (page []VpcdnsResolutionBinding, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *VPCDnsResolutionBindingsPager) GetAll() (allItems []VpcdnsResolutionBinding, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // VPCRoutesPager can be used to simplify the use of the "ListVPCRoutes" method. @@ -116726,7 +128828,7 @@ type VPCRoutesPager struct { // NewVPCRoutesPager returns a new VPCRoutesPager instance. func (vpc *VpcV1) NewVPCRoutesPager(options *ListVPCRoutesOptions) (pager *VPCRoutesPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -116754,6 +128856,7 @@ func (pager *VPCRoutesPager) GetNextWithContext(ctx context.Context) (page []Rou result, _, err := pager.client.ListVPCRoutesWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -116762,7 +128865,8 @@ func (pager *VPCRoutesPager) GetNextWithContext(ctx context.Context) (page []Rou var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -116781,6 +128885,7 @@ func (pager *VPCRoutesPager) GetAllWithContext(ctx context.Context) (allItems [] var nextPage []RouteCollectionVPCContextRoutesItem nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -116790,12 +128895,16 @@ func (pager *VPCRoutesPager) GetAllWithContext(ctx context.Context) (allItems [] // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *VPCRoutesPager) GetNext() (page []RouteCollectionVPCContextRoutesItem, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *VPCRoutesPager) GetAll() (allItems []RouteCollectionVPCContextRoutesItem, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // VPCRoutingTablesPager can be used to simplify the use of the "ListVPCRoutingTables" method. @@ -116811,7 +128920,7 @@ type VPCRoutingTablesPager struct { // NewVPCRoutingTablesPager returns a new VPCRoutingTablesPager instance. func (vpc *VpcV1) NewVPCRoutingTablesPager(options *ListVPCRoutingTablesOptions) (pager *VPCRoutingTablesPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -116839,6 +128948,7 @@ func (pager *VPCRoutingTablesPager) GetNextWithContext(ctx context.Context) (pag result, _, err := pager.client.ListVPCRoutingTablesWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -116847,7 +128957,8 @@ func (pager *VPCRoutingTablesPager) GetNextWithContext(ctx context.Context) (pag var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -116866,6 +128977,7 @@ func (pager *VPCRoutingTablesPager) GetAllWithContext(ctx context.Context) (allI var nextPage []RoutingTable nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -116875,12 +128987,16 @@ func (pager *VPCRoutingTablesPager) GetAllWithContext(ctx context.Context) (allI // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *VPCRoutingTablesPager) GetNext() (page []RoutingTable, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *VPCRoutingTablesPager) GetAll() (allItems []RoutingTable, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // VPCRoutingTableRoutesPager can be used to simplify the use of the "ListVPCRoutingTableRoutes" method. @@ -116896,7 +129012,7 @@ type VPCRoutingTableRoutesPager struct { // NewVPCRoutingTableRoutesPager returns a new VPCRoutingTableRoutesPager instance. func (vpc *VpcV1) NewVPCRoutingTableRoutesPager(options *ListVPCRoutingTableRoutesOptions) (pager *VPCRoutingTableRoutesPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -116924,6 +129040,7 @@ func (pager *VPCRoutingTableRoutesPager) GetNextWithContext(ctx context.Context) result, _, err := pager.client.ListVPCRoutingTableRoutesWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -116932,7 +129049,8 @@ func (pager *VPCRoutingTableRoutesPager) GetNextWithContext(ctx context.Context) var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -116951,6 +129069,7 @@ func (pager *VPCRoutingTableRoutesPager) GetAllWithContext(ctx context.Context) var nextPage []Route nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -116960,12 +129079,16 @@ func (pager *VPCRoutingTableRoutesPager) GetAllWithContext(ctx context.Context) // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *VPCRoutingTableRoutesPager) GetNext() (page []Route, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *VPCRoutingTableRoutesPager) GetAll() (allItems []Route, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // SubnetsPager can be used to simplify the use of the "ListSubnets" method. @@ -116981,7 +129104,7 @@ type SubnetsPager struct { // NewSubnetsPager returns a new SubnetsPager instance. func (vpc *VpcV1) NewSubnetsPager(options *ListSubnetsOptions) (pager *SubnetsPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -117009,6 +129132,7 @@ func (pager *SubnetsPager) GetNextWithContext(ctx context.Context) (page []Subne result, _, err := pager.client.ListSubnetsWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -117017,7 +129141,8 @@ func (pager *SubnetsPager) GetNextWithContext(ctx context.Context) (page []Subne var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -117036,6 +129161,7 @@ func (pager *SubnetsPager) GetAllWithContext(ctx context.Context) (allItems []Su var nextPage []Subnet nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -117045,12 +129171,16 @@ func (pager *SubnetsPager) GetAllWithContext(ctx context.Context) (allItems []Su // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *SubnetsPager) GetNext() (page []Subnet, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *SubnetsPager) GetAll() (allItems []Subnet, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // SubnetReservedIpsPager can be used to simplify the use of the "ListSubnetReservedIps" method. @@ -117066,7 +129196,7 @@ type SubnetReservedIpsPager struct { // NewSubnetReservedIpsPager returns a new SubnetReservedIpsPager instance. func (vpc *VpcV1) NewSubnetReservedIpsPager(options *ListSubnetReservedIpsOptions) (pager *SubnetReservedIpsPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -117094,6 +129224,7 @@ func (pager *SubnetReservedIpsPager) GetNextWithContext(ctx context.Context) (pa result, _, err := pager.client.ListSubnetReservedIpsWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -117102,7 +129233,8 @@ func (pager *SubnetReservedIpsPager) GetNextWithContext(ctx context.Context) (pa var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -117121,6 +129253,7 @@ func (pager *SubnetReservedIpsPager) GetAllWithContext(ctx context.Context) (all var nextPage []ReservedIP nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -117130,12 +129263,16 @@ func (pager *SubnetReservedIpsPager) GetAllWithContext(ctx context.Context) (all // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *SubnetReservedIpsPager) GetNext() (page []ReservedIP, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *SubnetReservedIpsPager) GetAll() (allItems []ReservedIP, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // ImagesPager can be used to simplify the use of the "ListImages" method. @@ -117151,7 +129288,7 @@ type ImagesPager struct { // NewImagesPager returns a new ImagesPager instance. func (vpc *VpcV1) NewImagesPager(options *ListImagesOptions) (pager *ImagesPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -117179,6 +129316,7 @@ func (pager *ImagesPager) GetNextWithContext(ctx context.Context) (page []Image, result, _, err := pager.client.ListImagesWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -117187,7 +129325,8 @@ func (pager *ImagesPager) GetNextWithContext(ctx context.Context) (page []Image, var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -117206,6 +129345,7 @@ func (pager *ImagesPager) GetAllWithContext(ctx context.Context) (allItems []Ima var nextPage []Image nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -117215,12 +129355,16 @@ func (pager *ImagesPager) GetAllWithContext(ctx context.Context) (allItems []Ima // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *ImagesPager) GetNext() (page []Image, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *ImagesPager) GetAll() (allItems []Image, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // OperatingSystemsPager can be used to simplify the use of the "ListOperatingSystems" method. @@ -117236,7 +129380,7 @@ type OperatingSystemsPager struct { // NewOperatingSystemsPager returns a new OperatingSystemsPager instance. func (vpc *VpcV1) NewOperatingSystemsPager(options *ListOperatingSystemsOptions) (pager *OperatingSystemsPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -117264,6 +129408,7 @@ func (pager *OperatingSystemsPager) GetNextWithContext(ctx context.Context) (pag result, _, err := pager.client.ListOperatingSystemsWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -117272,7 +129417,8 @@ func (pager *OperatingSystemsPager) GetNextWithContext(ctx context.Context) (pag var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -117291,6 +129437,7 @@ func (pager *OperatingSystemsPager) GetAllWithContext(ctx context.Context) (allI var nextPage []OperatingSystem nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -117300,12 +129447,16 @@ func (pager *OperatingSystemsPager) GetAllWithContext(ctx context.Context) (allI // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *OperatingSystemsPager) GetNext() (page []OperatingSystem, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *OperatingSystemsPager) GetAll() (allItems []OperatingSystem, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // KeysPager can be used to simplify the use of the "ListKeys" method. @@ -117321,7 +129472,7 @@ type KeysPager struct { // NewKeysPager returns a new KeysPager instance. func (vpc *VpcV1) NewKeysPager(options *ListKeysOptions) (pager *KeysPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -117349,6 +129500,7 @@ func (pager *KeysPager) GetNextWithContext(ctx context.Context) (page []Key, err result, _, err := pager.client.ListKeysWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -117357,7 +129509,8 @@ func (pager *KeysPager) GetNextWithContext(ctx context.Context) (page []Key, err var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -117376,6 +129529,7 @@ func (pager *KeysPager) GetAllWithContext(ctx context.Context) (allItems []Key, var nextPage []Key nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -117385,12 +129539,16 @@ func (pager *KeysPager) GetAllWithContext(ctx context.Context) (allItems []Key, // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *KeysPager) GetNext() (page []Key, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *KeysPager) GetAll() (allItems []Key, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // InstancesPager can be used to simplify the use of the "ListInstances" method. @@ -117406,7 +129564,7 @@ type InstancesPager struct { // NewInstancesPager returns a new InstancesPager instance. func (vpc *VpcV1) NewInstancesPager(options *ListInstancesOptions) (pager *InstancesPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -117434,6 +129592,7 @@ func (pager *InstancesPager) GetNextWithContext(ctx context.Context) (page []Ins result, _, err := pager.client.ListInstancesWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -117442,7 +129601,8 @@ func (pager *InstancesPager) GetNextWithContext(ctx context.Context) (page []Ins var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -117461,6 +129621,7 @@ func (pager *InstancesPager) GetAllWithContext(ctx context.Context) (allItems [] var nextPage []Instance nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -117470,12 +129631,16 @@ func (pager *InstancesPager) GetAllWithContext(ctx context.Context) (allItems [] // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *InstancesPager) GetNext() (page []Instance, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *InstancesPager) GetAll() (allItems []Instance, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // InstanceNetworkInterfaceIpsPager can be used to simplify the use of the "ListInstanceNetworkInterfaceIps" method. @@ -117491,7 +129656,7 @@ type InstanceNetworkInterfaceIpsPager struct { // NewInstanceNetworkInterfaceIpsPager returns a new InstanceNetworkInterfaceIpsPager instance. func (vpc *VpcV1) NewInstanceNetworkInterfaceIpsPager(options *ListInstanceNetworkInterfaceIpsOptions) (pager *InstanceNetworkInterfaceIpsPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -117519,6 +129684,7 @@ func (pager *InstanceNetworkInterfaceIpsPager) GetNextWithContext(ctx context.Co result, _, err := pager.client.ListInstanceNetworkInterfaceIpsWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -117527,7 +129693,8 @@ func (pager *InstanceNetworkInterfaceIpsPager) GetNextWithContext(ctx context.Co var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -117546,6 +129713,7 @@ func (pager *InstanceNetworkInterfaceIpsPager) GetAllWithContext(ctx context.Con var nextPage []ReservedIP nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -117555,12 +129723,16 @@ func (pager *InstanceNetworkInterfaceIpsPager) GetAllWithContext(ctx context.Con // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *InstanceNetworkInterfaceIpsPager) GetNext() (page []ReservedIP, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *InstanceNetworkInterfaceIpsPager) GetAll() (allItems []ReservedIP, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // InstanceGroupsPager can be used to simplify the use of the "ListInstanceGroups" method. @@ -117576,7 +129748,7 @@ type InstanceGroupsPager struct { // NewInstanceGroupsPager returns a new InstanceGroupsPager instance. func (vpc *VpcV1) NewInstanceGroupsPager(options *ListInstanceGroupsOptions) (pager *InstanceGroupsPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -117604,6 +129776,7 @@ func (pager *InstanceGroupsPager) GetNextWithContext(ctx context.Context) (page result, _, err := pager.client.ListInstanceGroupsWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -117612,7 +129785,8 @@ func (pager *InstanceGroupsPager) GetNextWithContext(ctx context.Context) (page var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -117631,6 +129805,7 @@ func (pager *InstanceGroupsPager) GetAllWithContext(ctx context.Context) (allIte var nextPage []InstanceGroup nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -117640,12 +129815,16 @@ func (pager *InstanceGroupsPager) GetAllWithContext(ctx context.Context) (allIte // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *InstanceGroupsPager) GetNext() (page []InstanceGroup, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *InstanceGroupsPager) GetAll() (allItems []InstanceGroup, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // InstanceGroupManagersPager can be used to simplify the use of the "ListInstanceGroupManagers" method. @@ -117661,7 +129840,7 @@ type InstanceGroupManagersPager struct { // NewInstanceGroupManagersPager returns a new InstanceGroupManagersPager instance. func (vpc *VpcV1) NewInstanceGroupManagersPager(options *ListInstanceGroupManagersOptions) (pager *InstanceGroupManagersPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -117689,6 +129868,7 @@ func (pager *InstanceGroupManagersPager) GetNextWithContext(ctx context.Context) result, _, err := pager.client.ListInstanceGroupManagersWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -117697,7 +129877,8 @@ func (pager *InstanceGroupManagersPager) GetNextWithContext(ctx context.Context) var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -117716,6 +129897,7 @@ func (pager *InstanceGroupManagersPager) GetAllWithContext(ctx context.Context) var nextPage []InstanceGroupManagerIntf nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -117725,12 +129907,16 @@ func (pager *InstanceGroupManagersPager) GetAllWithContext(ctx context.Context) // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *InstanceGroupManagersPager) GetNext() (page []InstanceGroupManagerIntf, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *InstanceGroupManagersPager) GetAll() (allItems []InstanceGroupManagerIntf, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // InstanceGroupManagerActionsPager can be used to simplify the use of the "ListInstanceGroupManagerActions" method. @@ -117746,7 +129932,7 @@ type InstanceGroupManagerActionsPager struct { // NewInstanceGroupManagerActionsPager returns a new InstanceGroupManagerActionsPager instance. func (vpc *VpcV1) NewInstanceGroupManagerActionsPager(options *ListInstanceGroupManagerActionsOptions) (pager *InstanceGroupManagerActionsPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -117774,6 +129960,7 @@ func (pager *InstanceGroupManagerActionsPager) GetNextWithContext(ctx context.Co result, _, err := pager.client.ListInstanceGroupManagerActionsWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -117782,7 +129969,8 @@ func (pager *InstanceGroupManagerActionsPager) GetNextWithContext(ctx context.Co var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -117801,6 +129989,7 @@ func (pager *InstanceGroupManagerActionsPager) GetAllWithContext(ctx context.Con var nextPage []InstanceGroupManagerActionIntf nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -117810,12 +129999,16 @@ func (pager *InstanceGroupManagerActionsPager) GetAllWithContext(ctx context.Con // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *InstanceGroupManagerActionsPager) GetNext() (page []InstanceGroupManagerActionIntf, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *InstanceGroupManagerActionsPager) GetAll() (allItems []InstanceGroupManagerActionIntf, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // InstanceGroupManagerPoliciesPager can be used to simplify the use of the "ListInstanceGroupManagerPolicies" method. @@ -117831,7 +130024,7 @@ type InstanceGroupManagerPoliciesPager struct { // NewInstanceGroupManagerPoliciesPager returns a new InstanceGroupManagerPoliciesPager instance. func (vpc *VpcV1) NewInstanceGroupManagerPoliciesPager(options *ListInstanceGroupManagerPoliciesOptions) (pager *InstanceGroupManagerPoliciesPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -117859,6 +130052,7 @@ func (pager *InstanceGroupManagerPoliciesPager) GetNextWithContext(ctx context.C result, _, err := pager.client.ListInstanceGroupManagerPoliciesWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -117867,7 +130061,8 @@ func (pager *InstanceGroupManagerPoliciesPager) GetNextWithContext(ctx context.C var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -117886,6 +130081,7 @@ func (pager *InstanceGroupManagerPoliciesPager) GetAllWithContext(ctx context.Co var nextPage []InstanceGroupManagerPolicyIntf nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -117895,12 +130091,16 @@ func (pager *InstanceGroupManagerPoliciesPager) GetAllWithContext(ctx context.Co // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *InstanceGroupManagerPoliciesPager) GetNext() (page []InstanceGroupManagerPolicyIntf, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *InstanceGroupManagerPoliciesPager) GetAll() (allItems []InstanceGroupManagerPolicyIntf, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // InstanceGroupMembershipsPager can be used to simplify the use of the "ListInstanceGroupMemberships" method. @@ -117916,7 +130116,7 @@ type InstanceGroupMembershipsPager struct { // NewInstanceGroupMembershipsPager returns a new InstanceGroupMembershipsPager instance. func (vpc *VpcV1) NewInstanceGroupMembershipsPager(options *ListInstanceGroupMembershipsOptions) (pager *InstanceGroupMembershipsPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -117944,6 +130144,7 @@ func (pager *InstanceGroupMembershipsPager) GetNextWithContext(ctx context.Conte result, _, err := pager.client.ListInstanceGroupMembershipsWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -117952,7 +130153,8 @@ func (pager *InstanceGroupMembershipsPager) GetNextWithContext(ctx context.Conte var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -117971,6 +130173,7 @@ func (pager *InstanceGroupMembershipsPager) GetAllWithContext(ctx context.Contex var nextPage []InstanceGroupMembership nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -117980,12 +130183,16 @@ func (pager *InstanceGroupMembershipsPager) GetAllWithContext(ctx context.Contex // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *InstanceGroupMembershipsPager) GetNext() (page []InstanceGroupMembership, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *InstanceGroupMembershipsPager) GetAll() (allItems []InstanceGroupMembership, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // ReservationsPager can be used to simplify the use of the "ListReservations" method. @@ -118001,7 +130208,7 @@ type ReservationsPager struct { // NewReservationsPager returns a new ReservationsPager instance. func (vpc *VpcV1) NewReservationsPager(options *ListReservationsOptions) (pager *ReservationsPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -118029,6 +130236,7 @@ func (pager *ReservationsPager) GetNextWithContext(ctx context.Context) (page [] result, _, err := pager.client.ListReservationsWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -118037,7 +130245,8 @@ func (pager *ReservationsPager) GetNextWithContext(ctx context.Context) (page [] var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -118056,6 +130265,7 @@ func (pager *ReservationsPager) GetAllWithContext(ctx context.Context) (allItems var nextPage []Reservation nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -118065,12 +130275,16 @@ func (pager *ReservationsPager) GetAllWithContext(ctx context.Context) (allItems // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *ReservationsPager) GetNext() (page []Reservation, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *ReservationsPager) GetAll() (allItems []Reservation, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // DedicatedHostGroupsPager can be used to simplify the use of the "ListDedicatedHostGroups" method. @@ -118086,7 +130300,7 @@ type DedicatedHostGroupsPager struct { // NewDedicatedHostGroupsPager returns a new DedicatedHostGroupsPager instance. func (vpc *VpcV1) NewDedicatedHostGroupsPager(options *ListDedicatedHostGroupsOptions) (pager *DedicatedHostGroupsPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -118114,6 +130328,7 @@ func (pager *DedicatedHostGroupsPager) GetNextWithContext(ctx context.Context) ( result, _, err := pager.client.ListDedicatedHostGroupsWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -118122,7 +130337,8 @@ func (pager *DedicatedHostGroupsPager) GetNextWithContext(ctx context.Context) ( var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -118141,6 +130357,7 @@ func (pager *DedicatedHostGroupsPager) GetAllWithContext(ctx context.Context) (a var nextPage []DedicatedHostGroup nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -118150,12 +130367,16 @@ func (pager *DedicatedHostGroupsPager) GetAllWithContext(ctx context.Context) (a // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *DedicatedHostGroupsPager) GetNext() (page []DedicatedHostGroup, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *DedicatedHostGroupsPager) GetAll() (allItems []DedicatedHostGroup, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // DedicatedHostProfilesPager can be used to simplify the use of the "ListDedicatedHostProfiles" method. @@ -118171,7 +130392,7 @@ type DedicatedHostProfilesPager struct { // NewDedicatedHostProfilesPager returns a new DedicatedHostProfilesPager instance. func (vpc *VpcV1) NewDedicatedHostProfilesPager(options *ListDedicatedHostProfilesOptions) (pager *DedicatedHostProfilesPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -118199,6 +130420,7 @@ func (pager *DedicatedHostProfilesPager) GetNextWithContext(ctx context.Context) result, _, err := pager.client.ListDedicatedHostProfilesWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -118207,7 +130429,8 @@ func (pager *DedicatedHostProfilesPager) GetNextWithContext(ctx context.Context) var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -118226,6 +130449,7 @@ func (pager *DedicatedHostProfilesPager) GetAllWithContext(ctx context.Context) var nextPage []DedicatedHostProfile nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -118235,12 +130459,16 @@ func (pager *DedicatedHostProfilesPager) GetAllWithContext(ctx context.Context) // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *DedicatedHostProfilesPager) GetNext() (page []DedicatedHostProfile, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *DedicatedHostProfilesPager) GetAll() (allItems []DedicatedHostProfile, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // DedicatedHostsPager can be used to simplify the use of the "ListDedicatedHosts" method. @@ -118256,7 +130484,7 @@ type DedicatedHostsPager struct { // NewDedicatedHostsPager returns a new DedicatedHostsPager instance. func (vpc *VpcV1) NewDedicatedHostsPager(options *ListDedicatedHostsOptions) (pager *DedicatedHostsPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -118284,6 +130512,7 @@ func (pager *DedicatedHostsPager) GetNextWithContext(ctx context.Context) (page result, _, err := pager.client.ListDedicatedHostsWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -118292,7 +130521,8 @@ func (pager *DedicatedHostsPager) GetNextWithContext(ctx context.Context) (page var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -118311,6 +130541,7 @@ func (pager *DedicatedHostsPager) GetAllWithContext(ctx context.Context) (allIte var nextPage []DedicatedHost nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -118320,12 +130551,16 @@ func (pager *DedicatedHostsPager) GetAllWithContext(ctx context.Context) (allIte // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *DedicatedHostsPager) GetNext() (page []DedicatedHost, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *DedicatedHostsPager) GetAll() (allItems []DedicatedHost, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // PlacementGroupsPager can be used to simplify the use of the "ListPlacementGroups" method. @@ -118341,7 +130576,7 @@ type PlacementGroupsPager struct { // NewPlacementGroupsPager returns a new PlacementGroupsPager instance. func (vpc *VpcV1) NewPlacementGroupsPager(options *ListPlacementGroupsOptions) (pager *PlacementGroupsPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -118369,6 +130604,7 @@ func (pager *PlacementGroupsPager) GetNextWithContext(ctx context.Context) (page result, _, err := pager.client.ListPlacementGroupsWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -118377,7 +130613,8 @@ func (pager *PlacementGroupsPager) GetNextWithContext(ctx context.Context) (page var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -118396,6 +130633,7 @@ func (pager *PlacementGroupsPager) GetAllWithContext(ctx context.Context) (allIt var nextPage []PlacementGroup nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -118405,12 +130643,16 @@ func (pager *PlacementGroupsPager) GetAllWithContext(ctx context.Context) (allIt // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *PlacementGroupsPager) GetNext() (page []PlacementGroup, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *PlacementGroupsPager) GetAll() (allItems []PlacementGroup, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // BareMetalServerProfilesPager can be used to simplify the use of the "ListBareMetalServerProfiles" method. @@ -118426,7 +130668,7 @@ type BareMetalServerProfilesPager struct { // NewBareMetalServerProfilesPager returns a new BareMetalServerProfilesPager instance. func (vpc *VpcV1) NewBareMetalServerProfilesPager(options *ListBareMetalServerProfilesOptions) (pager *BareMetalServerProfilesPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -118454,6 +130696,7 @@ func (pager *BareMetalServerProfilesPager) GetNextWithContext(ctx context.Contex result, _, err := pager.client.ListBareMetalServerProfilesWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -118462,7 +130705,8 @@ func (pager *BareMetalServerProfilesPager) GetNextWithContext(ctx context.Contex var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -118481,6 +130725,7 @@ func (pager *BareMetalServerProfilesPager) GetAllWithContext(ctx context.Context var nextPage []BareMetalServerProfile nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -118490,12 +130735,16 @@ func (pager *BareMetalServerProfilesPager) GetAllWithContext(ctx context.Context // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *BareMetalServerProfilesPager) GetNext() (page []BareMetalServerProfile, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *BareMetalServerProfilesPager) GetAll() (allItems []BareMetalServerProfile, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // BareMetalServersPager can be used to simplify the use of the "ListBareMetalServers" method. @@ -118511,7 +130760,7 @@ type BareMetalServersPager struct { // NewBareMetalServersPager returns a new BareMetalServersPager instance. func (vpc *VpcV1) NewBareMetalServersPager(options *ListBareMetalServersOptions) (pager *BareMetalServersPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -118539,6 +130788,7 @@ func (pager *BareMetalServersPager) GetNextWithContext(ctx context.Context) (pag result, _, err := pager.client.ListBareMetalServersWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -118547,7 +130797,8 @@ func (pager *BareMetalServersPager) GetNextWithContext(ctx context.Context) (pag var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -118566,6 +130817,7 @@ func (pager *BareMetalServersPager) GetAllWithContext(ctx context.Context) (allI var nextPage []BareMetalServer nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -118575,12 +130827,16 @@ func (pager *BareMetalServersPager) GetAllWithContext(ctx context.Context) (allI // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *BareMetalServersPager) GetNext() (page []BareMetalServer, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *BareMetalServersPager) GetAll() (allItems []BareMetalServer, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // BareMetalServerNetworkAttachmentsPager can be used to simplify the use of the "ListBareMetalServerNetworkAttachments" method. @@ -118596,7 +130852,7 @@ type BareMetalServerNetworkAttachmentsPager struct { // NewBareMetalServerNetworkAttachmentsPager returns a new BareMetalServerNetworkAttachmentsPager instance. func (vpc *VpcV1) NewBareMetalServerNetworkAttachmentsPager(options *ListBareMetalServerNetworkAttachmentsOptions) (pager *BareMetalServerNetworkAttachmentsPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -118624,6 +130880,7 @@ func (pager *BareMetalServerNetworkAttachmentsPager) GetNextWithContext(ctx cont result, _, err := pager.client.ListBareMetalServerNetworkAttachmentsWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -118632,7 +130889,8 @@ func (pager *BareMetalServerNetworkAttachmentsPager) GetNextWithContext(ctx cont var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -118651,6 +130909,7 @@ func (pager *BareMetalServerNetworkAttachmentsPager) GetAllWithContext(ctx conte var nextPage []BareMetalServerNetworkAttachmentIntf nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -118660,12 +130919,16 @@ func (pager *BareMetalServerNetworkAttachmentsPager) GetAllWithContext(ctx conte // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *BareMetalServerNetworkAttachmentsPager) GetNext() (page []BareMetalServerNetworkAttachmentIntf, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *BareMetalServerNetworkAttachmentsPager) GetAll() (allItems []BareMetalServerNetworkAttachmentIntf, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // BareMetalServerNetworkInterfacesPager can be used to simplify the use of the "ListBareMetalServerNetworkInterfaces" method. @@ -118681,7 +130944,7 @@ type BareMetalServerNetworkInterfacesPager struct { // NewBareMetalServerNetworkInterfacesPager returns a new BareMetalServerNetworkInterfacesPager instance. func (vpc *VpcV1) NewBareMetalServerNetworkInterfacesPager(options *ListBareMetalServerNetworkInterfacesOptions) (pager *BareMetalServerNetworkInterfacesPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -118709,6 +130972,7 @@ func (pager *BareMetalServerNetworkInterfacesPager) GetNextWithContext(ctx conte result, _, err := pager.client.ListBareMetalServerNetworkInterfacesWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -118717,7 +130981,8 @@ func (pager *BareMetalServerNetworkInterfacesPager) GetNextWithContext(ctx conte var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -118736,6 +131001,7 @@ func (pager *BareMetalServerNetworkInterfacesPager) GetAllWithContext(ctx contex var nextPage []BareMetalServerNetworkInterfaceIntf nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -118745,12 +131011,16 @@ func (pager *BareMetalServerNetworkInterfacesPager) GetAllWithContext(ctx contex // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *BareMetalServerNetworkInterfacesPager) GetNext() (page []BareMetalServerNetworkInterfaceIntf, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *BareMetalServerNetworkInterfacesPager) GetAll() (allItems []BareMetalServerNetworkInterfaceIntf, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // VolumeProfilesPager can be used to simplify the use of the "ListVolumeProfiles" method. @@ -118766,7 +131036,7 @@ type VolumeProfilesPager struct { // NewVolumeProfilesPager returns a new VolumeProfilesPager instance. func (vpc *VpcV1) NewVolumeProfilesPager(options *ListVolumeProfilesOptions) (pager *VolumeProfilesPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -118794,6 +131064,7 @@ func (pager *VolumeProfilesPager) GetNextWithContext(ctx context.Context) (page result, _, err := pager.client.ListVolumeProfilesWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -118802,7 +131073,8 @@ func (pager *VolumeProfilesPager) GetNextWithContext(ctx context.Context) (page var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -118821,6 +131093,7 @@ func (pager *VolumeProfilesPager) GetAllWithContext(ctx context.Context) (allIte var nextPage []VolumeProfile nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -118830,12 +131103,16 @@ func (pager *VolumeProfilesPager) GetAllWithContext(ctx context.Context) (allIte // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *VolumeProfilesPager) GetNext() (page []VolumeProfile, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *VolumeProfilesPager) GetAll() (allItems []VolumeProfile, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // VolumesPager can be used to simplify the use of the "ListVolumes" method. @@ -118851,7 +131128,7 @@ type VolumesPager struct { // NewVolumesPager returns a new VolumesPager instance. func (vpc *VpcV1) NewVolumesPager(options *ListVolumesOptions) (pager *VolumesPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -118879,6 +131156,7 @@ func (pager *VolumesPager) GetNextWithContext(ctx context.Context) (page []Volum result, _, err := pager.client.ListVolumesWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -118887,7 +131165,8 @@ func (pager *VolumesPager) GetNextWithContext(ctx context.Context) (page []Volum var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -118906,6 +131185,7 @@ func (pager *VolumesPager) GetAllWithContext(ctx context.Context) (allItems []Vo var nextPage []Volume nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -118915,12 +131195,16 @@ func (pager *VolumesPager) GetAllWithContext(ctx context.Context) (allItems []Vo // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *VolumesPager) GetNext() (page []Volume, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *VolumesPager) GetAll() (allItems []Volume, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // SnapshotConsistencyGroupsPager can be used to simplify the use of the "ListSnapshotConsistencyGroups" method. @@ -118936,7 +131220,7 @@ type SnapshotConsistencyGroupsPager struct { // NewSnapshotConsistencyGroupsPager returns a new SnapshotConsistencyGroupsPager instance. func (vpc *VpcV1) NewSnapshotConsistencyGroupsPager(options *ListSnapshotConsistencyGroupsOptions) (pager *SnapshotConsistencyGroupsPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -118964,6 +131248,7 @@ func (pager *SnapshotConsistencyGroupsPager) GetNextWithContext(ctx context.Cont result, _, err := pager.client.ListSnapshotConsistencyGroupsWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -118972,7 +131257,8 @@ func (pager *SnapshotConsistencyGroupsPager) GetNextWithContext(ctx context.Cont var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -118991,6 +131277,7 @@ func (pager *SnapshotConsistencyGroupsPager) GetAllWithContext(ctx context.Conte var nextPage []SnapshotConsistencyGroup nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -119000,12 +131287,16 @@ func (pager *SnapshotConsistencyGroupsPager) GetAllWithContext(ctx context.Conte // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *SnapshotConsistencyGroupsPager) GetNext() (page []SnapshotConsistencyGroup, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *SnapshotConsistencyGroupsPager) GetAll() (allItems []SnapshotConsistencyGroup, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // SnapshotsPager can be used to simplify the use of the "ListSnapshots" method. @@ -119021,7 +131312,7 @@ type SnapshotsPager struct { // NewSnapshotsPager returns a new SnapshotsPager instance. func (vpc *VpcV1) NewSnapshotsPager(options *ListSnapshotsOptions) (pager *SnapshotsPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -119049,6 +131340,7 @@ func (pager *SnapshotsPager) GetNextWithContext(ctx context.Context) (page []Sna result, _, err := pager.client.ListSnapshotsWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -119057,7 +131349,8 @@ func (pager *SnapshotsPager) GetNextWithContext(ctx context.Context) (page []Sna var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -119076,6 +131369,7 @@ func (pager *SnapshotsPager) GetAllWithContext(ctx context.Context) (allItems [] var nextPage []Snapshot nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -119085,12 +131379,16 @@ func (pager *SnapshotsPager) GetAllWithContext(ctx context.Context) (allItems [] // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *SnapshotsPager) GetNext() (page []Snapshot, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *SnapshotsPager) GetAll() (allItems []Snapshot, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // ShareProfilesPager can be used to simplify the use of the "ListShareProfiles" method. @@ -119106,7 +131404,7 @@ type ShareProfilesPager struct { // NewShareProfilesPager returns a new ShareProfilesPager instance. func (vpc *VpcV1) NewShareProfilesPager(options *ListShareProfilesOptions) (pager *ShareProfilesPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -119134,6 +131432,7 @@ func (pager *ShareProfilesPager) GetNextWithContext(ctx context.Context) (page [ result, _, err := pager.client.ListShareProfilesWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -119142,7 +131441,8 @@ func (pager *ShareProfilesPager) GetNextWithContext(ctx context.Context) (page [ var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -119161,6 +131461,7 @@ func (pager *ShareProfilesPager) GetAllWithContext(ctx context.Context) (allItem var nextPage []ShareProfile nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -119170,12 +131471,16 @@ func (pager *ShareProfilesPager) GetAllWithContext(ctx context.Context) (allItem // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *ShareProfilesPager) GetNext() (page []ShareProfile, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *ShareProfilesPager) GetAll() (allItems []ShareProfile, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // SharesPager can be used to simplify the use of the "ListShares" method. @@ -119191,7 +131496,7 @@ type SharesPager struct { // NewSharesPager returns a new SharesPager instance. func (vpc *VpcV1) NewSharesPager(options *ListSharesOptions) (pager *SharesPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -119219,6 +131524,7 @@ func (pager *SharesPager) GetNextWithContext(ctx context.Context) (page []Share, result, _, err := pager.client.ListSharesWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -119227,7 +131533,8 @@ func (pager *SharesPager) GetNextWithContext(ctx context.Context) (page []Share, var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -119246,6 +131553,7 @@ func (pager *SharesPager) GetAllWithContext(ctx context.Context) (allItems []Sha var nextPage []Share nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -119255,12 +131563,16 @@ func (pager *SharesPager) GetAllWithContext(ctx context.Context) (allItems []Sha // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *SharesPager) GetNext() (page []Share, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *SharesPager) GetAll() (allItems []Share, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // ShareMountTargetsPager can be used to simplify the use of the "ListShareMountTargets" method. @@ -119276,7 +131588,7 @@ type ShareMountTargetsPager struct { // NewShareMountTargetsPager returns a new ShareMountTargetsPager instance. func (vpc *VpcV1) NewShareMountTargetsPager(options *ListShareMountTargetsOptions) (pager *ShareMountTargetsPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -119304,6 +131616,7 @@ func (pager *ShareMountTargetsPager) GetNextWithContext(ctx context.Context) (pa result, _, err := pager.client.ListShareMountTargetsWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -119312,7 +131625,8 @@ func (pager *ShareMountTargetsPager) GetNextWithContext(ctx context.Context) (pa var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -119331,6 +131645,7 @@ func (pager *ShareMountTargetsPager) GetAllWithContext(ctx context.Context) (all var nextPage []ShareMountTarget nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -119340,12 +131655,16 @@ func (pager *ShareMountTargetsPager) GetAllWithContext(ctx context.Context) (all // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *ShareMountTargetsPager) GetNext() (page []ShareMountTarget, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *ShareMountTargetsPager) GetAll() (allItems []ShareMountTarget, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // BackupPoliciesPager can be used to simplify the use of the "ListBackupPolicies" method. @@ -119361,7 +131680,7 @@ type BackupPoliciesPager struct { // NewBackupPoliciesPager returns a new BackupPoliciesPager instance. func (vpc *VpcV1) NewBackupPoliciesPager(options *ListBackupPoliciesOptions) (pager *BackupPoliciesPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -119389,6 +131708,7 @@ func (pager *BackupPoliciesPager) GetNextWithContext(ctx context.Context) (page result, _, err := pager.client.ListBackupPoliciesWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -119397,7 +131717,8 @@ func (pager *BackupPoliciesPager) GetNextWithContext(ctx context.Context) (page var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -119416,6 +131737,7 @@ func (pager *BackupPoliciesPager) GetAllWithContext(ctx context.Context) (allIte var nextPage []BackupPolicyIntf nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -119425,12 +131747,16 @@ func (pager *BackupPoliciesPager) GetAllWithContext(ctx context.Context) (allIte // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *BackupPoliciesPager) GetNext() (page []BackupPolicyIntf, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *BackupPoliciesPager) GetAll() (allItems []BackupPolicyIntf, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // BackupPolicyJobsPager can be used to simplify the use of the "ListBackupPolicyJobs" method. @@ -119446,7 +131772,7 @@ type BackupPolicyJobsPager struct { // NewBackupPolicyJobsPager returns a new BackupPolicyJobsPager instance. func (vpc *VpcV1) NewBackupPolicyJobsPager(options *ListBackupPolicyJobsOptions) (pager *BackupPolicyJobsPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -119474,6 +131800,7 @@ func (pager *BackupPolicyJobsPager) GetNextWithContext(ctx context.Context) (pag result, _, err := pager.client.ListBackupPolicyJobsWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -119482,7 +131809,8 @@ func (pager *BackupPolicyJobsPager) GetNextWithContext(ctx context.Context) (pag var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -119501,6 +131829,7 @@ func (pager *BackupPolicyJobsPager) GetAllWithContext(ctx context.Context) (allI var nextPage []BackupPolicyJob nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -119510,12 +131839,16 @@ func (pager *BackupPolicyJobsPager) GetAllWithContext(ctx context.Context) (allI // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *BackupPolicyJobsPager) GetNext() (page []BackupPolicyJob, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *BackupPolicyJobsPager) GetAll() (allItems []BackupPolicyJob, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // VirtualNetworkInterfacesPager can be used to simplify the use of the "ListVirtualNetworkInterfaces" method. @@ -119531,7 +131864,7 @@ type VirtualNetworkInterfacesPager struct { // NewVirtualNetworkInterfacesPager returns a new VirtualNetworkInterfacesPager instance. func (vpc *VpcV1) NewVirtualNetworkInterfacesPager(options *ListVirtualNetworkInterfacesOptions) (pager *VirtualNetworkInterfacesPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -119559,6 +131892,7 @@ func (pager *VirtualNetworkInterfacesPager) GetNextWithContext(ctx context.Conte result, _, err := pager.client.ListVirtualNetworkInterfacesWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -119567,7 +131901,8 @@ func (pager *VirtualNetworkInterfacesPager) GetNextWithContext(ctx context.Conte var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -119586,6 +131921,7 @@ func (pager *VirtualNetworkInterfacesPager) GetAllWithContext(ctx context.Contex var nextPage []VirtualNetworkInterface nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -119595,12 +131931,16 @@ func (pager *VirtualNetworkInterfacesPager) GetAllWithContext(ctx context.Contex // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *VirtualNetworkInterfacesPager) GetNext() (page []VirtualNetworkInterface, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *VirtualNetworkInterfacesPager) GetAll() (allItems []VirtualNetworkInterface, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // NetworkInterfaceFloatingIpsPager can be used to simplify the use of the "ListNetworkInterfaceFloatingIps" method. @@ -119616,7 +131956,7 @@ type NetworkInterfaceFloatingIpsPager struct { // NewNetworkInterfaceFloatingIpsPager returns a new NetworkInterfaceFloatingIpsPager instance. func (vpc *VpcV1) NewNetworkInterfaceFloatingIpsPager(options *ListNetworkInterfaceFloatingIpsOptions) (pager *NetworkInterfaceFloatingIpsPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -119644,6 +131984,7 @@ func (pager *NetworkInterfaceFloatingIpsPager) GetNextWithContext(ctx context.Co result, _, err := pager.client.ListNetworkInterfaceFloatingIpsWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -119652,7 +131993,8 @@ func (pager *NetworkInterfaceFloatingIpsPager) GetNextWithContext(ctx context.Co var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -119671,6 +132013,7 @@ func (pager *NetworkInterfaceFloatingIpsPager) GetAllWithContext(ctx context.Con var nextPage []FloatingIPReference nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -119680,12 +132023,16 @@ func (pager *NetworkInterfaceFloatingIpsPager) GetAllWithContext(ctx context.Con // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *NetworkInterfaceFloatingIpsPager) GetNext() (page []FloatingIPReference, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *NetworkInterfaceFloatingIpsPager) GetAll() (allItems []FloatingIPReference, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // VirtualNetworkInterfaceIpsPager can be used to simplify the use of the "ListVirtualNetworkInterfaceIps" method. @@ -119701,7 +132048,7 @@ type VirtualNetworkInterfaceIpsPager struct { // NewVirtualNetworkInterfaceIpsPager returns a new VirtualNetworkInterfaceIpsPager instance. func (vpc *VpcV1) NewVirtualNetworkInterfaceIpsPager(options *ListVirtualNetworkInterfaceIpsOptions) (pager *VirtualNetworkInterfaceIpsPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -119729,6 +132076,7 @@ func (pager *VirtualNetworkInterfaceIpsPager) GetNextWithContext(ctx context.Con result, _, err := pager.client.ListVirtualNetworkInterfaceIpsWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -119737,7 +132085,8 @@ func (pager *VirtualNetworkInterfaceIpsPager) GetNextWithContext(ctx context.Con var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -119756,6 +132105,7 @@ func (pager *VirtualNetworkInterfaceIpsPager) GetAllWithContext(ctx context.Cont var nextPage []ReservedIPReference nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -119765,12 +132115,16 @@ func (pager *VirtualNetworkInterfaceIpsPager) GetAllWithContext(ctx context.Cont // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *VirtualNetworkInterfaceIpsPager) GetNext() (page []ReservedIPReference, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *VirtualNetworkInterfaceIpsPager) GetAll() (allItems []ReservedIPReference, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // PublicGatewaysPager can be used to simplify the use of the "ListPublicGateways" method. @@ -119786,7 +132140,7 @@ type PublicGatewaysPager struct { // NewPublicGatewaysPager returns a new PublicGatewaysPager instance. func (vpc *VpcV1) NewPublicGatewaysPager(options *ListPublicGatewaysOptions) (pager *PublicGatewaysPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -119814,6 +132168,7 @@ func (pager *PublicGatewaysPager) GetNextWithContext(ctx context.Context) (page result, _, err := pager.client.ListPublicGatewaysWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -119822,7 +132177,8 @@ func (pager *PublicGatewaysPager) GetNextWithContext(ctx context.Context) (page var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -119841,6 +132197,7 @@ func (pager *PublicGatewaysPager) GetAllWithContext(ctx context.Context) (allIte var nextPage []PublicGateway nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -119850,12 +132207,16 @@ func (pager *PublicGatewaysPager) GetAllWithContext(ctx context.Context) (allIte // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *PublicGatewaysPager) GetNext() (page []PublicGateway, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *PublicGatewaysPager) GetAll() (allItems []PublicGateway, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // FloatingIpsPager can be used to simplify the use of the "ListFloatingIps" method. @@ -119871,7 +132232,7 @@ type FloatingIpsPager struct { // NewFloatingIpsPager returns a new FloatingIpsPager instance. func (vpc *VpcV1) NewFloatingIpsPager(options *ListFloatingIpsOptions) (pager *FloatingIpsPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -119899,6 +132260,7 @@ func (pager *FloatingIpsPager) GetNextWithContext(ctx context.Context) (page []F result, _, err := pager.client.ListFloatingIpsWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -119907,7 +132269,8 @@ func (pager *FloatingIpsPager) GetNextWithContext(ctx context.Context) (page []F var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -119926,6 +132289,7 @@ func (pager *FloatingIpsPager) GetAllWithContext(ctx context.Context) (allItems var nextPage []FloatingIP nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -119935,12 +132299,16 @@ func (pager *FloatingIpsPager) GetAllWithContext(ctx context.Context) (allItems // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *FloatingIpsPager) GetNext() (page []FloatingIP, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *FloatingIpsPager) GetAll() (allItems []FloatingIP, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // NetworkAclsPager can be used to simplify the use of the "ListNetworkAcls" method. @@ -119956,7 +132324,7 @@ type NetworkAclsPager struct { // NewNetworkAclsPager returns a new NetworkAclsPager instance. func (vpc *VpcV1) NewNetworkAclsPager(options *ListNetworkAclsOptions) (pager *NetworkAclsPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -119984,6 +132352,7 @@ func (pager *NetworkAclsPager) GetNextWithContext(ctx context.Context) (page []N result, _, err := pager.client.ListNetworkAclsWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -119992,7 +132361,8 @@ func (pager *NetworkAclsPager) GetNextWithContext(ctx context.Context) (page []N var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -120011,6 +132381,7 @@ func (pager *NetworkAclsPager) GetAllWithContext(ctx context.Context) (allItems var nextPage []NetworkACL nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -120020,12 +132391,16 @@ func (pager *NetworkAclsPager) GetAllWithContext(ctx context.Context) (allItems // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *NetworkAclsPager) GetNext() (page []NetworkACL, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *NetworkAclsPager) GetAll() (allItems []NetworkACL, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // NetworkACLRulesPager can be used to simplify the use of the "ListNetworkACLRules" method. @@ -120041,7 +132416,7 @@ type NetworkACLRulesPager struct { // NewNetworkACLRulesPager returns a new NetworkACLRulesPager instance. func (vpc *VpcV1) NewNetworkACLRulesPager(options *ListNetworkACLRulesOptions) (pager *NetworkACLRulesPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -120069,6 +132444,7 @@ func (pager *NetworkACLRulesPager) GetNextWithContext(ctx context.Context) (page result, _, err := pager.client.ListNetworkACLRulesWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -120077,7 +132453,8 @@ func (pager *NetworkACLRulesPager) GetNextWithContext(ctx context.Context) (page var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -120096,6 +132473,7 @@ func (pager *NetworkACLRulesPager) GetAllWithContext(ctx context.Context) (allIt var nextPage []NetworkACLRuleItemIntf nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -120105,12 +132483,16 @@ func (pager *NetworkACLRulesPager) GetAllWithContext(ctx context.Context) (allIt // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *NetworkACLRulesPager) GetNext() (page []NetworkACLRuleItemIntf, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *NetworkACLRulesPager) GetAll() (allItems []NetworkACLRuleItemIntf, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // SecurityGroupsPager can be used to simplify the use of the "ListSecurityGroups" method. @@ -120126,7 +132508,7 @@ type SecurityGroupsPager struct { // NewSecurityGroupsPager returns a new SecurityGroupsPager instance. func (vpc *VpcV1) NewSecurityGroupsPager(options *ListSecurityGroupsOptions) (pager *SecurityGroupsPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -120154,6 +132536,7 @@ func (pager *SecurityGroupsPager) GetNextWithContext(ctx context.Context) (page result, _, err := pager.client.ListSecurityGroupsWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -120162,7 +132545,8 @@ func (pager *SecurityGroupsPager) GetNextWithContext(ctx context.Context) (page var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -120181,6 +132565,7 @@ func (pager *SecurityGroupsPager) GetAllWithContext(ctx context.Context) (allIte var nextPage []SecurityGroup nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -120190,12 +132575,16 @@ func (pager *SecurityGroupsPager) GetAllWithContext(ctx context.Context) (allIte // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *SecurityGroupsPager) GetNext() (page []SecurityGroup, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *SecurityGroupsPager) GetAll() (allItems []SecurityGroup, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // SecurityGroupTargetsPager can be used to simplify the use of the "ListSecurityGroupTargets" method. @@ -120211,7 +132600,7 @@ type SecurityGroupTargetsPager struct { // NewSecurityGroupTargetsPager returns a new SecurityGroupTargetsPager instance. func (vpc *VpcV1) NewSecurityGroupTargetsPager(options *ListSecurityGroupTargetsOptions) (pager *SecurityGroupTargetsPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -120239,6 +132628,7 @@ func (pager *SecurityGroupTargetsPager) GetNextWithContext(ctx context.Context) result, _, err := pager.client.ListSecurityGroupTargetsWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -120247,7 +132637,8 @@ func (pager *SecurityGroupTargetsPager) GetNextWithContext(ctx context.Context) var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -120266,6 +132657,7 @@ func (pager *SecurityGroupTargetsPager) GetAllWithContext(ctx context.Context) ( var nextPage []SecurityGroupTargetReferenceIntf nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -120275,12 +132667,16 @@ func (pager *SecurityGroupTargetsPager) GetAllWithContext(ctx context.Context) ( // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *SecurityGroupTargetsPager) GetNext() (page []SecurityGroupTargetReferenceIntf, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *SecurityGroupTargetsPager) GetAll() (allItems []SecurityGroupTargetReferenceIntf, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // IkePoliciesPager can be used to simplify the use of the "ListIkePolicies" method. @@ -120296,7 +132692,7 @@ type IkePoliciesPager struct { // NewIkePoliciesPager returns a new IkePoliciesPager instance. func (vpc *VpcV1) NewIkePoliciesPager(options *ListIkePoliciesOptions) (pager *IkePoliciesPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -120324,6 +132720,7 @@ func (pager *IkePoliciesPager) GetNextWithContext(ctx context.Context) (page []I result, _, err := pager.client.ListIkePoliciesWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -120332,7 +132729,8 @@ func (pager *IkePoliciesPager) GetNextWithContext(ctx context.Context) (page []I var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -120351,6 +132749,7 @@ func (pager *IkePoliciesPager) GetAllWithContext(ctx context.Context) (allItems var nextPage []IkePolicy nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -120360,12 +132759,16 @@ func (pager *IkePoliciesPager) GetAllWithContext(ctx context.Context) (allItems // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *IkePoliciesPager) GetNext() (page []IkePolicy, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *IkePoliciesPager) GetAll() (allItems []IkePolicy, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // IpsecPoliciesPager can be used to simplify the use of the "ListIpsecPolicies" method. @@ -120381,7 +132784,7 @@ type IpsecPoliciesPager struct { // NewIpsecPoliciesPager returns a new IpsecPoliciesPager instance. func (vpc *VpcV1) NewIpsecPoliciesPager(options *ListIpsecPoliciesOptions) (pager *IpsecPoliciesPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -120409,6 +132812,7 @@ func (pager *IpsecPoliciesPager) GetNextWithContext(ctx context.Context) (page [ result, _, err := pager.client.ListIpsecPoliciesWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -120417,7 +132821,8 @@ func (pager *IpsecPoliciesPager) GetNextWithContext(ctx context.Context) (page [ var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -120436,6 +132841,7 @@ func (pager *IpsecPoliciesPager) GetAllWithContext(ctx context.Context) (allItem var nextPage []IPsecPolicy nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -120445,12 +132851,16 @@ func (pager *IpsecPoliciesPager) GetAllWithContext(ctx context.Context) (allItem // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *IpsecPoliciesPager) GetNext() (page []IPsecPolicy, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *IpsecPoliciesPager) GetAll() (allItems []IPsecPolicy, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // VPNGatewaysPager can be used to simplify the use of the "ListVPNGateways" method. @@ -120466,7 +132876,7 @@ type VPNGatewaysPager struct { // NewVPNGatewaysPager returns a new VPNGatewaysPager instance. func (vpc *VpcV1) NewVPNGatewaysPager(options *ListVPNGatewaysOptions) (pager *VPNGatewaysPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -120494,6 +132904,7 @@ func (pager *VPNGatewaysPager) GetNextWithContext(ctx context.Context) (page []V result, _, err := pager.client.ListVPNGatewaysWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -120502,7 +132913,8 @@ func (pager *VPNGatewaysPager) GetNextWithContext(ctx context.Context) (page []V var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -120521,6 +132933,7 @@ func (pager *VPNGatewaysPager) GetAllWithContext(ctx context.Context) (allItems var nextPage []VPNGatewayIntf nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -120530,12 +132943,16 @@ func (pager *VPNGatewaysPager) GetAllWithContext(ctx context.Context) (allItems // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *VPNGatewaysPager) GetNext() (page []VPNGatewayIntf, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *VPNGatewaysPager) GetAll() (allItems []VPNGatewayIntf, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // VPNServersPager can be used to simplify the use of the "ListVPNServers" method. @@ -120551,7 +132968,7 @@ type VPNServersPager struct { // NewVPNServersPager returns a new VPNServersPager instance. func (vpc *VpcV1) NewVPNServersPager(options *ListVPNServersOptions) (pager *VPNServersPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -120579,6 +132996,7 @@ func (pager *VPNServersPager) GetNextWithContext(ctx context.Context) (page []VP result, _, err := pager.client.ListVPNServersWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -120587,7 +133005,8 @@ func (pager *VPNServersPager) GetNextWithContext(ctx context.Context) (page []VP var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -120606,6 +133025,7 @@ func (pager *VPNServersPager) GetAllWithContext(ctx context.Context) (allItems [ var nextPage []VPNServer nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -120615,12 +133035,16 @@ func (pager *VPNServersPager) GetAllWithContext(ctx context.Context) (allItems [ // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *VPNServersPager) GetNext() (page []VPNServer, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *VPNServersPager) GetAll() (allItems []VPNServer, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // VPNServerClientsPager can be used to simplify the use of the "ListVPNServerClients" method. @@ -120636,7 +133060,7 @@ type VPNServerClientsPager struct { // NewVPNServerClientsPager returns a new VPNServerClientsPager instance. func (vpc *VpcV1) NewVPNServerClientsPager(options *ListVPNServerClientsOptions) (pager *VPNServerClientsPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -120664,6 +133088,7 @@ func (pager *VPNServerClientsPager) GetNextWithContext(ctx context.Context) (pag result, _, err := pager.client.ListVPNServerClientsWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -120672,7 +133097,8 @@ func (pager *VPNServerClientsPager) GetNextWithContext(ctx context.Context) (pag var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -120691,6 +133117,7 @@ func (pager *VPNServerClientsPager) GetAllWithContext(ctx context.Context) (allI var nextPage []VPNServerClient nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -120700,12 +133127,16 @@ func (pager *VPNServerClientsPager) GetAllWithContext(ctx context.Context) (allI // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *VPNServerClientsPager) GetNext() (page []VPNServerClient, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *VPNServerClientsPager) GetAll() (allItems []VPNServerClient, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // VPNServerRoutesPager can be used to simplify the use of the "ListVPNServerRoutes" method. @@ -120721,7 +133152,7 @@ type VPNServerRoutesPager struct { // NewVPNServerRoutesPager returns a new VPNServerRoutesPager instance. func (vpc *VpcV1) NewVPNServerRoutesPager(options *ListVPNServerRoutesOptions) (pager *VPNServerRoutesPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -120749,6 +133180,7 @@ func (pager *VPNServerRoutesPager) GetNextWithContext(ctx context.Context) (page result, _, err := pager.client.ListVPNServerRoutesWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -120757,7 +133189,8 @@ func (pager *VPNServerRoutesPager) GetNextWithContext(ctx context.Context) (page var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -120776,6 +133209,7 @@ func (pager *VPNServerRoutesPager) GetAllWithContext(ctx context.Context) (allIt var nextPage []VPNServerRoute nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -120785,12 +133219,16 @@ func (pager *VPNServerRoutesPager) GetAllWithContext(ctx context.Context) (allIt // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *VPNServerRoutesPager) GetNext() (page []VPNServerRoute, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *VPNServerRoutesPager) GetAll() (allItems []VPNServerRoute, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // LoadBalancerProfilesPager can be used to simplify the use of the "ListLoadBalancerProfiles" method. @@ -120806,7 +133244,7 @@ type LoadBalancerProfilesPager struct { // NewLoadBalancerProfilesPager returns a new LoadBalancerProfilesPager instance. func (vpc *VpcV1) NewLoadBalancerProfilesPager(options *ListLoadBalancerProfilesOptions) (pager *LoadBalancerProfilesPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -120834,6 +133272,7 @@ func (pager *LoadBalancerProfilesPager) GetNextWithContext(ctx context.Context) result, _, err := pager.client.ListLoadBalancerProfilesWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -120842,7 +133281,8 @@ func (pager *LoadBalancerProfilesPager) GetNextWithContext(ctx context.Context) var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -120861,6 +133301,7 @@ func (pager *LoadBalancerProfilesPager) GetAllWithContext(ctx context.Context) ( var nextPage []LoadBalancerProfile nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -120870,12 +133311,16 @@ func (pager *LoadBalancerProfilesPager) GetAllWithContext(ctx context.Context) ( // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *LoadBalancerProfilesPager) GetNext() (page []LoadBalancerProfile, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *LoadBalancerProfilesPager) GetAll() (allItems []LoadBalancerProfile, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // LoadBalancersPager can be used to simplify the use of the "ListLoadBalancers" method. @@ -120891,7 +133336,7 @@ type LoadBalancersPager struct { // NewLoadBalancersPager returns a new LoadBalancersPager instance. func (vpc *VpcV1) NewLoadBalancersPager(options *ListLoadBalancersOptions) (pager *LoadBalancersPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -120919,6 +133364,7 @@ func (pager *LoadBalancersPager) GetNextWithContext(ctx context.Context) (page [ result, _, err := pager.client.ListLoadBalancersWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -120927,7 +133373,8 @@ func (pager *LoadBalancersPager) GetNextWithContext(ctx context.Context) (page [ var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -120946,6 +133393,7 @@ func (pager *LoadBalancersPager) GetAllWithContext(ctx context.Context) (allItem var nextPage []LoadBalancer nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -120955,12 +133403,16 @@ func (pager *LoadBalancersPager) GetAllWithContext(ctx context.Context) (allItem // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *LoadBalancersPager) GetNext() (page []LoadBalancer, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *LoadBalancersPager) GetAll() (allItems []LoadBalancer, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // EndpointGatewaysPager can be used to simplify the use of the "ListEndpointGateways" method. @@ -120976,7 +133428,7 @@ type EndpointGatewaysPager struct { // NewEndpointGatewaysPager returns a new EndpointGatewaysPager instance. func (vpc *VpcV1) NewEndpointGatewaysPager(options *ListEndpointGatewaysOptions) (pager *EndpointGatewaysPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -121004,6 +133456,7 @@ func (pager *EndpointGatewaysPager) GetNextWithContext(ctx context.Context) (pag result, _, err := pager.client.ListEndpointGatewaysWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -121012,7 +133465,8 @@ func (pager *EndpointGatewaysPager) GetNextWithContext(ctx context.Context) (pag var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -121031,6 +133485,7 @@ func (pager *EndpointGatewaysPager) GetAllWithContext(ctx context.Context) (allI var nextPage []EndpointGateway nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -121040,12 +133495,16 @@ func (pager *EndpointGatewaysPager) GetAllWithContext(ctx context.Context) (allI // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *EndpointGatewaysPager) GetNext() (page []EndpointGateway, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *EndpointGatewaysPager) GetAll() (allItems []EndpointGateway, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // EndpointGatewayIpsPager can be used to simplify the use of the "ListEndpointGatewayIps" method. @@ -121061,7 +133520,7 @@ type EndpointGatewayIpsPager struct { // NewEndpointGatewayIpsPager returns a new EndpointGatewayIpsPager instance. func (vpc *VpcV1) NewEndpointGatewayIpsPager(options *ListEndpointGatewayIpsOptions) (pager *EndpointGatewayIpsPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -121089,6 +133548,7 @@ func (pager *EndpointGatewayIpsPager) GetNextWithContext(ctx context.Context) (p result, _, err := pager.client.ListEndpointGatewayIpsWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -121097,7 +133557,8 @@ func (pager *EndpointGatewayIpsPager) GetNextWithContext(ctx context.Context) (p var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -121116,6 +133577,7 @@ func (pager *EndpointGatewayIpsPager) GetAllWithContext(ctx context.Context) (al var nextPage []ReservedIP nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -121125,12 +133587,16 @@ func (pager *EndpointGatewayIpsPager) GetAllWithContext(ctx context.Context) (al // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *EndpointGatewayIpsPager) GetNext() (page []ReservedIP, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *EndpointGatewayIpsPager) GetAll() (allItems []ReservedIP, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // FlowLogCollectorsPager can be used to simplify the use of the "ListFlowLogCollectors" method. @@ -121146,7 +133612,7 @@ type FlowLogCollectorsPager struct { // NewFlowLogCollectorsPager returns a new FlowLogCollectorsPager instance. func (vpc *VpcV1) NewFlowLogCollectorsPager(options *ListFlowLogCollectorsOptions) (pager *FlowLogCollectorsPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -121174,6 +133640,7 @@ func (pager *FlowLogCollectorsPager) GetNextWithContext(ctx context.Context) (pa result, _, err := pager.client.ListFlowLogCollectorsWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -121182,7 +133649,8 @@ func (pager *FlowLogCollectorsPager) GetNextWithContext(ctx context.Context) (pa var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { - err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) return } next = start @@ -121201,6 +133669,7 @@ func (pager *FlowLogCollectorsPager) GetAllWithContext(ctx context.Context) (all var nextPage []FlowLogCollector nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -121210,10 +133679,14 @@ func (pager *FlowLogCollectorsPager) GetAllWithContext(ctx context.Context) (all // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *FlowLogCollectorsPager) GetNext() (page []FlowLogCollector, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *FlowLogCollectorsPager) GetAll() (allItems []FlowLogCollector, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } diff --git a/vpcv1/vpc_v1_test.go b/vpcv1/vpc_v1_test.go index 003699c..2aae34f 100644 --- a/vpcv1/vpc_v1_test.go +++ b/vpcv1/vpc_v1_test.go @@ -19,6 +19,7 @@ package vpcv1_test import ( "bytes" "context" + "encoding/json" "fmt" "io" "net/http" @@ -258,7 +259,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132, "vpcs": [{"classic_access": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "cse_source_ips": [{"ip": {"address": "192.168.3.4"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "default_network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "default_routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-routing-table-1", "resource_type": "routing_table"}, "default_security_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}, "dns": {"enable_hub": false, "resolution_binding_count": 0, "resolver": {"servers": [{"address": "192.168.3.4", "zone_affinity": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "type": "delegated", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}}, "health_reasons": [{"code": "dns_resolution_binding_failed", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpc", "status": "available"}]}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132, "vpcs": [{"classic_access": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "cse_source_ips": [{"ip": {"address": "192.168.3.4"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "default_network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "default_routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "default_security_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}, "dns": {"enable_hub": false, "resolution_binding_count": 0, "resolver": {"servers": [{"address": "192.168.3.4", "zone_affinity": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "type": "delegated", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}}, "health_reasons": [{"code": "dns_resolution_binding_failed", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpc", "status": "available"}]}`) })) }) It(`Invoke ListVpcs successfully with retries`, func() { @@ -322,7 +323,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132, "vpcs": [{"classic_access": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "cse_source_ips": [{"ip": {"address": "192.168.3.4"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "default_network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "default_routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-routing-table-1", "resource_type": "routing_table"}, "default_security_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}, "dns": {"enable_hub": false, "resolution_binding_count": 0, "resolver": {"servers": [{"address": "192.168.3.4", "zone_affinity": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "type": "delegated", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}}, "health_reasons": [{"code": "dns_resolution_binding_failed", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpc", "status": "available"}]}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132, "vpcs": [{"classic_access": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "cse_source_ips": [{"ip": {"address": "192.168.3.4"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "default_network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "default_routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "default_security_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}, "dns": {"enable_hub": false, "resolution_binding_count": 0, "resolver": {"servers": [{"address": "192.168.3.4", "zone_affinity": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "type": "delegated", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}}, "health_reasons": [{"code": "dns_resolution_binding_failed", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpc", "status": "available"}]}`) })) }) It(`Invoke ListVpcs successfully`, func() { @@ -466,9 +467,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"vpcs":[{"classic_access":false,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","cse_source_ips":[{"ip":{"address":"192.168.3.4"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"default_network_acl":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl"},"default_routing_table":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","name":"my-routing-table-1","resource_type":"routing_table"},"default_security_group":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"},"dns":{"enable_hub":false,"resolution_binding_count":0,"resolver":{"servers":[{"address":"192.168.3.4","zone_affinity":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"type":"delegated","vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","remote":{"account":{"id":"aa2432b1fa4d4ace891e9b80fc104e34","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"vpc"}}},"health_reasons":[{"code":"dns_resolution_binding_failed","message":"The VPC specified in the DNS resolution binding has been disconnected.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"vpc","status":"available"}]}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"vpcs":[{"classic_access":false,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","cse_source_ips":[{"ip":{"address":"192.168.3.4"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"default_network_acl":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl"},"default_routing_table":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840","id":"r006-6885e83f-03b2-4603-8a86-db2a0f55c840","name":"my-routing-table-1","resource_type":"routing_table"},"default_security_group":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"},"dns":{"enable_hub":false,"resolution_binding_count":0,"resolver":{"servers":[{"address":"192.168.3.4","zone_affinity":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"type":"delegated","vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"vpc"}}},"health_reasons":[{"code":"dns_resolution_binding_failed","message":"The VPC specified in the DNS resolution binding has been disconnected.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"vpc","status":"available"}]}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"vpcs":[{"classic_access":false,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","cse_source_ips":[{"ip":{"address":"192.168.3.4"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"default_network_acl":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl"},"default_routing_table":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","name":"my-routing-table-1","resource_type":"routing_table"},"default_security_group":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"},"dns":{"enable_hub":false,"resolution_binding_count":0,"resolver":{"servers":[{"address":"192.168.3.4","zone_affinity":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"type":"delegated","vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","remote":{"account":{"id":"aa2432b1fa4d4ace891e9b80fc104e34","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"vpc"}}},"health_reasons":[{"code":"dns_resolution_binding_failed","message":"The VPC specified in the DNS resolution binding has been disconnected.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"vpc","status":"available"}]}`) + fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"vpcs":[{"classic_access":false,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","cse_source_ips":[{"ip":{"address":"192.168.3.4"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"default_network_acl":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl"},"default_routing_table":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840","id":"r006-6885e83f-03b2-4603-8a86-db2a0f55c840","name":"my-routing-table-1","resource_type":"routing_table"},"default_security_group":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"},"dns":{"enable_hub":false,"resolution_binding_count":0,"resolver":{"servers":[{"address":"192.168.3.4","zone_affinity":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"type":"delegated","vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"vpc"}}},"health_reasons":[{"code":"dns_resolution_binding_failed","message":"The VPC specified in the DNS resolution binding has been disconnected.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"vpc","status":"available"}]}`) } else { res.WriteHeader(400) } @@ -640,7 +641,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"classic_access": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "cse_source_ips": [{"ip": {"address": "192.168.3.4"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "default_network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "default_routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-routing-table-1", "resource_type": "routing_table"}, "default_security_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}, "dns": {"enable_hub": false, "resolution_binding_count": 0, "resolver": {"servers": [{"address": "192.168.3.4", "zone_affinity": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "type": "delegated", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}}, "health_reasons": [{"code": "dns_resolution_binding_failed", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpc", "status": "available"}`) + fmt.Fprintf(res, "%s", `{"classic_access": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "cse_source_ips": [{"ip": {"address": "192.168.3.4"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "default_network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "default_routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "default_security_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}, "dns": {"enable_hub": false, "resolution_binding_count": 0, "resolver": {"servers": [{"address": "192.168.3.4", "zone_affinity": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "type": "delegated", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}}, "health_reasons": [{"code": "dns_resolution_binding_failed", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpc", "status": "available"}`) })) }) It(`Invoke CreateVPC successfully with retries`, func() { @@ -740,7 +741,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"classic_access": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "cse_source_ips": [{"ip": {"address": "192.168.3.4"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "default_network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "default_routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-routing-table-1", "resource_type": "routing_table"}, "default_security_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}, "dns": {"enable_hub": false, "resolution_binding_count": 0, "resolver": {"servers": [{"address": "192.168.3.4", "zone_affinity": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "type": "delegated", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}}, "health_reasons": [{"code": "dns_resolution_binding_failed", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpc", "status": "available"}`) + fmt.Fprintf(res, "%s", `{"classic_access": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "cse_source_ips": [{"ip": {"address": "192.168.3.4"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "default_network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "default_routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "default_security_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}, "dns": {"enable_hub": false, "resolution_binding_count": 0, "resolver": {"servers": [{"address": "192.168.3.4", "zone_affinity": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "type": "delegated", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}}, "health_reasons": [{"code": "dns_resolution_binding_failed", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpc", "status": "available"}`) })) }) It(`Invoke CreateVPC successfully`, func() { @@ -1059,7 +1060,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"classic_access": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "cse_source_ips": [{"ip": {"address": "192.168.3.4"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "default_network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "default_routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-routing-table-1", "resource_type": "routing_table"}, "default_security_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}, "dns": {"enable_hub": false, "resolution_binding_count": 0, "resolver": {"servers": [{"address": "192.168.3.4", "zone_affinity": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "type": "delegated", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}}, "health_reasons": [{"code": "dns_resolution_binding_failed", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpc", "status": "available"}`) + fmt.Fprintf(res, "%s", `{"classic_access": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "cse_source_ips": [{"ip": {"address": "192.168.3.4"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "default_network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "default_routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "default_security_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}, "dns": {"enable_hub": false, "resolution_binding_count": 0, "resolver": {"servers": [{"address": "192.168.3.4", "zone_affinity": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "type": "delegated", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}}, "health_reasons": [{"code": "dns_resolution_binding_failed", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpc", "status": "available"}`) })) }) It(`Invoke GetVPC successfully with retries`, func() { @@ -1116,7 +1117,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"classic_access": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "cse_source_ips": [{"ip": {"address": "192.168.3.4"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "default_network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "default_routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-routing-table-1", "resource_type": "routing_table"}, "default_security_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}, "dns": {"enable_hub": false, "resolution_binding_count": 0, "resolver": {"servers": [{"address": "192.168.3.4", "zone_affinity": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "type": "delegated", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}}, "health_reasons": [{"code": "dns_resolution_binding_failed", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpc", "status": "available"}`) + fmt.Fprintf(res, "%s", `{"classic_access": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "cse_source_ips": [{"ip": {"address": "192.168.3.4"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "default_network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "default_routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "default_security_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}, "dns": {"enable_hub": false, "resolution_binding_count": 0, "resolver": {"servers": [{"address": "192.168.3.4", "zone_affinity": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "type": "delegated", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}}, "health_reasons": [{"code": "dns_resolution_binding_failed", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpc", "status": "available"}`) })) }) It(`Invoke GetVPC successfully`, func() { @@ -1255,7 +1256,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VpcdnsResolverVPCPatchVPCIdentityByID model vpcdnsResolverVPCPatchModel := new(vpcv1.VpcdnsResolverVPCPatchVPCIdentityByID) - vpcdnsResolverVPCPatchModel.ID = core.StringPtr("4727d842-f94f-4a2d-824a-9bc9b02c523b") + vpcdnsResolverVPCPatchModel.ID = core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") // Construct an instance of the VpcdnsResolverPatch model vpcdnsResolverPatchModel := new(vpcv1.VpcdnsResolverPatch) @@ -1337,7 +1338,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"classic_access": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "cse_source_ips": [{"ip": {"address": "192.168.3.4"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "default_network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "default_routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-routing-table-1", "resource_type": "routing_table"}, "default_security_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}, "dns": {"enable_hub": false, "resolution_binding_count": 0, "resolver": {"servers": [{"address": "192.168.3.4", "zone_affinity": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "type": "delegated", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}}, "health_reasons": [{"code": "dns_resolution_binding_failed", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpc", "status": "available"}`) + fmt.Fprintf(res, "%s", `{"classic_access": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "cse_source_ips": [{"ip": {"address": "192.168.3.4"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "default_network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "default_routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "default_security_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}, "dns": {"enable_hub": false, "resolution_binding_count": 0, "resolver": {"servers": [{"address": "192.168.3.4", "zone_affinity": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "type": "delegated", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}}, "health_reasons": [{"code": "dns_resolution_binding_failed", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpc", "status": "available"}`) })) }) It(`Invoke UpdateVPC successfully with retries`, func() { @@ -1361,7 +1362,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VpcdnsResolverVPCPatchVPCIdentityByID model vpcdnsResolverVPCPatchModel := new(vpcv1.VpcdnsResolverVPCPatchVPCIdentityByID) - vpcdnsResolverVPCPatchModel.ID = core.StringPtr("4727d842-f94f-4a2d-824a-9bc9b02c523b") + vpcdnsResolverVPCPatchModel.ID = core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") // Construct an instance of the VpcdnsResolverPatch model vpcdnsResolverPatchModel := new(vpcv1.VpcdnsResolverPatch) @@ -1445,7 +1446,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"classic_access": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "cse_source_ips": [{"ip": {"address": "192.168.3.4"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "default_network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "default_routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-routing-table-1", "resource_type": "routing_table"}, "default_security_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}, "dns": {"enable_hub": false, "resolution_binding_count": 0, "resolver": {"servers": [{"address": "192.168.3.4", "zone_affinity": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "type": "delegated", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}}, "health_reasons": [{"code": "dns_resolution_binding_failed", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpc", "status": "available"}`) + fmt.Fprintf(res, "%s", `{"classic_access": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "cse_source_ips": [{"ip": {"address": "192.168.3.4"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "default_network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "default_routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "default_security_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}, "dns": {"enable_hub": false, "resolution_binding_count": 0, "resolver": {"servers": [{"address": "192.168.3.4", "zone_affinity": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "type": "delegated", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}}, "health_reasons": [{"code": "dns_resolution_binding_failed", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpc", "status": "available"}`) })) }) It(`Invoke UpdateVPC successfully`, func() { @@ -1474,7 +1475,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VpcdnsResolverVPCPatchVPCIdentityByID model vpcdnsResolverVPCPatchModel := new(vpcv1.VpcdnsResolverVPCPatchVPCIdentityByID) - vpcdnsResolverVPCPatchModel.ID = core.StringPtr("4727d842-f94f-4a2d-824a-9bc9b02c523b") + vpcdnsResolverVPCPatchModel.ID = core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") // Construct an instance of the VpcdnsResolverPatch model vpcdnsResolverPatchModel := new(vpcv1.VpcdnsResolverPatch) @@ -1528,7 +1529,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VpcdnsResolverVPCPatchVPCIdentityByID model vpcdnsResolverVPCPatchModel := new(vpcv1.VpcdnsResolverVPCPatchVPCIdentityByID) - vpcdnsResolverVPCPatchModel.ID = core.StringPtr("4727d842-f94f-4a2d-824a-9bc9b02c523b") + vpcdnsResolverVPCPatchModel.ID = core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") // Construct an instance of the VpcdnsResolverPatch model vpcdnsResolverPatchModel := new(vpcv1.VpcdnsResolverPatch) @@ -1603,7 +1604,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VpcdnsResolverVPCPatchVPCIdentityByID model vpcdnsResolverVPCPatchModel := new(vpcv1.VpcdnsResolverVPCPatchVPCIdentityByID) - vpcdnsResolverVPCPatchModel.ID = core.StringPtr("4727d842-f94f-4a2d-824a-9bc9b02c523b") + vpcdnsResolverVPCPatchModel.ID = core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") // Construct an instance of the VpcdnsResolverPatch model vpcdnsResolverPatchModel := new(vpcv1.VpcdnsResolverPatch) @@ -1712,7 +1713,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "mnemonic-ersatz-eatery-mythology", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "mnemonic-ersatz-eatery-mythology", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke GetVPCDefaultNetworkACL successfully with retries`, func() { @@ -1769,7 +1770,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "mnemonic-ersatz-eatery-mythology", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "mnemonic-ersatz-eatery-mythology", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke GetVPCDefaultNetworkACL successfully`, func() { @@ -1937,7 +1938,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"accept_routes_from": [{"resource_type": "vpn_server"}], "advertise_routes_to": ["transit_gateway"], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": false, "lifecycle_state": "stable", "name": "milled-easy-equine-machines", "resource_type": "routing_table", "route_direct_link_ingress": true, "route_internet_ingress": true, "route_transit_gateway_ingress": true, "route_vpc_zone_ingress": false, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}`) + fmt.Fprintf(res, "%s", `{"accept_routes_from": [{"resource_type": "vpn_server"}], "advertise_routes_to": ["transit_gateway"], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "is_default": false, "lifecycle_state": "stable", "name": "milled-easy-equine-machines", "resource_type": "routing_table", "route_direct_link_ingress": true, "route_internet_ingress": true, "route_transit_gateway_ingress": true, "route_vpc_zone_ingress": false, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}`) })) }) It(`Invoke GetVPCDefaultRoutingTable successfully with retries`, func() { @@ -1994,7 +1995,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"accept_routes_from": [{"resource_type": "vpn_server"}], "advertise_routes_to": ["transit_gateway"], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": false, "lifecycle_state": "stable", "name": "milled-easy-equine-machines", "resource_type": "routing_table", "route_direct_link_ingress": true, "route_internet_ingress": true, "route_transit_gateway_ingress": true, "route_vpc_zone_ingress": false, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}`) + fmt.Fprintf(res, "%s", `{"accept_routes_from": [{"resource_type": "vpn_server"}], "advertise_routes_to": ["transit_gateway"], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "is_default": false, "lifecycle_state": "stable", "name": "milled-easy-equine-machines", "resource_type": "routing_table", "route_direct_link_ingress": true, "route_internet_ingress": true, "route_transit_gateway_ingress": true, "route_vpc_zone_ingress": false, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}`) })) }) It(`Invoke GetVPCDefaultRoutingTable successfully`, func() { @@ -2162,7 +2163,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "observant-chip-emphatic-engraver", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "local": {"address": "192.168.3.4"}, "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "observant-chip-emphatic-engraver", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "local": {"address": "192.168.3.4"}, "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke GetVPCDefaultSecurityGroup successfully with retries`, func() { @@ -2219,7 +2220,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "observant-chip-emphatic-engraver", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "local": {"address": "192.168.3.4"}, "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "observant-chip-emphatic-engraver", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "local": {"address": "192.168.3.4"}, "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke GetVPCDefaultSecurityGroup successfully`, func() { @@ -3583,9 +3584,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) + Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"my-vpc"})) - Expect(req.URL.Query()["account.id"]).To(Equal([]string{"aa2432b1fa4d4ace891e9b80fc104e34"})) + Expect(req.URL.Query()["account.id"]).To(Equal([]string{"bb1b52262f7441a586f49068482f1e60"})) res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprint(res, `} this is not valid json {`) @@ -3607,9 +3608,9 @@ var _ = Describe(`VpcV1`, func() { listVPCDnsResolutionBindingsOptionsModel.Start = core.StringPtr("testString") listVPCDnsResolutionBindingsOptionsModel.Limit = core.Int64Ptr(int64(10)) listVPCDnsResolutionBindingsOptionsModel.Name = core.StringPtr("testString") - listVPCDnsResolutionBindingsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listVPCDnsResolutionBindingsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listVPCDnsResolutionBindingsOptionsModel.VPCName = core.StringPtr("my-vpc") - listVPCDnsResolutionBindingsOptionsModel.AccountID = core.StringPtr("aa2432b1fa4d4ace891e9b80fc104e34") + listVPCDnsResolutionBindingsOptionsModel.AccountID = core.StringPtr("bb1b52262f7441a586f49068482f1e60") listVPCDnsResolutionBindingsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Expect response parsing to fail since we are receiving a text/plain response result, response, operationErr := vpcService.ListVPCDnsResolutionBindings(listVPCDnsResolutionBindingsOptionsModel) @@ -3647,16 +3648,16 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) + Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"my-vpc"})) - Expect(req.URL.Query()["account.id"]).To(Equal([]string{"aa2432b1fa4d4ace891e9b80fc104e34"})) + Expect(req.URL.Query()["account.id"]).To(Equal([]string{"bb1b52262f7441a586f49068482f1e60"})) // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"dns_resolution_bindings": [{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "endpoint_gateway"}], "health_reasons": [{"code": "disconnected_from_bound_vpc", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "id": "r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "lifecycle_state": "stable", "name": "my-dns-resolution-binding", "resource_type": "vpc_dns_resolution_binding", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"dns_resolution_bindings": [{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "endpoint_gateway"}], "health_reasons": [{"code": "disconnected_from_bound_vpc", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "id": "r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "lifecycle_state": "stable", "name": "my-dns-resolution-binding", "resource_type": "vpc_dns_resolution_binding", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListVPCDnsResolutionBindings successfully with retries`, func() { @@ -3676,9 +3677,9 @@ var _ = Describe(`VpcV1`, func() { listVPCDnsResolutionBindingsOptionsModel.Start = core.StringPtr("testString") listVPCDnsResolutionBindingsOptionsModel.Limit = core.Int64Ptr(int64(10)) listVPCDnsResolutionBindingsOptionsModel.Name = core.StringPtr("testString") - listVPCDnsResolutionBindingsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listVPCDnsResolutionBindingsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listVPCDnsResolutionBindingsOptionsModel.VPCName = core.StringPtr("my-vpc") - listVPCDnsResolutionBindingsOptionsModel.AccountID = core.StringPtr("aa2432b1fa4d4ace891e9b80fc104e34") + listVPCDnsResolutionBindingsOptionsModel.AccountID = core.StringPtr("bb1b52262f7441a586f49068482f1e60") listVPCDnsResolutionBindingsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with a Context to test a timeout error @@ -3721,13 +3722,13 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) + Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"my-vpc"})) - Expect(req.URL.Query()["account.id"]).To(Equal([]string{"aa2432b1fa4d4ace891e9b80fc104e34"})) + Expect(req.URL.Query()["account.id"]).To(Equal([]string{"bb1b52262f7441a586f49068482f1e60"})) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"dns_resolution_bindings": [{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "endpoint_gateway"}], "health_reasons": [{"code": "disconnected_from_bound_vpc", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "id": "r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "lifecycle_state": "stable", "name": "my-dns-resolution-binding", "resource_type": "vpc_dns_resolution_binding", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"dns_resolution_bindings": [{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "endpoint_gateway"}], "health_reasons": [{"code": "disconnected_from_bound_vpc", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "id": "r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "lifecycle_state": "stable", "name": "my-dns-resolution-binding", "resource_type": "vpc_dns_resolution_binding", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListVPCDnsResolutionBindings successfully`, func() { @@ -3752,9 +3753,9 @@ var _ = Describe(`VpcV1`, func() { listVPCDnsResolutionBindingsOptionsModel.Start = core.StringPtr("testString") listVPCDnsResolutionBindingsOptionsModel.Limit = core.Int64Ptr(int64(10)) listVPCDnsResolutionBindingsOptionsModel.Name = core.StringPtr("testString") - listVPCDnsResolutionBindingsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listVPCDnsResolutionBindingsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listVPCDnsResolutionBindingsOptionsModel.VPCName = core.StringPtr("my-vpc") - listVPCDnsResolutionBindingsOptionsModel.AccountID = core.StringPtr("aa2432b1fa4d4ace891e9b80fc104e34") + listVPCDnsResolutionBindingsOptionsModel.AccountID = core.StringPtr("bb1b52262f7441a586f49068482f1e60") listVPCDnsResolutionBindingsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -3780,9 +3781,9 @@ var _ = Describe(`VpcV1`, func() { listVPCDnsResolutionBindingsOptionsModel.Start = core.StringPtr("testString") listVPCDnsResolutionBindingsOptionsModel.Limit = core.Int64Ptr(int64(10)) listVPCDnsResolutionBindingsOptionsModel.Name = core.StringPtr("testString") - listVPCDnsResolutionBindingsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listVPCDnsResolutionBindingsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listVPCDnsResolutionBindingsOptionsModel.VPCName = core.StringPtr("my-vpc") - listVPCDnsResolutionBindingsOptionsModel.AccountID = core.StringPtr("aa2432b1fa4d4ace891e9b80fc104e34") + listVPCDnsResolutionBindingsOptionsModel.AccountID = core.StringPtr("bb1b52262f7441a586f49068482f1e60") listVPCDnsResolutionBindingsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -3829,9 +3830,9 @@ var _ = Describe(`VpcV1`, func() { listVPCDnsResolutionBindingsOptionsModel.Start = core.StringPtr("testString") listVPCDnsResolutionBindingsOptionsModel.Limit = core.Int64Ptr(int64(10)) listVPCDnsResolutionBindingsOptionsModel.Name = core.StringPtr("testString") - listVPCDnsResolutionBindingsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listVPCDnsResolutionBindingsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listVPCDnsResolutionBindingsOptionsModel.VPCName = core.StringPtr("my-vpc") - listVPCDnsResolutionBindingsOptionsModel.AccountID = core.StringPtr("aa2432b1fa4d4ace891e9b80fc104e34") + listVPCDnsResolutionBindingsOptionsModel.AccountID = core.StringPtr("bb1b52262f7441a586f49068482f1e60") listVPCDnsResolutionBindingsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation @@ -3890,9 +3891,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"dns_resolution_bindings":[{"created_at":"2019-01-01T12:00:00.000Z","endpoint_gateways":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","name":"my-endpoint-gateway","remote":{"account":{"id":"aa2432b1fa4d4ace891e9b80fc104e34","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"endpoint_gateway"}],"health_reasons":[{"code":"disconnected_from_bound_vpc","message":"The VPC specified in the DNS resolution binding has been disconnected.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1","id":"r006-8a524686-fcf6-4947-a59b-188c1ed78ad1","lifecycle_state":"stable","name":"my-dns-resolution-binding","resource_type":"vpc_dns_resolution_binding","vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","remote":{"account":{"id":"aa2432b1fa4d4ace891e9b80fc104e34","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"vpc"}}]}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"dns_resolution_bindings":[{"created_at":"2019-01-01T12:00:00.000Z","endpoint_gateways":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","name":"my-endpoint-gateway","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"endpoint_gateway"}],"health_reasons":[{"code":"disconnected_from_bound_vpc","message":"The VPC specified in the DNS resolution binding has been disconnected.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1","id":"r006-8a524686-fcf6-4947-a59b-188c1ed78ad1","lifecycle_state":"stable","name":"my-dns-resolution-binding","resource_type":"vpc_dns_resolution_binding","vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"vpc"}}]}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"dns_resolution_bindings":[{"created_at":"2019-01-01T12:00:00.000Z","endpoint_gateways":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","name":"my-endpoint-gateway","remote":{"account":{"id":"aa2432b1fa4d4ace891e9b80fc104e34","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"endpoint_gateway"}],"health_reasons":[{"code":"disconnected_from_bound_vpc","message":"The VPC specified in the DNS resolution binding has been disconnected.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1","id":"r006-8a524686-fcf6-4947-a59b-188c1ed78ad1","lifecycle_state":"stable","name":"my-dns-resolution-binding","resource_type":"vpc_dns_resolution_binding","vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","remote":{"account":{"id":"aa2432b1fa4d4ace891e9b80fc104e34","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"vpc"}}]}`) + fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"dns_resolution_bindings":[{"created_at":"2019-01-01T12:00:00.000Z","endpoint_gateways":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","name":"my-endpoint-gateway","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"endpoint_gateway"}],"health_reasons":[{"code":"disconnected_from_bound_vpc","message":"The VPC specified in the DNS resolution binding has been disconnected.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1","id":"r006-8a524686-fcf6-4947-a59b-188c1ed78ad1","lifecycle_state":"stable","name":"my-dns-resolution-binding","resource_type":"vpc_dns_resolution_binding","vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"vpc"}}]}`) } else { res.WriteHeader(400) } @@ -3912,9 +3913,9 @@ var _ = Describe(`VpcV1`, func() { Sort: core.StringPtr("name"), Limit: core.Int64Ptr(int64(10)), Name: core.StringPtr("testString"), - VPCCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"), + VPCCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"), VPCName: core.StringPtr("my-vpc"), - AccountID: core.StringPtr("aa2432b1fa4d4ace891e9b80fc104e34"), + AccountID: core.StringPtr("bb1b52262f7441a586f49068482f1e60"), } pager, err := vpcService.NewVPCDnsResolutionBindingsPager(listVPCDnsResolutionBindingsOptionsModel) @@ -3944,9 +3945,9 @@ var _ = Describe(`VpcV1`, func() { Sort: core.StringPtr("name"), Limit: core.Int64Ptr(int64(10)), Name: core.StringPtr("testString"), - VPCCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"), + VPCCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"), VPCName: core.StringPtr("my-vpc"), - AccountID: core.StringPtr("aa2432b1fa4d4ace891e9b80fc104e34"), + AccountID: core.StringPtr("bb1b52262f7441a586f49068482f1e60"), } pager, err := vpcService.NewVPCDnsResolutionBindingsPager(listVPCDnsResolutionBindingsOptionsModel) @@ -3989,7 +3990,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VPCIdentityByID model vpcIdentityModel := new(vpcv1.VPCIdentityByID) - vpcIdentityModel.ID = core.StringPtr("4727d842-f94f-4a2d-824a-9bc9b02c523b") + vpcIdentityModel.ID = core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") // Construct an instance of the CreateVPCDnsResolutionBindingOptions model createVPCDnsResolutionBindingOptionsModel := new(vpcv1.CreateVPCDnsResolutionBindingOptions) @@ -4051,7 +4052,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "endpoint_gateway"}], "health_reasons": [{"code": "disconnected_from_bound_vpc", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "id": "r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "lifecycle_state": "stable", "name": "my-dns-resolution-binding", "resource_type": "vpc_dns_resolution_binding", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "endpoint_gateway"}], "health_reasons": [{"code": "disconnected_from_bound_vpc", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "id": "r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "lifecycle_state": "stable", "name": "my-dns-resolution-binding", "resource_type": "vpc_dns_resolution_binding", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}`) })) }) It(`Invoke CreateVPCDnsResolutionBinding successfully with retries`, func() { @@ -4066,7 +4067,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VPCIdentityByID model vpcIdentityModel := new(vpcv1.VPCIdentityByID) - vpcIdentityModel.ID = core.StringPtr("4727d842-f94f-4a2d-824a-9bc9b02c523b") + vpcIdentityModel.ID = core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") // Construct an instance of the CreateVPCDnsResolutionBindingOptions model createVPCDnsResolutionBindingOptionsModel := new(vpcv1.CreateVPCDnsResolutionBindingOptions) @@ -4130,7 +4131,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "endpoint_gateway"}], "health_reasons": [{"code": "disconnected_from_bound_vpc", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "id": "r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "lifecycle_state": "stable", "name": "my-dns-resolution-binding", "resource_type": "vpc_dns_resolution_binding", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "endpoint_gateway"}], "health_reasons": [{"code": "disconnected_from_bound_vpc", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "id": "r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "lifecycle_state": "stable", "name": "my-dns-resolution-binding", "resource_type": "vpc_dns_resolution_binding", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}`) })) }) It(`Invoke CreateVPCDnsResolutionBinding successfully`, func() { @@ -4150,7 +4151,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VPCIdentityByID model vpcIdentityModel := new(vpcv1.VPCIdentityByID) - vpcIdentityModel.ID = core.StringPtr("4727d842-f94f-4a2d-824a-9bc9b02c523b") + vpcIdentityModel.ID = core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") // Construct an instance of the CreateVPCDnsResolutionBindingOptions model createVPCDnsResolutionBindingOptionsModel := new(vpcv1.CreateVPCDnsResolutionBindingOptions) @@ -4177,7 +4178,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VPCIdentityByID model vpcIdentityModel := new(vpcv1.VPCIdentityByID) - vpcIdentityModel.ID = core.StringPtr("4727d842-f94f-4a2d-824a-9bc9b02c523b") + vpcIdentityModel.ID = core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") // Construct an instance of the CreateVPCDnsResolutionBindingOptions model createVPCDnsResolutionBindingOptionsModel := new(vpcv1.CreateVPCDnsResolutionBindingOptions) @@ -4225,7 +4226,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VPCIdentityByID model vpcIdentityModel := new(vpcv1.VPCIdentityByID) - vpcIdentityModel.ID = core.StringPtr("4727d842-f94f-4a2d-824a-9bc9b02c523b") + vpcIdentityModel.ID = core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") // Construct an instance of the CreateVPCDnsResolutionBindingOptions model createVPCDnsResolutionBindingOptionsModel := new(vpcv1.CreateVPCDnsResolutionBindingOptions) @@ -4317,7 +4318,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(202) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "endpoint_gateway"}], "health_reasons": [{"code": "disconnected_from_bound_vpc", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "id": "r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "lifecycle_state": "stable", "name": "my-dns-resolution-binding", "resource_type": "vpc_dns_resolution_binding", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "endpoint_gateway"}], "health_reasons": [{"code": "disconnected_from_bound_vpc", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "id": "r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "lifecycle_state": "stable", "name": "my-dns-resolution-binding", "resource_type": "vpc_dns_resolution_binding", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}`) })) }) It(`Invoke DeleteVPCDnsResolutionBinding successfully with retries`, func() { @@ -4375,7 +4376,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(202) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "endpoint_gateway"}], "health_reasons": [{"code": "disconnected_from_bound_vpc", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "id": "r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "lifecycle_state": "stable", "name": "my-dns-resolution-binding", "resource_type": "vpc_dns_resolution_binding", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "endpoint_gateway"}], "health_reasons": [{"code": "disconnected_from_bound_vpc", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "id": "r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "lifecycle_state": "stable", "name": "my-dns-resolution-binding", "resource_type": "vpc_dns_resolution_binding", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}`) })) }) It(`Invoke DeleteVPCDnsResolutionBinding successfully`, func() { @@ -4547,7 +4548,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "endpoint_gateway"}], "health_reasons": [{"code": "disconnected_from_bound_vpc", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "id": "r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "lifecycle_state": "stable", "name": "my-dns-resolution-binding", "resource_type": "vpc_dns_resolution_binding", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "endpoint_gateway"}], "health_reasons": [{"code": "disconnected_from_bound_vpc", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "id": "r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "lifecycle_state": "stable", "name": "my-dns-resolution-binding", "resource_type": "vpc_dns_resolution_binding", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}`) })) }) It(`Invoke GetVPCDnsResolutionBinding successfully with retries`, func() { @@ -4605,7 +4606,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "endpoint_gateway"}], "health_reasons": [{"code": "disconnected_from_bound_vpc", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "id": "r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "lifecycle_state": "stable", "name": "my-dns-resolution-binding", "resource_type": "vpc_dns_resolution_binding", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "endpoint_gateway"}], "health_reasons": [{"code": "disconnected_from_bound_vpc", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "id": "r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "lifecycle_state": "stable", "name": "my-dns-resolution-binding", "resource_type": "vpc_dns_resolution_binding", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}`) })) }) It(`Invoke GetVPCDnsResolutionBinding successfully`, func() { @@ -4800,7 +4801,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "endpoint_gateway"}], "health_reasons": [{"code": "disconnected_from_bound_vpc", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "id": "r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "lifecycle_state": "stable", "name": "my-dns-resolution-binding", "resource_type": "vpc_dns_resolution_binding", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "endpoint_gateway"}], "health_reasons": [{"code": "disconnected_from_bound_vpc", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "id": "r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "lifecycle_state": "stable", "name": "my-dns-resolution-binding", "resource_type": "vpc_dns_resolution_binding", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}`) })) }) It(`Invoke UpdateVPCDnsResolutionBinding successfully with retries`, func() { @@ -4881,7 +4882,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "endpoint_gateway"}], "health_reasons": [{"code": "disconnected_from_bound_vpc", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "id": "r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "lifecycle_state": "stable", "name": "my-dns-resolution-binding", "resource_type": "vpc_dns_resolution_binding", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "endpoint_gateway"}], "health_reasons": [{"code": "disconnected_from_bound_vpc", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "id": "r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "lifecycle_state": "stable", "name": "my-dns-resolution-binding", "resource_type": "vpc_dns_resolution_binding", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}`) })) }) It(`Invoke UpdateVPCDnsResolutionBinding successfully`, func() { @@ -5082,7 +5083,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}`) })) }) It(`Invoke ListVPCRoutes successfully with retries`, func() { @@ -5145,7 +5146,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}`) })) }) It(`Invoke ListVPCRoutes successfully`, func() { @@ -5296,9 +5297,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"routes":[{"action":"delegate","advertise":false,"created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"192.168.3.0/24","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"routes":[{"action":"delegate","advertise":false,"created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"192.168.3.0/24","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"routes":[{"action":"delegate","advertise":false,"created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"192.168.3.0/24","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"routes":[{"action":"delegate","advertise":false,"created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"192.168.3.0/24","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}`) } else { res.WriteHeader(400) } @@ -5458,7 +5459,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke CreateVPCRoute successfully with retries`, func() { @@ -5546,7 +5547,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke CreateVPCRoute successfully`, func() { @@ -5835,7 +5836,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetVPCRoute successfully with retries`, func() { @@ -5893,7 +5894,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetVPCRoute successfully`, func() { @@ -6095,7 +6096,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke UpdateVPCRoute successfully with retries`, func() { @@ -6183,7 +6184,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke UpdateVPCRoute successfully`, func() { @@ -6405,7 +6406,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "routing_tables": [{"accept_routes_from": [{"resource_type": "vpn_server"}], "advertise_routes_to": ["transit_gateway"], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": false, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": true, "route_internet_ingress": true, "route_transit_gateway_ingress": true, "route_vpc_zone_ingress": false, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "routing_tables": [{"accept_routes_from": [{"resource_type": "vpn_server"}], "advertise_routes_to": ["transit_gateway"], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "is_default": false, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": true, "route_internet_ingress": true, "route_transit_gateway_ingress": true, "route_vpc_zone_ingress": false, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}], "total_count": 132}`) })) }) It(`Invoke ListVPCRoutingTables successfully with retries`, func() { @@ -6468,7 +6469,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "routing_tables": [{"accept_routes_from": [{"resource_type": "vpn_server"}], "advertise_routes_to": ["transit_gateway"], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": false, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": true, "route_internet_ingress": true, "route_transit_gateway_ingress": true, "route_vpc_zone_ingress": false, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "routing_tables": [{"accept_routes_from": [{"resource_type": "vpn_server"}], "advertise_routes_to": ["transit_gateway"], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "is_default": false, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": true, "route_internet_ingress": true, "route_transit_gateway_ingress": true, "route_vpc_zone_ingress": false, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}], "total_count": 132}`) })) }) It(`Invoke ListVPCRoutingTables successfully`, func() { @@ -6619,9 +6620,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"routing_tables":[{"accept_routes_from":[{"resource_type":"vpn_server"}],"advertise_routes_to":["transit_gateway"],"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","is_default":false,"lifecycle_state":"stable","name":"my-routing-table-1","resource_type":"routing_table","route_direct_link_ingress":true,"route_internet_ingress":true,"route_transit_gateway_ingress":true,"route_vpc_zone_ingress":false,"routes":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","name":"my-route-1"}],"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}]}],"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"routing_tables":[{"accept_routes_from":[{"resource_type":"vpn_server"}],"advertise_routes_to":["transit_gateway"],"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840","id":"r006-6885e83f-03b2-4603-8a86-db2a0f55c840","is_default":false,"lifecycle_state":"stable","name":"my-routing-table-1","resource_type":"routing_table","route_direct_link_ingress":true,"route_internet_ingress":true,"route_transit_gateway_ingress":true,"route_vpc_zone_ingress":false,"routes":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","name":"my-route-1"}],"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}]}],"total_count":2,"limit":1}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"routing_tables":[{"accept_routes_from":[{"resource_type":"vpn_server"}],"advertise_routes_to":["transit_gateway"],"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","is_default":false,"lifecycle_state":"stable","name":"my-routing-table-1","resource_type":"routing_table","route_direct_link_ingress":true,"route_internet_ingress":true,"route_transit_gateway_ingress":true,"route_vpc_zone_ingress":false,"routes":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","name":"my-route-1"}],"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}]}],"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"routing_tables":[{"accept_routes_from":[{"resource_type":"vpn_server"}],"advertise_routes_to":["transit_gateway"],"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840","id":"r006-6885e83f-03b2-4603-8a86-db2a0f55c840","is_default":false,"lifecycle_state":"stable","name":"my-routing-table-1","resource_type":"routing_table","route_direct_link_ingress":true,"route_internet_ingress":true,"route_transit_gateway_ingress":true,"route_vpc_zone_ingress":false,"routes":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","name":"my-route-1"}],"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}]}],"total_count":2,"limit":1}`) } else { res.WriteHeader(400) } @@ -6796,7 +6797,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"accept_routes_from": [{"resource_type": "vpn_server"}], "advertise_routes_to": ["transit_gateway"], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": false, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": true, "route_internet_ingress": true, "route_transit_gateway_ingress": true, "route_vpc_zone_ingress": false, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}`) + fmt.Fprintf(res, "%s", `{"accept_routes_from": [{"resource_type": "vpn_server"}], "advertise_routes_to": ["transit_gateway"], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "is_default": false, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": true, "route_internet_ingress": true, "route_transit_gateway_ingress": true, "route_vpc_zone_ingress": false, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}`) })) }) It(`Invoke CreateVPCRoutingTable successfully with retries`, func() { @@ -6899,7 +6900,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"accept_routes_from": [{"resource_type": "vpn_server"}], "advertise_routes_to": ["transit_gateway"], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": false, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": true, "route_internet_ingress": true, "route_transit_gateway_ingress": true, "route_vpc_zone_ingress": false, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}`) + fmt.Fprintf(res, "%s", `{"accept_routes_from": [{"resource_type": "vpn_server"}], "advertise_routes_to": ["transit_gateway"], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "is_default": false, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": true, "route_internet_ingress": true, "route_transit_gateway_ingress": true, "route_vpc_zone_ingress": false, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}`) })) }) It(`Invoke CreateVPCRoutingTable successfully`, func() { @@ -7237,7 +7238,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"accept_routes_from": [{"resource_type": "vpn_server"}], "advertise_routes_to": ["transit_gateway"], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": false, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": true, "route_internet_ingress": true, "route_transit_gateway_ingress": true, "route_vpc_zone_ingress": false, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}`) + fmt.Fprintf(res, "%s", `{"accept_routes_from": [{"resource_type": "vpn_server"}], "advertise_routes_to": ["transit_gateway"], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "is_default": false, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": true, "route_internet_ingress": true, "route_transit_gateway_ingress": true, "route_vpc_zone_ingress": false, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}`) })) }) It(`Invoke GetVPCRoutingTable successfully with retries`, func() { @@ -7295,7 +7296,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"accept_routes_from": [{"resource_type": "vpn_server"}], "advertise_routes_to": ["transit_gateway"], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": false, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": true, "route_internet_ingress": true, "route_transit_gateway_ingress": true, "route_vpc_zone_ingress": false, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}`) + fmt.Fprintf(res, "%s", `{"accept_routes_from": [{"resource_type": "vpn_server"}], "advertise_routes_to": ["transit_gateway"], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "is_default": false, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": true, "route_internet_ingress": true, "route_transit_gateway_ingress": true, "route_vpc_zone_ingress": false, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}`) })) }) It(`Invoke GetVPCRoutingTable successfully`, func() { @@ -7505,7 +7506,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"accept_routes_from": [{"resource_type": "vpn_server"}], "advertise_routes_to": ["transit_gateway"], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": false, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": true, "route_internet_ingress": true, "route_transit_gateway_ingress": true, "route_vpc_zone_ingress": false, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}`) + fmt.Fprintf(res, "%s", `{"accept_routes_from": [{"resource_type": "vpn_server"}], "advertise_routes_to": ["transit_gateway"], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "is_default": false, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": true, "route_internet_ingress": true, "route_transit_gateway_ingress": true, "route_vpc_zone_ingress": false, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}`) })) }) It(`Invoke UpdateVPCRoutingTable successfully with retries`, func() { @@ -7599,7 +7600,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"accept_routes_from": [{"resource_type": "vpn_server"}], "advertise_routes_to": ["transit_gateway"], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": false, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": true, "route_internet_ingress": true, "route_transit_gateway_ingress": true, "route_vpc_zone_ingress": false, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}`) + fmt.Fprintf(res, "%s", `{"accept_routes_from": [{"resource_type": "vpn_server"}], "advertise_routes_to": ["transit_gateway"], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "is_default": false, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": true, "route_internet_ingress": true, "route_transit_gateway_ingress": true, "route_vpc_zone_ingress": false, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}`) })) }) It(`Invoke UpdateVPCRoutingTable successfully`, func() { @@ -7831,7 +7832,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}`) })) }) It(`Invoke ListVPCRoutingTableRoutes successfully with retries`, func() { @@ -7893,7 +7894,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}`) })) }) It(`Invoke ListVPCRoutingTableRoutes successfully`, func() { @@ -8044,9 +8045,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"routes":[{"action":"delegate","advertise":false,"created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"192.168.3.0/24","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"routes":[{"action":"delegate","advertise":false,"created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"192.168.3.0/24","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"routes":[{"action":"delegate","advertise":false,"created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"192.168.3.0/24","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"routes":[{"action":"delegate","advertise":false,"created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"192.168.3.0/24","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}`) } else { res.WriteHeader(400) } @@ -8207,7 +8208,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke CreateVPCRoutingTableRoute successfully with retries`, func() { @@ -8296,7 +8297,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke CreateVPCRoutingTableRoute successfully`, func() { @@ -8591,7 +8592,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetVPCRoutingTableRoute successfully with retries`, func() { @@ -8650,7 +8651,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetVPCRoutingTableRoute successfully`, func() { @@ -8856,7 +8857,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke UpdateVPCRoutingTableRoute successfully with retries`, func() { @@ -8945,7 +8946,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke UpdateVPCRoutingTableRoute successfully`, func() { @@ -9110,7 +9111,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["zone.name"]).To(Equal([]string{"us-south-1"})) Expect(req.URL.Query()["vpc.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) + Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"my-vpc"})) Expect(req.URL.Query()["routing_table.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["routing_table.name"]).To(Equal([]string{"my-routing-table"})) @@ -9135,7 +9136,7 @@ var _ = Describe(`VpcV1`, func() { listSubnetsOptionsModel.ResourceGroupID = core.StringPtr("testString") listSubnetsOptionsModel.ZoneName = core.StringPtr("us-south-1") listSubnetsOptionsModel.VPCID = core.StringPtr("testString") - listSubnetsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listSubnetsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listSubnetsOptionsModel.VPCName = core.StringPtr("my-vpc") listSubnetsOptionsModel.RoutingTableID = core.StringPtr("testString") listSubnetsOptionsModel.RoutingTableName = core.StringPtr("my-routing-table") @@ -9177,7 +9178,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["zone.name"]).To(Equal([]string{"us-south-1"})) Expect(req.URL.Query()["vpc.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) + Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"my-vpc"})) Expect(req.URL.Query()["routing_table.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["routing_table.name"]).To(Equal([]string{"my-routing-table"})) @@ -9187,7 +9188,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/subnets?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/subnets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "subnets": [{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/subnets?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/subnets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "subnets": [{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}`) })) }) It(`Invoke ListSubnets successfully with retries`, func() { @@ -9207,7 +9208,7 @@ var _ = Describe(`VpcV1`, func() { listSubnetsOptionsModel.ResourceGroupID = core.StringPtr("testString") listSubnetsOptionsModel.ZoneName = core.StringPtr("us-south-1") listSubnetsOptionsModel.VPCID = core.StringPtr("testString") - listSubnetsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listSubnetsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listSubnetsOptionsModel.VPCName = core.StringPtr("my-vpc") listSubnetsOptionsModel.RoutingTableID = core.StringPtr("testString") listSubnetsOptionsModel.RoutingTableName = core.StringPtr("my-routing-table") @@ -9254,14 +9255,14 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["zone.name"]).To(Equal([]string{"us-south-1"})) Expect(req.URL.Query()["vpc.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) + Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"my-vpc"})) Expect(req.URL.Query()["routing_table.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["routing_table.name"]).To(Equal([]string{"my-routing-table"})) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/subnets?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/subnets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "subnets": [{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/subnets?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/subnets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "subnets": [{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}`) })) }) It(`Invoke ListSubnets successfully`, func() { @@ -9286,7 +9287,7 @@ var _ = Describe(`VpcV1`, func() { listSubnetsOptionsModel.ResourceGroupID = core.StringPtr("testString") listSubnetsOptionsModel.ZoneName = core.StringPtr("us-south-1") listSubnetsOptionsModel.VPCID = core.StringPtr("testString") - listSubnetsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listSubnetsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listSubnetsOptionsModel.VPCName = core.StringPtr("my-vpc") listSubnetsOptionsModel.RoutingTableID = core.StringPtr("testString") listSubnetsOptionsModel.RoutingTableName = core.StringPtr("my-routing-table") @@ -9315,7 +9316,7 @@ var _ = Describe(`VpcV1`, func() { listSubnetsOptionsModel.ResourceGroupID = core.StringPtr("testString") listSubnetsOptionsModel.ZoneName = core.StringPtr("us-south-1") listSubnetsOptionsModel.VPCID = core.StringPtr("testString") - listSubnetsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listSubnetsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listSubnetsOptionsModel.VPCName = core.StringPtr("my-vpc") listSubnetsOptionsModel.RoutingTableID = core.StringPtr("testString") listSubnetsOptionsModel.RoutingTableName = core.StringPtr("my-routing-table") @@ -9358,7 +9359,7 @@ var _ = Describe(`VpcV1`, func() { listSubnetsOptionsModel.ResourceGroupID = core.StringPtr("testString") listSubnetsOptionsModel.ZoneName = core.StringPtr("us-south-1") listSubnetsOptionsModel.VPCID = core.StringPtr("testString") - listSubnetsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listSubnetsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listSubnetsOptionsModel.VPCName = core.StringPtr("my-vpc") listSubnetsOptionsModel.RoutingTableID = core.StringPtr("testString") listSubnetsOptionsModel.RoutingTableName = core.StringPtr("my-routing-table") @@ -9420,9 +9421,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"subnets":[{"available_ipv4_address_count":15,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","ip_version":"ipv4","ipv4_cidr_block":"10.0.0.0/24","name":"my-subnet","network_acl":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl"},"public_gateway":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241","id":"dc5431ef-1fc6-4861-adc9-a59d077d1241","name":"my-public-gateway","resource_type":"public_gateway"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"subnet","routing_table":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","name":"my-routing-table-1","resource_type":"routing_table"},"status":"available","total_ipv4_address_count":256,"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"subnets":[{"available_ipv4_address_count":15,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","ip_version":"ipv4","ipv4_cidr_block":"10.0.0.0/24","name":"my-subnet","network_acl":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl"},"public_gateway":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241","id":"dc5431ef-1fc6-4861-adc9-a59d077d1241","name":"my-public-gateway","resource_type":"public_gateway"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"subnet","routing_table":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840","id":"r006-6885e83f-03b2-4603-8a86-db2a0f55c840","name":"my-routing-table-1","resource_type":"routing_table"},"status":"available","total_ipv4_address_count":256,"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"subnets":[{"available_ipv4_address_count":15,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","ip_version":"ipv4","ipv4_cidr_block":"10.0.0.0/24","name":"my-subnet","network_acl":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl"},"public_gateway":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241","id":"dc5431ef-1fc6-4861-adc9-a59d077d1241","name":"my-public-gateway","resource_type":"public_gateway"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"subnet","routing_table":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","name":"my-routing-table-1","resource_type":"routing_table"},"status":"available","total_ipv4_address_count":256,"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}`) + fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"subnets":[{"available_ipv4_address_count":15,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","ip_version":"ipv4","ipv4_cidr_block":"10.0.0.0/24","name":"my-subnet","network_acl":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl"},"public_gateway":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241","id":"dc5431ef-1fc6-4861-adc9-a59d077d1241","name":"my-public-gateway","resource_type":"public_gateway"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"subnet","routing_table":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840","id":"r006-6885e83f-03b2-4603-8a86-db2a0f55c840","name":"my-routing-table-1","resource_type":"routing_table"},"status":"available","total_ipv4_address_count":256,"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}`) } else { res.WriteHeader(400) } @@ -9442,7 +9443,7 @@ var _ = Describe(`VpcV1`, func() { ResourceGroupID: core.StringPtr("testString"), ZoneName: core.StringPtr("us-south-1"), VPCID: core.StringPtr("testString"), - VPCCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"), + VPCCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"), VPCName: core.StringPtr("my-vpc"), RoutingTableID: core.StringPtr("testString"), RoutingTableName: core.StringPtr("my-routing-table"), @@ -9475,7 +9476,7 @@ var _ = Describe(`VpcV1`, func() { ResourceGroupID: core.StringPtr("testString"), ZoneName: core.StringPtr("us-south-1"), VPCID: core.StringPtr("testString"), - VPCCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"), + VPCCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"), VPCName: core.StringPtr("my-vpc"), RoutingTableID: core.StringPtr("testString"), RoutingTableName: core.StringPtr("my-routing-table"), @@ -9613,7 +9614,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke CreateSubnet successfully with retries`, func() { @@ -9722,7 +9723,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke CreateSubnet successfully`, func() { @@ -10071,7 +10072,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetSubnet successfully with retries`, func() { @@ -10128,7 +10129,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetSubnet successfully`, func() { @@ -10334,7 +10335,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke UpdateSubnet successfully with retries`, func() { @@ -10429,7 +10430,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke UpdateSubnet successfully`, func() { @@ -10663,7 +10664,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke GetSubnetNetworkACL successfully with retries`, func() { @@ -10720,7 +10721,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke GetSubnetNetworkACL successfully`, func() { @@ -10848,7 +10849,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the NetworkACLIdentityByID model networkACLIdentityModel := new(vpcv1.NetworkACLIdentityByID) - networkACLIdentityModel.ID = core.StringPtr("a4e28308-8ee7-46ab-8108-9f881f22bdbf") + networkACLIdentityModel.ID = core.StringPtr("r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf") // Construct an instance of the ReplaceSubnetNetworkACLOptions model replaceSubnetNetworkACLOptionsModel := new(vpcv1.ReplaceSubnetNetworkACLOptions) @@ -10909,7 +10910,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke ReplaceSubnetNetworkACL successfully with retries`, func() { @@ -10924,7 +10925,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the NetworkACLIdentityByID model networkACLIdentityModel := new(vpcv1.NetworkACLIdentityByID) - networkACLIdentityModel.ID = core.StringPtr("a4e28308-8ee7-46ab-8108-9f881f22bdbf") + networkACLIdentityModel.ID = core.StringPtr("r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf") // Construct an instance of the ReplaceSubnetNetworkACLOptions model replaceSubnetNetworkACLOptionsModel := new(vpcv1.ReplaceSubnetNetworkACLOptions) @@ -10987,7 +10988,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke ReplaceSubnetNetworkACL successfully`, func() { @@ -11007,7 +11008,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the NetworkACLIdentityByID model networkACLIdentityModel := new(vpcv1.NetworkACLIdentityByID) - networkACLIdentityModel.ID = core.StringPtr("a4e28308-8ee7-46ab-8108-9f881f22bdbf") + networkACLIdentityModel.ID = core.StringPtr("r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf") // Construct an instance of the ReplaceSubnetNetworkACLOptions model replaceSubnetNetworkACLOptionsModel := new(vpcv1.ReplaceSubnetNetworkACLOptions) @@ -11033,7 +11034,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the NetworkACLIdentityByID model networkACLIdentityModel := new(vpcv1.NetworkACLIdentityByID) - networkACLIdentityModel.ID = core.StringPtr("a4e28308-8ee7-46ab-8108-9f881f22bdbf") + networkACLIdentityModel.ID = core.StringPtr("r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf") // Construct an instance of the ReplaceSubnetNetworkACLOptions model replaceSubnetNetworkACLOptionsModel := new(vpcv1.ReplaceSubnetNetworkACLOptions) @@ -11080,7 +11081,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the NetworkACLIdentityByID model networkACLIdentityModel := new(vpcv1.NetworkACLIdentityByID) - networkACLIdentityModel.ID = core.StringPtr("a4e28308-8ee7-46ab-8108-9f881f22bdbf") + networkACLIdentityModel.ID = core.StringPtr("r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf") // Construct an instance of the ReplaceSubnetNetworkACLOptions model replaceSubnetNetworkACLOptionsModel := new(vpcv1.ReplaceSubnetNetworkACLOptions) @@ -11243,7 +11244,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetSubnetPublicGateway successfully with retries`, func() { @@ -11300,7 +11301,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetSubnetPublicGateway successfully`, func() { @@ -11489,7 +11490,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke SetSubnetPublicGateway successfully with retries`, func() { @@ -11567,7 +11568,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke SetSubnetPublicGateway successfully`, func() { @@ -11750,7 +11751,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"accept_routes_from": [{"resource_type": "vpn_server"}], "advertise_routes_to": ["transit_gateway"], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": false, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": true, "route_internet_ingress": true, "route_transit_gateway_ingress": true, "route_vpc_zone_ingress": false, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}`) + fmt.Fprintf(res, "%s", `{"accept_routes_from": [{"resource_type": "vpn_server"}], "advertise_routes_to": ["transit_gateway"], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "is_default": false, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": true, "route_internet_ingress": true, "route_transit_gateway_ingress": true, "route_vpc_zone_ingress": false, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}`) })) }) It(`Invoke GetSubnetRoutingTable successfully with retries`, func() { @@ -11807,7 +11808,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"accept_routes_from": [{"resource_type": "vpn_server"}], "advertise_routes_to": ["transit_gateway"], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": false, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": true, "route_internet_ingress": true, "route_transit_gateway_ingress": true, "route_vpc_zone_ingress": false, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}`) + fmt.Fprintf(res, "%s", `{"accept_routes_from": [{"resource_type": "vpn_server"}], "advertise_routes_to": ["transit_gateway"], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "is_default": false, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": true, "route_internet_ingress": true, "route_transit_gateway_ingress": true, "route_vpc_zone_ingress": false, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}`) })) }) It(`Invoke GetSubnetRoutingTable successfully`, func() { @@ -11935,7 +11936,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the RoutingTableIdentityByID model routingTableIdentityModel := new(vpcv1.RoutingTableIdentityByID) - routingTableIdentityModel.ID = core.StringPtr("1a15dca5-7e33-45e1-b7c5-bc690e569531") + routingTableIdentityModel.ID = core.StringPtr("r006-6885e83f-03b2-4603-8a86-db2a0f55c840") // Construct an instance of the ReplaceSubnetRoutingTableOptions model replaceSubnetRoutingTableOptionsModel := new(vpcv1.ReplaceSubnetRoutingTableOptions) @@ -11996,7 +11997,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"accept_routes_from": [{"resource_type": "vpn_server"}], "advertise_routes_to": ["transit_gateway"], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": false, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": true, "route_internet_ingress": true, "route_transit_gateway_ingress": true, "route_vpc_zone_ingress": false, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}`) + fmt.Fprintf(res, "%s", `{"accept_routes_from": [{"resource_type": "vpn_server"}], "advertise_routes_to": ["transit_gateway"], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "is_default": false, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": true, "route_internet_ingress": true, "route_transit_gateway_ingress": true, "route_vpc_zone_ingress": false, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}`) })) }) It(`Invoke ReplaceSubnetRoutingTable successfully with retries`, func() { @@ -12011,7 +12012,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the RoutingTableIdentityByID model routingTableIdentityModel := new(vpcv1.RoutingTableIdentityByID) - routingTableIdentityModel.ID = core.StringPtr("1a15dca5-7e33-45e1-b7c5-bc690e569531") + routingTableIdentityModel.ID = core.StringPtr("r006-6885e83f-03b2-4603-8a86-db2a0f55c840") // Construct an instance of the ReplaceSubnetRoutingTableOptions model replaceSubnetRoutingTableOptionsModel := new(vpcv1.ReplaceSubnetRoutingTableOptions) @@ -12074,7 +12075,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"accept_routes_from": [{"resource_type": "vpn_server"}], "advertise_routes_to": ["transit_gateway"], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": false, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": true, "route_internet_ingress": true, "route_transit_gateway_ingress": true, "route_vpc_zone_ingress": false, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}`) + fmt.Fprintf(res, "%s", `{"accept_routes_from": [{"resource_type": "vpn_server"}], "advertise_routes_to": ["transit_gateway"], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "is_default": false, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": true, "route_internet_ingress": true, "route_transit_gateway_ingress": true, "route_vpc_zone_ingress": false, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}`) })) }) It(`Invoke ReplaceSubnetRoutingTable successfully`, func() { @@ -12094,7 +12095,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the RoutingTableIdentityByID model routingTableIdentityModel := new(vpcv1.RoutingTableIdentityByID) - routingTableIdentityModel.ID = core.StringPtr("1a15dca5-7e33-45e1-b7c5-bc690e569531") + routingTableIdentityModel.ID = core.StringPtr("r006-6885e83f-03b2-4603-8a86-db2a0f55c840") // Construct an instance of the ReplaceSubnetRoutingTableOptions model replaceSubnetRoutingTableOptionsModel := new(vpcv1.ReplaceSubnetRoutingTableOptions) @@ -12120,7 +12121,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the RoutingTableIdentityByID model routingTableIdentityModel := new(vpcv1.RoutingTableIdentityByID) - routingTableIdentityModel.ID = core.StringPtr("1a15dca5-7e33-45e1-b7c5-bc690e569531") + routingTableIdentityModel.ID = core.StringPtr("r006-6885e83f-03b2-4603-8a86-db2a0f55c840") // Construct an instance of the ReplaceSubnetRoutingTableOptions model replaceSubnetRoutingTableOptionsModel := new(vpcv1.ReplaceSubnetRoutingTableOptions) @@ -12167,7 +12168,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the RoutingTableIdentityByID model routingTableIdentityModel := new(vpcv1.RoutingTableIdentityByID) - routingTableIdentityModel.ID = core.StringPtr("1a15dca5-7e33-45e1-b7c5-bc690e569531") + routingTableIdentityModel.ID = core.StringPtr("r006-6885e83f-03b2-4603-8a86-db2a0f55c840") // Construct an instance of the ReplaceSubnetRoutingTableOptions model replaceSubnetRoutingTableOptionsModel := new(vpcv1.ReplaceSubnetRoutingTableOptions) @@ -12205,7 +12206,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["sort"]).To(Equal([]string{"name"})) Expect(req.URL.Query()["target.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["target.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727"})) + Expect(req.URL.Query()["target.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727"})) Expect(req.URL.Query()["target.name"]).To(Equal([]string{"my-resource"})) Expect(req.URL.Query()["target.resource_type"]).To(Equal([]string{"testString"})) res.Header().Set("Content-type", "application/json") @@ -12229,7 +12230,7 @@ var _ = Describe(`VpcV1`, func() { listSubnetReservedIpsOptionsModel.Limit = core.Int64Ptr(int64(10)) listSubnetReservedIpsOptionsModel.Sort = core.StringPtr("name") listSubnetReservedIpsOptionsModel.TargetID = core.StringPtr("testString") - listSubnetReservedIpsOptionsModel.TargetCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727") + listSubnetReservedIpsOptionsModel.TargetCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727") listSubnetReservedIpsOptionsModel.TargetName = core.StringPtr("my-resource") listSubnetReservedIpsOptionsModel.TargetResourceType = core.StringPtr("testString") listSubnetReservedIpsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -12269,7 +12270,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["sort"]).To(Equal([]string{"name"})) Expect(req.URL.Query()["target.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["target.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727"})) + Expect(req.URL.Query()["target.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727"})) Expect(req.URL.Query()["target.name"]).To(Equal([]string{"my-resource"})) Expect(req.URL.Query()["target.resource_type"]).To(Equal([]string{"testString"})) // Sleep a short time to support a timeout test @@ -12278,7 +12279,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "reserved_ips": [{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "reserved_ips": [{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "total_count": 132}`) })) }) It(`Invoke ListSubnetReservedIps successfully with retries`, func() { @@ -12298,7 +12299,7 @@ var _ = Describe(`VpcV1`, func() { listSubnetReservedIpsOptionsModel.Limit = core.Int64Ptr(int64(10)) listSubnetReservedIpsOptionsModel.Sort = core.StringPtr("name") listSubnetReservedIpsOptionsModel.TargetID = core.StringPtr("testString") - listSubnetReservedIpsOptionsModel.TargetCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727") + listSubnetReservedIpsOptionsModel.TargetCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727") listSubnetReservedIpsOptionsModel.TargetName = core.StringPtr("my-resource") listSubnetReservedIpsOptionsModel.TargetResourceType = core.StringPtr("testString") listSubnetReservedIpsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -12343,13 +12344,13 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["sort"]).To(Equal([]string{"name"})) Expect(req.URL.Query()["target.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["target.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727"})) + Expect(req.URL.Query()["target.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727"})) Expect(req.URL.Query()["target.name"]).To(Equal([]string{"my-resource"})) Expect(req.URL.Query()["target.resource_type"]).To(Equal([]string{"testString"})) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "reserved_ips": [{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "reserved_ips": [{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "total_count": 132}`) })) }) It(`Invoke ListSubnetReservedIps successfully`, func() { @@ -12374,7 +12375,7 @@ var _ = Describe(`VpcV1`, func() { listSubnetReservedIpsOptionsModel.Limit = core.Int64Ptr(int64(10)) listSubnetReservedIpsOptionsModel.Sort = core.StringPtr("name") listSubnetReservedIpsOptionsModel.TargetID = core.StringPtr("testString") - listSubnetReservedIpsOptionsModel.TargetCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727") + listSubnetReservedIpsOptionsModel.TargetCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727") listSubnetReservedIpsOptionsModel.TargetName = core.StringPtr("my-resource") listSubnetReservedIpsOptionsModel.TargetResourceType = core.StringPtr("testString") listSubnetReservedIpsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -12402,7 +12403,7 @@ var _ = Describe(`VpcV1`, func() { listSubnetReservedIpsOptionsModel.Limit = core.Int64Ptr(int64(10)) listSubnetReservedIpsOptionsModel.Sort = core.StringPtr("name") listSubnetReservedIpsOptionsModel.TargetID = core.StringPtr("testString") - listSubnetReservedIpsOptionsModel.TargetCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727") + listSubnetReservedIpsOptionsModel.TargetCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727") listSubnetReservedIpsOptionsModel.TargetName = core.StringPtr("my-resource") listSubnetReservedIpsOptionsModel.TargetResourceType = core.StringPtr("testString") listSubnetReservedIpsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -12451,7 +12452,7 @@ var _ = Describe(`VpcV1`, func() { listSubnetReservedIpsOptionsModel.Limit = core.Int64Ptr(int64(10)) listSubnetReservedIpsOptionsModel.Sort = core.StringPtr("name") listSubnetReservedIpsOptionsModel.TargetID = core.StringPtr("testString") - listSubnetReservedIpsOptionsModel.TargetCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727") + listSubnetReservedIpsOptionsModel.TargetCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727") listSubnetReservedIpsOptionsModel.TargetName = core.StringPtr("my-resource") listSubnetReservedIpsOptionsModel.TargetResourceType = core.StringPtr("testString") listSubnetReservedIpsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -12512,9 +12513,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"reserved_ips":[{"address":"192.168.3.4","auto_delete":false,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","lifecycle_state":"stable","name":"my-reserved-ip","owner":"user","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","name":"my-endpoint-gateway","resource_type":"endpoint_gateway"}}],"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"reserved_ips":[{"address":"192.168.3.4","auto_delete":false,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","lifecycle_state":"stable","name":"my-reserved-ip","owner":"user","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","name":"my-endpoint-gateway","resource_type":"endpoint_gateway"}}],"total_count":2,"limit":1}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"reserved_ips":[{"address":"192.168.3.4","auto_delete":false,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","lifecycle_state":"stable","name":"my-reserved-ip","owner":"user","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","name":"my-endpoint-gateway","resource_type":"endpoint_gateway"}}],"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"reserved_ips":[{"address":"192.168.3.4","auto_delete":false,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","lifecycle_state":"stable","name":"my-reserved-ip","owner":"user","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","name":"my-endpoint-gateway","resource_type":"endpoint_gateway"}}],"total_count":2,"limit":1}`) } else { res.WriteHeader(400) } @@ -12534,7 +12535,7 @@ var _ = Describe(`VpcV1`, func() { Limit: core.Int64Ptr(int64(10)), Sort: core.StringPtr("name"), TargetID: core.StringPtr("testString"), - TargetCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727"), + TargetCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727"), TargetName: core.StringPtr("my-resource"), TargetResourceType: core.StringPtr("testString"), } @@ -12566,7 +12567,7 @@ var _ = Describe(`VpcV1`, func() { Limit: core.Int64Ptr(int64(10)), Sort: core.StringPtr("name"), TargetID: core.StringPtr("testString"), - TargetCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727"), + TargetCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727"), TargetName: core.StringPtr("my-resource"), TargetResourceType: core.StringPtr("testString"), } @@ -12675,7 +12676,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}`) + fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}`) })) }) It(`Invoke CreateSubnetReservedIP successfully with retries`, func() { @@ -12756,7 +12757,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}`) + fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}`) })) }) It(`Invoke CreateSubnetReservedIP successfully`, func() { @@ -13024,7 +13025,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}`) + fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}`) })) }) It(`Invoke GetSubnetReservedIP successfully with retries`, func() { @@ -13082,7 +13083,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}`) + fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}`) })) }) It(`Invoke GetSubnetReservedIP successfully`, func() { @@ -13278,7 +13279,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}`) + fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}`) })) }) It(`Invoke UpdateSubnetReservedIP successfully with retries`, func() { @@ -13360,7 +13361,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}`) + fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}`) })) }) It(`Invoke UpdateSubnetReservedIP successfully`, func() { @@ -13570,7 +13571,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/images?limit=20"}, "images": [{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 22, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/images?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/images?limit=20"}, "images": [{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 22, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/images?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListImages successfully with retries`, func() { @@ -13637,7 +13638,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/images?limit=20"}, "images": [{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 22, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/images?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/images?limit=20"}, "images": [{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 22, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/images?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListImages successfully`, func() { @@ -13787,9 +13788,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"images":[{"catalog_offering":{"managed":false,"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deprecation_at":"2019-01-01T12:00:00.000Z","encryption":"user_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"file":{"checksums":{"sha256":"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"},"size":1},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","minimum_provisioned_size":22,"name":"my-image","obsolescence_at":"2019-01-01T12:00:00.000Z","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"image","source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"volume"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"Message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"visibility":"private"}],"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"images":[{"catalog_offering":{"managed":false,"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deprecation_at":"2019-01-01T12:00:00.000Z","encryption":"user_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"file":{"checksums":{"sha256":"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"},"size":1},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","minimum_provisioned_size":22,"name":"my-image","obsolescence_at":"2019-01-01T12:00:00.000Z","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"image","source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"volume"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"Message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"visibility":"private"}],"total_count":2,"limit":1}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"images":[{"catalog_offering":{"managed":false,"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deprecation_at":"2019-01-01T12:00:00.000Z","encryption":"user_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"file":{"checksums":{"sha256":"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"},"size":1},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","minimum_provisioned_size":22,"name":"my-image","obsolescence_at":"2019-01-01T12:00:00.000Z","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"image","source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"volume"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"Message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"visibility":"private"}],"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"images":[{"catalog_offering":{"managed":false,"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deprecation_at":"2019-01-01T12:00:00.000Z","encryption":"user_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"file":{"checksums":{"sha256":"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"},"size":1},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","minimum_provisioned_size":22,"name":"my-image","obsolescence_at":"2019-01-01T12:00:00.000Z","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"image","source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"volume"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"Message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"visibility":"private"}],"total_count":2,"limit":1}`) } else { res.WriteHeader(400) } @@ -13886,7 +13887,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the ImageFilePrototype model imageFilePrototypeModel := new(vpcv1.ImageFilePrototype) @@ -13965,7 +13966,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 22, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}`) + fmt.Fprintf(res, "%s", `{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 22, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}`) })) }) It(`Invoke CreateImage successfully with retries`, func() { @@ -13984,7 +13985,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the ImageFilePrototype model imageFilePrototypeModel := new(vpcv1.ImageFilePrototype) @@ -14065,7 +14066,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 22, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}`) + fmt.Fprintf(res, "%s", `{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 22, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}`) })) }) It(`Invoke CreateImage successfully`, func() { @@ -14089,7 +14090,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the ImageFilePrototype model imageFilePrototypeModel := new(vpcv1.ImageFilePrototype) @@ -14137,7 +14138,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the ImageFilePrototype model imageFilePrototypeModel := new(vpcv1.ImageFilePrototype) @@ -14206,7 +14207,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the ImageFilePrototype model imageFilePrototypeModel := new(vpcv1.ImageFilePrototype) @@ -14387,7 +14388,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 22, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}`) + fmt.Fprintf(res, "%s", `{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 22, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}`) })) }) It(`Invoke GetImage successfully with retries`, func() { @@ -14444,7 +14445,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 22, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}`) + fmt.Fprintf(res, "%s", `{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 22, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}`) })) }) It(`Invoke GetImage successfully`, func() { @@ -14637,7 +14638,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 22, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}`) + fmt.Fprintf(res, "%s", `{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 22, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}`) })) }) It(`Invoke UpdateImage successfully with retries`, func() { @@ -14719,7 +14720,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 22, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}`) + fmt.Fprintf(res, "%s", `{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 22, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}`) })) }) It(`Invoke UpdateImage successfully`, func() { @@ -15063,7 +15064,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"export_jobs": [{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhbiBlbmNvZGVkIGJ5dGUgYXJyYXku", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r134-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r134-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "Message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/123456:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}]}`) + fmt.Fprintf(res, "%s", `{"export_jobs": [{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r134-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r134-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "Message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}]}`) })) }) It(`Invoke ListImageExportJobs successfully with retries`, func() { @@ -15122,7 +15123,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"export_jobs": [{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhbiBlbmNvZGVkIGJ5dGUgYXJyYXku", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r134-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r134-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "Message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/123456:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}]}`) + fmt.Fprintf(res, "%s", `{"export_jobs": [{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r134-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r134-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "Message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}]}`) })) }) It(`Invoke ListImageExportJobs successfully`, func() { @@ -15316,7 +15317,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhbiBlbmNvZGVkIGJ5dGUgYXJyYXku", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r134-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r134-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "Message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/123456:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}`) + fmt.Fprintf(res, "%s", `{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r134-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r134-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "Message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}`) })) }) It(`Invoke CreateImageExportJob successfully with retries`, func() { @@ -15396,7 +15397,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhbiBlbmNvZGVkIGJ5dGUgYXJyYXku", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r134-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r134-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "Message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/123456:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}`) + fmt.Fprintf(res, "%s", `{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r134-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r134-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "Message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}`) })) }) It(`Invoke CreateImageExportJob successfully`, func() { @@ -15661,7 +15662,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhbiBlbmNvZGVkIGJ5dGUgYXJyYXku", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r134-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r134-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "Message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/123456:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}`) + fmt.Fprintf(res, "%s", `{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r134-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r134-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "Message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}`) })) }) It(`Invoke GetImageExportJob successfully with retries`, func() { @@ -15719,7 +15720,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhbiBlbmNvZGVkIGJ5dGUgYXJyYXku", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r134-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r134-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "Message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/123456:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}`) + fmt.Fprintf(res, "%s", `{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r134-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r134-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "Message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}`) })) }) It(`Invoke GetImageExportJob successfully`, func() { @@ -15914,7 +15915,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhbiBlbmNvZGVkIGJ5dGUgYXJyYXku", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r134-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r134-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "Message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/123456:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}`) + fmt.Fprintf(res, "%s", `{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r134-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r134-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "Message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}`) })) }) It(`Invoke UpdateImageExportJob successfully with retries`, func() { @@ -15995,7 +15996,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhbiBlbmNvZGVkIGJ5dGUgYXJyYXku", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r134-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r134-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "Message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/123456:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}`) + fmt.Fprintf(res, "%s", `{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r134-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r134-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "Message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}`) })) }) It(`Invoke UpdateImageExportJob successfully`, func() { @@ -16747,7 +16748,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/keys?limit=20"}, "keys": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "length": 2048, "name": "my-key", "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "type": "ed25519"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/keys?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/keys?limit=20"}, "keys": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "length": 2048, "name": "my-key", "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "type": "ed25519"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/keys?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListKeys successfully with retries`, func() { @@ -16807,7 +16808,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/keys?limit=20"}, "keys": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "length": 2048, "name": "my-key", "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "type": "ed25519"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/keys?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/keys?limit=20"}, "keys": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "length": 2048, "name": "my-key", "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "type": "ed25519"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/keys?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListKeys successfully`, func() { @@ -16945,9 +16946,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"keys":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803","fingerprint":"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY","href":"https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803","id":"a6b1a881-2ce8-41a3-80fc-36316a73f803","length":2048,"name":"my-key","public_key":"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"type":"ed25519"}],"limit":1}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"keys":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:a6b1a881-2ce8-41a3-80fc-36316a73f803","fingerprint":"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY","href":"https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803","id":"a6b1a881-2ce8-41a3-80fc-36316a73f803","length":2048,"name":"my-key","public_key":"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"type":"ed25519"}],"limit":1}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"total_count":2,"keys":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803","fingerprint":"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY","href":"https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803","id":"a6b1a881-2ce8-41a3-80fc-36316a73f803","length":2048,"name":"my-key","public_key":"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"type":"ed25519"}],"limit":1}`) + fmt.Fprintf(res, "%s", `{"total_count":2,"keys":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:a6b1a881-2ce8-41a3-80fc-36316a73f803","fingerprint":"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY","href":"https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803","id":"a6b1a881-2ce8-41a3-80fc-36316a73f803","length":2048,"name":"my-key","public_key":"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"type":"ed25519"}],"limit":1}`) } else { res.WriteHeader(400) } @@ -17095,7 +17096,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "length": 2048, "name": "my-key", "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "type": "ed25519"}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "length": 2048, "name": "my-key", "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "type": "ed25519"}`) })) }) It(`Invoke CreateKey successfully with retries`, func() { @@ -17175,7 +17176,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "length": 2048, "name": "my-key", "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "type": "ed25519"}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "length": 2048, "name": "my-key", "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "type": "ed25519"}`) })) }) It(`Invoke CreateKey successfully`, func() { @@ -17437,7 +17438,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "length": 2048, "name": "my-key", "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "type": "ed25519"}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "length": 2048, "name": "my-key", "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "type": "ed25519"}`) })) }) It(`Invoke GetKey successfully with retries`, func() { @@ -17494,7 +17495,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "length": 2048, "name": "my-key", "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "type": "ed25519"}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "length": 2048, "name": "my-key", "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "type": "ed25519"}`) })) }) It(`Invoke GetKey successfully`, func() { @@ -17685,7 +17686,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "length": 2048, "name": "my-key", "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "type": "ed25519"}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "length": 2048, "name": "my-key", "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "type": "ed25519"}`) })) }) It(`Invoke UpdateKey successfully with retries`, func() { @@ -17765,7 +17766,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "length": 2048, "name": "my-key", "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "type": "ed25519"}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "length": 2048, "name": "my-key", "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "type": "ed25519"}`) })) }) It(`Invoke UpdateKey successfully`, func() { @@ -18391,7 +18392,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "templates": [{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "UserData", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["UserTags"]}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "templates": [{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "UserData", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["UserTags"]}}, "image": {"id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}], "total_count": 132}`) })) }) It(`Invoke ListInstanceTemplates successfully with retries`, func() { @@ -18447,7 +18448,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "templates": [{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "UserData", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["UserTags"]}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "templates": [{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "UserData", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["UserTags"]}}, "image": {"id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}], "total_count": 132}`) })) }) It(`Invoke ListInstanceTemplates successfully`, func() { @@ -18588,7 +18589,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID model instancePlacementTargetPrototypeModel := new(vpcv1.InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID) - instancePlacementTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + instancePlacementTargetPrototypeModel.ID = core.StringPtr("0717-1e09281b-f177-46fb-baf1-bc152b2e391a") // Construct an instance of the InstanceProfileIdentityByName model instanceProfileIdentityModel := new(vpcv1.InstanceProfileIdentityByName) @@ -18609,7 +18610,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID model volumeAttachmentPrototypeVolumeModel := new(vpcv1.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID) - volumeAttachmentPrototypeVolumeModel.ID = core.StringPtr("1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + volumeAttachmentPrototypeVolumeModel.ID = core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") // Construct an instance of the VolumeAttachmentPrototype model volumeAttachmentPrototypeModel := new(vpcv1.VolumeAttachmentPrototype) @@ -18623,7 +18624,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the VolumeProfileIdentityByName model volumeProfileIdentityModel := new(vpcv1.VolumeProfileIdentityByName) @@ -18754,7 +18755,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "UserData", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["UserTags"]}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}`) + fmt.Fprintf(res, "%s", `{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "UserData", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["UserTags"]}}, "image": {"id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}`) })) }) It(`Invoke CreateInstanceTemplate successfully with retries`, func() { @@ -18792,7 +18793,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID model instancePlacementTargetPrototypeModel := new(vpcv1.InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID) - instancePlacementTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + instancePlacementTargetPrototypeModel.ID = core.StringPtr("0717-1e09281b-f177-46fb-baf1-bc152b2e391a") // Construct an instance of the InstanceProfileIdentityByName model instanceProfileIdentityModel := new(vpcv1.InstanceProfileIdentityByName) @@ -18813,7 +18814,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID model volumeAttachmentPrototypeVolumeModel := new(vpcv1.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID) - volumeAttachmentPrototypeVolumeModel.ID = core.StringPtr("1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + volumeAttachmentPrototypeVolumeModel.ID = core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") // Construct an instance of the VolumeAttachmentPrototype model volumeAttachmentPrototypeModel := new(vpcv1.VolumeAttachmentPrototype) @@ -18827,7 +18828,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the VolumeProfileIdentityByName model volumeProfileIdentityModel := new(vpcv1.VolumeProfileIdentityByName) @@ -18960,7 +18961,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "UserData", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["UserTags"]}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}`) + fmt.Fprintf(res, "%s", `{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "UserData", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["UserTags"]}}, "image": {"id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}`) })) }) It(`Invoke CreateInstanceTemplate successfully`, func() { @@ -19003,7 +19004,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID model instancePlacementTargetPrototypeModel := new(vpcv1.InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID) - instancePlacementTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + instancePlacementTargetPrototypeModel.ID = core.StringPtr("0717-1e09281b-f177-46fb-baf1-bc152b2e391a") // Construct an instance of the InstanceProfileIdentityByName model instanceProfileIdentityModel := new(vpcv1.InstanceProfileIdentityByName) @@ -19024,7 +19025,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID model volumeAttachmentPrototypeVolumeModel := new(vpcv1.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID) - volumeAttachmentPrototypeVolumeModel.ID = core.StringPtr("1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + volumeAttachmentPrototypeVolumeModel.ID = core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") // Construct an instance of the VolumeAttachmentPrototype model volumeAttachmentPrototypeModel := new(vpcv1.VolumeAttachmentPrototype) @@ -19038,7 +19039,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the VolumeProfileIdentityByName model volumeProfileIdentityModel := new(vpcv1.VolumeProfileIdentityByName) @@ -19157,7 +19158,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID model instancePlacementTargetPrototypeModel := new(vpcv1.InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID) - instancePlacementTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + instancePlacementTargetPrototypeModel.ID = core.StringPtr("0717-1e09281b-f177-46fb-baf1-bc152b2e391a") // Construct an instance of the InstanceProfileIdentityByName model instanceProfileIdentityModel := new(vpcv1.InstanceProfileIdentityByName) @@ -19178,7 +19179,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID model volumeAttachmentPrototypeVolumeModel := new(vpcv1.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID) - volumeAttachmentPrototypeVolumeModel.ID = core.StringPtr("1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + volumeAttachmentPrototypeVolumeModel.ID = core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") // Construct an instance of the VolumeAttachmentPrototype model volumeAttachmentPrototypeModel := new(vpcv1.VolumeAttachmentPrototype) @@ -19192,7 +19193,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the VolumeProfileIdentityByName model volumeProfileIdentityModel := new(vpcv1.VolumeProfileIdentityByName) @@ -19332,7 +19333,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID model instancePlacementTargetPrototypeModel := new(vpcv1.InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID) - instancePlacementTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + instancePlacementTargetPrototypeModel.ID = core.StringPtr("0717-1e09281b-f177-46fb-baf1-bc152b2e391a") // Construct an instance of the InstanceProfileIdentityByName model instanceProfileIdentityModel := new(vpcv1.InstanceProfileIdentityByName) @@ -19353,7 +19354,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID model volumeAttachmentPrototypeVolumeModel := new(vpcv1.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID) - volumeAttachmentPrototypeVolumeModel.ID = core.StringPtr("1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + volumeAttachmentPrototypeVolumeModel.ID = core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") // Construct an instance of the VolumeAttachmentPrototype model volumeAttachmentPrototypeModel := new(vpcv1.VolumeAttachmentPrototype) @@ -19367,7 +19368,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the VolumeProfileIdentityByName model volumeProfileIdentityModel := new(vpcv1.VolumeProfileIdentityByName) @@ -19600,7 +19601,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "UserData", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["UserTags"]}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}`) + fmt.Fprintf(res, "%s", `{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "UserData", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["UserTags"]}}, "image": {"id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}`) })) }) It(`Invoke GetInstanceTemplate successfully with retries`, func() { @@ -19657,7 +19658,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "UserData", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["UserTags"]}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}`) + fmt.Fprintf(res, "%s", `{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "UserData", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["UserTags"]}}, "image": {"id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}`) })) }) It(`Invoke GetInstanceTemplate successfully`, func() { @@ -19848,7 +19849,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "UserData", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["UserTags"]}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}`) + fmt.Fprintf(res, "%s", `{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "UserData", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["UserTags"]}}, "image": {"id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}`) })) }) It(`Invoke UpdateInstanceTemplate successfully with retries`, func() { @@ -19928,7 +19929,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "UserData", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["UserTags"]}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}`) + fmt.Fprintf(res, "%s", `{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "UserData", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["UserTags"]}}, "image": {"id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}`) })) }) It(`Invoke UpdateInstanceTemplate successfully`, func() { @@ -20065,18 +20066,18 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) - Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"my-vpc"})) Expect(req.URL.Query()["dedicated_host.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["dedicated_host.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a"})) + Expect(req.URL.Query()["dedicated_host.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a"})) Expect(req.URL.Query()["dedicated_host.name"]).To(Equal([]string{"my-dedicated-host"})) Expect(req.URL.Query()["placement_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["placement_group.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871"})) + Expect(req.URL.Query()["placement_group.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871"})) Expect(req.URL.Query()["placement_group.name"]).To(Equal([]string{"my-placement-group"})) Expect(req.URL.Query()["reservation.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["reservation.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63"})) + Expect(req.URL.Query()["reservation.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63"})) Expect(req.URL.Query()["reservation.name"]).To(Equal([]string{"my-reservation"})) + Expect(req.URL.Query()["vpc.id"]).To(Equal([]string{"testString"})) + Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) + Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"my-vpc"})) res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprint(res, `} this is not valid json {`) @@ -20097,18 +20098,18 @@ var _ = Describe(`VpcV1`, func() { listInstancesOptionsModel.Limit = core.Int64Ptr(int64(10)) listInstancesOptionsModel.ResourceGroupID = core.StringPtr("testString") listInstancesOptionsModel.Name = core.StringPtr("testString") - listInstancesOptionsModel.VPCID = core.StringPtr("testString") - listInstancesOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") - listInstancesOptionsModel.VPCName = core.StringPtr("my-vpc") listInstancesOptionsModel.DedicatedHostID = core.StringPtr("testString") - listInstancesOptionsModel.DedicatedHostCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a") + listInstancesOptionsModel.DedicatedHostCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a") listInstancesOptionsModel.DedicatedHostName = core.StringPtr("my-dedicated-host") listInstancesOptionsModel.PlacementGroupID = core.StringPtr("testString") - listInstancesOptionsModel.PlacementGroupCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871") + listInstancesOptionsModel.PlacementGroupCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871") listInstancesOptionsModel.PlacementGroupName = core.StringPtr("my-placement-group") listInstancesOptionsModel.ReservationID = core.StringPtr("testString") - listInstancesOptionsModel.ReservationCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63") + listInstancesOptionsModel.ReservationCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63") listInstancesOptionsModel.ReservationName = core.StringPtr("my-reservation") + listInstancesOptionsModel.VPCID = core.StringPtr("testString") + listInstancesOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listInstancesOptionsModel.VPCName = core.StringPtr("my-vpc") listInstancesOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Expect response parsing to fail since we are receiving a text/plain response result, response, operationErr := vpcService.ListInstances(listInstancesOptionsModel) @@ -20146,25 +20147,25 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) - Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"my-vpc"})) Expect(req.URL.Query()["dedicated_host.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["dedicated_host.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a"})) + Expect(req.URL.Query()["dedicated_host.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a"})) Expect(req.URL.Query()["dedicated_host.name"]).To(Equal([]string{"my-dedicated-host"})) Expect(req.URL.Query()["placement_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["placement_group.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871"})) + Expect(req.URL.Query()["placement_group.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871"})) Expect(req.URL.Query()["placement_group.name"]).To(Equal([]string{"my-placement-group"})) Expect(req.URL.Query()["reservation.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["reservation.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63"})) + Expect(req.URL.Query()["reservation.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63"})) Expect(req.URL.Query()["reservation.name"]).To(Equal([]string{"my-reservation"})) + Expect(req.URL.Query()["vpc.id"]).To(Equal([]string{"testString"})) + Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) + Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"my-vpc"})) // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances?limit=20"}, "instances": [{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances?limit=20"}, "instances": [{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListInstances successfully with retries`, func() { @@ -20183,18 +20184,18 @@ var _ = Describe(`VpcV1`, func() { listInstancesOptionsModel.Limit = core.Int64Ptr(int64(10)) listInstancesOptionsModel.ResourceGroupID = core.StringPtr("testString") listInstancesOptionsModel.Name = core.StringPtr("testString") - listInstancesOptionsModel.VPCID = core.StringPtr("testString") - listInstancesOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") - listInstancesOptionsModel.VPCName = core.StringPtr("my-vpc") listInstancesOptionsModel.DedicatedHostID = core.StringPtr("testString") - listInstancesOptionsModel.DedicatedHostCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a") + listInstancesOptionsModel.DedicatedHostCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a") listInstancesOptionsModel.DedicatedHostName = core.StringPtr("my-dedicated-host") listInstancesOptionsModel.PlacementGroupID = core.StringPtr("testString") - listInstancesOptionsModel.PlacementGroupCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871") + listInstancesOptionsModel.PlacementGroupCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871") listInstancesOptionsModel.PlacementGroupName = core.StringPtr("my-placement-group") listInstancesOptionsModel.ReservationID = core.StringPtr("testString") - listInstancesOptionsModel.ReservationCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63") + listInstancesOptionsModel.ReservationCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63") listInstancesOptionsModel.ReservationName = core.StringPtr("my-reservation") + listInstancesOptionsModel.VPCID = core.StringPtr("testString") + listInstancesOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listInstancesOptionsModel.VPCName = core.StringPtr("my-vpc") listInstancesOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with a Context to test a timeout error @@ -20237,22 +20238,22 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) - Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"my-vpc"})) Expect(req.URL.Query()["dedicated_host.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["dedicated_host.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a"})) + Expect(req.URL.Query()["dedicated_host.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a"})) Expect(req.URL.Query()["dedicated_host.name"]).To(Equal([]string{"my-dedicated-host"})) Expect(req.URL.Query()["placement_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["placement_group.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871"})) + Expect(req.URL.Query()["placement_group.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871"})) Expect(req.URL.Query()["placement_group.name"]).To(Equal([]string{"my-placement-group"})) Expect(req.URL.Query()["reservation.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["reservation.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63"})) + Expect(req.URL.Query()["reservation.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63"})) Expect(req.URL.Query()["reservation.name"]).To(Equal([]string{"my-reservation"})) + Expect(req.URL.Query()["vpc.id"]).To(Equal([]string{"testString"})) + Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) + Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"my-vpc"})) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances?limit=20"}, "instances": [{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances?limit=20"}, "instances": [{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListInstances successfully`, func() { @@ -20276,18 +20277,18 @@ var _ = Describe(`VpcV1`, func() { listInstancesOptionsModel.Limit = core.Int64Ptr(int64(10)) listInstancesOptionsModel.ResourceGroupID = core.StringPtr("testString") listInstancesOptionsModel.Name = core.StringPtr("testString") - listInstancesOptionsModel.VPCID = core.StringPtr("testString") - listInstancesOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") - listInstancesOptionsModel.VPCName = core.StringPtr("my-vpc") listInstancesOptionsModel.DedicatedHostID = core.StringPtr("testString") - listInstancesOptionsModel.DedicatedHostCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a") + listInstancesOptionsModel.DedicatedHostCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a") listInstancesOptionsModel.DedicatedHostName = core.StringPtr("my-dedicated-host") listInstancesOptionsModel.PlacementGroupID = core.StringPtr("testString") - listInstancesOptionsModel.PlacementGroupCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871") + listInstancesOptionsModel.PlacementGroupCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871") listInstancesOptionsModel.PlacementGroupName = core.StringPtr("my-placement-group") listInstancesOptionsModel.ReservationID = core.StringPtr("testString") - listInstancesOptionsModel.ReservationCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63") + listInstancesOptionsModel.ReservationCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63") listInstancesOptionsModel.ReservationName = core.StringPtr("my-reservation") + listInstancesOptionsModel.VPCID = core.StringPtr("testString") + listInstancesOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listInstancesOptionsModel.VPCName = core.StringPtr("my-vpc") listInstancesOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -20312,18 +20313,18 @@ var _ = Describe(`VpcV1`, func() { listInstancesOptionsModel.Limit = core.Int64Ptr(int64(10)) listInstancesOptionsModel.ResourceGroupID = core.StringPtr("testString") listInstancesOptionsModel.Name = core.StringPtr("testString") - listInstancesOptionsModel.VPCID = core.StringPtr("testString") - listInstancesOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") - listInstancesOptionsModel.VPCName = core.StringPtr("my-vpc") listInstancesOptionsModel.DedicatedHostID = core.StringPtr("testString") - listInstancesOptionsModel.DedicatedHostCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a") + listInstancesOptionsModel.DedicatedHostCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a") listInstancesOptionsModel.DedicatedHostName = core.StringPtr("my-dedicated-host") listInstancesOptionsModel.PlacementGroupID = core.StringPtr("testString") - listInstancesOptionsModel.PlacementGroupCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871") + listInstancesOptionsModel.PlacementGroupCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871") listInstancesOptionsModel.PlacementGroupName = core.StringPtr("my-placement-group") listInstancesOptionsModel.ReservationID = core.StringPtr("testString") - listInstancesOptionsModel.ReservationCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63") + listInstancesOptionsModel.ReservationCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63") listInstancesOptionsModel.ReservationName = core.StringPtr("my-reservation") + listInstancesOptionsModel.VPCID = core.StringPtr("testString") + listInstancesOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listInstancesOptionsModel.VPCName = core.StringPtr("my-vpc") listInstancesOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -20362,18 +20363,18 @@ var _ = Describe(`VpcV1`, func() { listInstancesOptionsModel.Limit = core.Int64Ptr(int64(10)) listInstancesOptionsModel.ResourceGroupID = core.StringPtr("testString") listInstancesOptionsModel.Name = core.StringPtr("testString") - listInstancesOptionsModel.VPCID = core.StringPtr("testString") - listInstancesOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") - listInstancesOptionsModel.VPCName = core.StringPtr("my-vpc") listInstancesOptionsModel.DedicatedHostID = core.StringPtr("testString") - listInstancesOptionsModel.DedicatedHostCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a") + listInstancesOptionsModel.DedicatedHostCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a") listInstancesOptionsModel.DedicatedHostName = core.StringPtr("my-dedicated-host") listInstancesOptionsModel.PlacementGroupID = core.StringPtr("testString") - listInstancesOptionsModel.PlacementGroupCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871") + listInstancesOptionsModel.PlacementGroupCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871") listInstancesOptionsModel.PlacementGroupName = core.StringPtr("my-placement-group") listInstancesOptionsModel.ReservationID = core.StringPtr("testString") - listInstancesOptionsModel.ReservationCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63") + listInstancesOptionsModel.ReservationCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63") listInstancesOptionsModel.ReservationName = core.StringPtr("my-reservation") + listInstancesOptionsModel.VPCID = core.StringPtr("testString") + listInstancesOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listInstancesOptionsModel.VPCName = core.StringPtr("my-vpc") listInstancesOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation @@ -20432,9 +20433,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"instances":[{"availability_policy":{"host_failure":"restart"},"bandwidth":1000,"boot_volume_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","resource_type":"volume"}},"catalog_offering":{"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a","dedicated_host":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-host","resource_type":"dedicated_host"},"disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","interface_type":"nvme","name":"my-instance-disk","resource_type":"instance_disk","size":100}],"gpu":{"count":1,"manufacturer":"nvidia","memory":1,"model":"Tesla V100"},"health_reasons":[{"code":"reservation_expired","message":"The reservation cannot be used because it has expired.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","image":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"aa2432b1fa4d4ace891e9b80fc104e34","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","memory":8,"metadata_service":{"enabled":false,"protocol":"http","response_hop_limit":1},"name":"my-instance","network_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0767-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0767-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"instance_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"numa_count":2,"placement_target":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_type":"dedicated_host_group"},"primary_network_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0767-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0767-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"instance_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"},"reservation":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"7187-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"},"reservation_affinity":{"policy":"disabled","pool":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"7187-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"}]},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"instance","startable":false,"status":"deleting","status_reasons":[{"code":"cannot_start_storage","message":"The virtual server instance is unusable because the encryption key for the boot volume\\nhas been deleted","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"total_network_bandwidth":500,"total_volume_bandwidth":500,"vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"volume_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","resource_type":"volume"}}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"instances":[{"availability_policy":{"host_failure":"restart"},"bandwidth":1000,"boot_volume_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","resource_type":"volume"}},"catalog_offering":{"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","dedicated_host":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a","id":"0717-1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-host","resource_type":"dedicated_host"},"disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","interface_type":"nvme","name":"my-instance-disk","resource_type":"instance_disk","size":100}],"gpu":{"count":1,"manufacturer":"nvidia","memory":1,"model":"Tesla V100"},"health_reasons":[{"code":"reservation_expired","message":"The reservation cannot be used because it has expired.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a","id":"0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","image":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","memory":8,"metadata_service":{"enabled":false,"protocol":"http","response_hop_limit":1},"name":"my-instance","network_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"instance_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e","id":"0717-10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"numa_count":2,"placement_target":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_type":"dedicated_host_group"},"primary_network_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"instance_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e","id":"0717-10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"},"reservation":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"7187-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"},"reservation_affinity":{"policy":"disabled","pool":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"7187-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"}]},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"instance","startable":false,"status":"deleting","status_reasons":[{"code":"cannot_start_storage","message":"The virtual server instance is unusable because the encryption key for the boot volume\\nhas been deleted","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"total_network_bandwidth":500,"total_volume_bandwidth":500,"vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"volume_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","resource_type":"volume"}}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"instances":[{"availability_policy":{"host_failure":"restart"},"bandwidth":1000,"boot_volume_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","resource_type":"volume"}},"catalog_offering":{"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a","dedicated_host":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-host","resource_type":"dedicated_host"},"disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","interface_type":"nvme","name":"my-instance-disk","resource_type":"instance_disk","size":100}],"gpu":{"count":1,"manufacturer":"nvidia","memory":1,"model":"Tesla V100"},"health_reasons":[{"code":"reservation_expired","message":"The reservation cannot be used because it has expired.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","image":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"aa2432b1fa4d4ace891e9b80fc104e34","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","memory":8,"metadata_service":{"enabled":false,"protocol":"http","response_hop_limit":1},"name":"my-instance","network_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0767-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0767-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"instance_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"numa_count":2,"placement_target":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_type":"dedicated_host_group"},"primary_network_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0767-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0767-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"instance_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"},"reservation":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"7187-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"},"reservation_affinity":{"policy":"disabled","pool":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"7187-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"}]},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"instance","startable":false,"status":"deleting","status_reasons":[{"code":"cannot_start_storage","message":"The virtual server instance is unusable because the encryption key for the boot volume\\nhas been deleted","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"total_network_bandwidth":500,"total_volume_bandwidth":500,"vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"volume_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","resource_type":"volume"}}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"instances":[{"availability_policy":{"host_failure":"restart"},"bandwidth":1000,"boot_volume_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","resource_type":"volume"}},"catalog_offering":{"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","dedicated_host":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a","id":"0717-1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-host","resource_type":"dedicated_host"},"disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","interface_type":"nvme","name":"my-instance-disk","resource_type":"instance_disk","size":100}],"gpu":{"count":1,"manufacturer":"nvidia","memory":1,"model":"Tesla V100"},"health_reasons":[{"code":"reservation_expired","message":"The reservation cannot be used because it has expired.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a","id":"0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","image":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","memory":8,"metadata_service":{"enabled":false,"protocol":"http","response_hop_limit":1},"name":"my-instance","network_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"instance_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e","id":"0717-10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"numa_count":2,"placement_target":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_type":"dedicated_host_group"},"primary_network_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"instance_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e","id":"0717-10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"},"reservation":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"7187-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"},"reservation_affinity":{"policy":"disabled","pool":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"7187-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"}]},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"instance","startable":false,"status":"deleting","status_reasons":[{"code":"cannot_start_storage","message":"The virtual server instance is unusable because the encryption key for the boot volume\\nhas been deleted","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"total_network_bandwidth":500,"total_volume_bandwidth":500,"vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"volume_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","resource_type":"volume"}}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}`) } else { res.WriteHeader(400) } @@ -20453,18 +20454,18 @@ var _ = Describe(`VpcV1`, func() { Limit: core.Int64Ptr(int64(10)), ResourceGroupID: core.StringPtr("testString"), Name: core.StringPtr("testString"), - VPCID: core.StringPtr("testString"), - VPCCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"), - VPCName: core.StringPtr("my-vpc"), DedicatedHostID: core.StringPtr("testString"), - DedicatedHostCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a"), + DedicatedHostCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a"), DedicatedHostName: core.StringPtr("my-dedicated-host"), PlacementGroupID: core.StringPtr("testString"), - PlacementGroupCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871"), + PlacementGroupCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871"), PlacementGroupName: core.StringPtr("my-placement-group"), ReservationID: core.StringPtr("testString"), - ReservationCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63"), + ReservationCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63"), ReservationName: core.StringPtr("my-reservation"), + VPCID: core.StringPtr("testString"), + VPCCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"), + VPCName: core.StringPtr("my-vpc"), } pager, err := vpcService.NewInstancesPager(listInstancesOptionsModel) @@ -20493,18 +20494,18 @@ var _ = Describe(`VpcV1`, func() { Limit: core.Int64Ptr(int64(10)), ResourceGroupID: core.StringPtr("testString"), Name: core.StringPtr("testString"), - VPCID: core.StringPtr("testString"), - VPCCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"), - VPCName: core.StringPtr("my-vpc"), DedicatedHostID: core.StringPtr("testString"), - DedicatedHostCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a"), + DedicatedHostCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a"), DedicatedHostName: core.StringPtr("my-dedicated-host"), PlacementGroupID: core.StringPtr("testString"), - PlacementGroupCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871"), + PlacementGroupCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871"), PlacementGroupName: core.StringPtr("my-placement-group"), ReservationID: core.StringPtr("testString"), - ReservationCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63"), + ReservationCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63"), ReservationName: core.StringPtr("my-reservation"), + VPCID: core.StringPtr("testString"), + VPCCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"), + VPCName: core.StringPtr("my-vpc"), } pager, err := vpcService.NewInstancesPager(listInstancesOptionsModel) @@ -20742,7 +20743,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke CreateInstance successfully with retries`, func() { @@ -20954,7 +20955,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke CreateInstance successfully`, func() { @@ -21616,7 +21617,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetInstance successfully with retries`, func() { @@ -21673,7 +21674,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetInstance successfully`, func() { @@ -21813,7 +21814,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID model instancePlacementTargetPatchModel := new(vpcv1.InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID) - instancePlacementTargetPatchModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + instancePlacementTargetPatchModel.ID = core.StringPtr("0717-1e09281b-f177-46fb-baf1-bc152b2e391a") // Construct an instance of the InstancePatchProfileInstanceProfileIdentityByName model instancePatchProfileModel := new(vpcv1.InstancePatchProfileInstanceProfileIdentityByName) @@ -21902,7 +21903,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke UpdateInstance successfully with retries`, func() { @@ -21927,7 +21928,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID model instancePlacementTargetPatchModel := new(vpcv1.InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID) - instancePlacementTargetPatchModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + instancePlacementTargetPatchModel.ID = core.StringPtr("0717-1e09281b-f177-46fb-baf1-bc152b2e391a") // Construct an instance of the InstancePatchProfileInstanceProfileIdentityByName model instancePatchProfileModel := new(vpcv1.InstancePatchProfileInstanceProfileIdentityByName) @@ -22018,7 +22019,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke UpdateInstance successfully`, func() { @@ -22048,7 +22049,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID model instancePlacementTargetPatchModel := new(vpcv1.InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID) - instancePlacementTargetPatchModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + instancePlacementTargetPatchModel.ID = core.StringPtr("0717-1e09281b-f177-46fb-baf1-bc152b2e391a") // Construct an instance of the InstancePatchProfileInstanceProfileIdentityByName model instancePatchProfileModel := new(vpcv1.InstancePatchProfileInstanceProfileIdentityByName) @@ -22110,7 +22111,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID model instancePlacementTargetPatchModel := new(vpcv1.InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID) - instancePlacementTargetPatchModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + instancePlacementTargetPatchModel.ID = core.StringPtr("0717-1e09281b-f177-46fb-baf1-bc152b2e391a") // Construct an instance of the InstancePatchProfileInstanceProfileIdentityByName model instancePatchProfileModel := new(vpcv1.InstancePatchProfileInstanceProfileIdentityByName) @@ -22193,7 +22194,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID model instancePlacementTargetPatchModel := new(vpcv1.InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID) - instancePlacementTargetPatchModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + instancePlacementTargetPatchModel.ID = core.StringPtr("0717-1e09281b-f177-46fb-baf1-bc152b2e391a") // Construct an instance of the InstancePatchProfileInstanceProfileIdentityByName model instancePatchProfileModel := new(vpcv1.InstancePatchProfileInstanceProfileIdentityByName) @@ -22309,7 +22310,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"default_trusted_profile": {"auto_link": true, "target": {"crn": "crn:v1:bluemix:public:iam-identity::a/123456::profile:Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5", "id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5", "resource_type": "trusted_profile"}}, "keys": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-key"}], "password": {"encrypted_password": "qQ+/YEApnl1ZtEgIrfprzb065307thTkzlnLqL5ICpesdbBN03dyCQ==", "encryption_key": {"fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY"}}}`) + fmt.Fprintf(res, "%s", `{"default_trusted_profile": {"auto_link": true, "target": {"crn": "crn:v1:bluemix:public:iam-identity::a/aa2432b1fa4d4ace891e9b80fc104e34::profile:Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5", "id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5", "resource_type": "trusted_profile"}}, "keys": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-key"}], "password": {"encrypted_password": "qQ+/YEApnl1ZtEgIrfprzb065307thTkzlnLqL5ICpesdbBN03dyCQ==", "encryption_key": {"fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY"}}}`) })) }) It(`Invoke GetInstanceInitialization successfully with retries`, func() { @@ -22366,7 +22367,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"default_trusted_profile": {"auto_link": true, "target": {"crn": "crn:v1:bluemix:public:iam-identity::a/123456::profile:Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5", "id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5", "resource_type": "trusted_profile"}}, "keys": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-key"}], "password": {"encrypted_password": "qQ+/YEApnl1ZtEgIrfprzb065307thTkzlnLqL5ICpesdbBN03dyCQ==", "encryption_key": {"fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY"}}}`) + fmt.Fprintf(res, "%s", `{"default_trusted_profile": {"auto_link": true, "target": {"crn": "crn:v1:bluemix:public:iam-identity::a/aa2432b1fa4d4ace891e9b80fc104e34::profile:Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5", "id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5", "resource_type": "trusted_profile"}}, "keys": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-key"}], "password": {"encrypted_password": "qQ+/YEApnl1ZtEgIrfprzb065307thTkzlnLqL5ICpesdbBN03dyCQ==", "encryption_key": {"fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY"}}}`) })) }) It(`Invoke GetInstanceInitialization successfully`, func() { @@ -23820,7 +23821,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"network_attachments": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "lifecycle_state": "stable", "name": "my-instance-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}]}`) + fmt.Fprintf(res, "%s", `{"network_attachments": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "lifecycle_state": "stable", "name": "my-instance-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}]}`) })) }) It(`Invoke ListInstanceNetworkAttachments successfully with retries`, func() { @@ -23877,7 +23878,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"network_attachments": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "lifecycle_state": "stable", "name": "my-instance-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}]}`) + fmt.Fprintf(res, "%s", `{"network_attachments": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "lifecycle_state": "stable", "name": "my-instance-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}]}`) })) }) It(`Invoke ListInstanceNetworkAttachments successfully`, func() { @@ -24099,7 +24100,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "lifecycle_state": "stable", "name": "my-instance-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "lifecycle_state": "stable", "name": "my-instance-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}`) })) }) It(`Invoke CreateInstanceNetworkAttachment successfully with retries`, func() { @@ -24210,7 +24211,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "lifecycle_state": "stable", "name": "my-instance-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "lifecycle_state": "stable", "name": "my-instance-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}`) })) }) It(`Invoke CreateInstanceNetworkAttachment successfully`, func() { @@ -24568,7 +24569,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "lifecycle_state": "stable", "name": "my-instance-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "lifecycle_state": "stable", "name": "my-instance-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}`) })) }) It(`Invoke GetInstanceNetworkAttachment successfully with retries`, func() { @@ -24626,7 +24627,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "lifecycle_state": "stable", "name": "my-instance-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "lifecycle_state": "stable", "name": "my-instance-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}`) })) }) It(`Invoke GetInstanceNetworkAttachment successfully`, func() { @@ -24821,7 +24822,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "lifecycle_state": "stable", "name": "my-instance-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "lifecycle_state": "stable", "name": "my-instance-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}`) })) }) It(`Invoke UpdateInstanceNetworkAttachment successfully with retries`, func() { @@ -24902,7 +24903,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0767-d54eb633-98ea-459d-aa00-6a8e780175a7", "lifecycle_state": "stable", "name": "my-instance-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "lifecycle_state": "stable", "name": "my-instance-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}`) })) }) It(`Invoke UpdateInstanceNetworkAttachment successfully`, func() { @@ -25094,7 +25095,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"network_interfaces": [{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary"}]}`) + fmt.Fprintf(res, "%s", `{"network_interfaces": [{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary"}]}`) })) }) It(`Invoke ListInstanceNetworkInterfaces successfully with retries`, func() { @@ -25151,7 +25152,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"network_interfaces": [{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary"}]}`) + fmt.Fprintf(res, "%s", `{"network_interfaces": [{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary"}]}`) })) }) It(`Invoke ListInstanceNetworkInterfaces successfully`, func() { @@ -25354,7 +25355,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary"}`) + fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary"}`) })) }) It(`Invoke CreateInstanceNetworkInterface successfully with retries`, func() { @@ -25446,7 +25447,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary"}`) + fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary"}`) })) }) It(`Invoke CreateInstanceNetworkInterface successfully`, func() { @@ -25747,7 +25748,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary"}`) + fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary"}`) })) }) It(`Invoke GetInstanceNetworkInterface successfully with retries`, func() { @@ -25805,7 +25806,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary"}`) + fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary"}`) })) }) It(`Invoke GetInstanceNetworkInterface successfully`, func() { @@ -26001,7 +26002,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary"}`) + fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary"}`) })) }) It(`Invoke UpdateInstanceNetworkInterface successfully with retries`, func() { @@ -26083,7 +26084,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary"}`) + fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary"}`) })) }) It(`Invoke UpdateInstanceNetworkInterface successfully`, func() { @@ -26279,7 +26280,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"floating_ips": [{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}`) + fmt.Fprintf(res, "%s", `{"floating_ips": [{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}`) })) }) It(`Invoke ListInstanceNetworkInterfaceFloatingIps successfully with retries`, func() { @@ -26337,7 +26338,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"floating_ips": [{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}`) + fmt.Fprintf(res, "%s", `{"floating_ips": [{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}`) })) }) It(`Invoke ListInstanceNetworkInterfaceFloatingIps successfully`, func() { @@ -26587,7 +26588,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetInstanceNetworkInterfaceFloatingIP successfully with retries`, func() { @@ -26646,7 +26647,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetInstanceNetworkInterfaceFloatingIP successfully`, func() { @@ -26822,7 +26823,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke AddInstanceNetworkInterfaceFloatingIP successfully with retries`, func() { @@ -26881,7 +26882,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke AddInstanceNetworkInterfaceFloatingIP successfully`, func() { @@ -27062,7 +27063,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20"}, "ips": [{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20"}, "ips": [{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListInstanceNetworkInterfaceIps successfully with retries`, func() { @@ -27124,7 +27125,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20"}, "ips": [{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20"}, "ips": [{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListInstanceNetworkInterfaceIps successfully`, func() { @@ -27275,9 +27276,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"ips":[{"address":"192.168.3.4","auto_delete":false,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","lifecycle_state":"stable","name":"my-reserved-ip","owner":"user","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","name":"my-endpoint-gateway","resource_type":"endpoint_gateway"}}]}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"ips":[{"address":"192.168.3.4","auto_delete":false,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","lifecycle_state":"stable","name":"my-reserved-ip","owner":"user","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","name":"my-endpoint-gateway","resource_type":"endpoint_gateway"}}]}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"ips":[{"address":"192.168.3.4","auto_delete":false,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","lifecycle_state":"stable","name":"my-reserved-ip","owner":"user","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","name":"my-endpoint-gateway","resource_type":"endpoint_gateway"}}]}`) + fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"ips":[{"address":"192.168.3.4","auto_delete":false,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","lifecycle_state":"stable","name":"my-reserved-ip","owner":"user","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","name":"my-endpoint-gateway","resource_type":"endpoint_gateway"}}]}`) } else { res.WriteHeader(400) } @@ -27408,7 +27409,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}`) + fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}`) })) }) It(`Invoke GetInstanceNetworkInterfaceIP successfully with retries`, func() { @@ -27467,7 +27468,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}`) + fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}`) })) }) It(`Invoke GetInstanceNetworkInterfaceIP successfully`, func() { @@ -27641,7 +27642,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"volume_attachments": [{"bandwidth": 250, "created_at": "2019-01-01T12:00:00.000Z", "delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "status": "attached", "type": "boot", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}]}`) + fmt.Fprintf(res, "%s", `{"volume_attachments": [{"bandwidth": 250, "created_at": "2019-01-01T12:00:00.000Z", "delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "status": "attached", "type": "boot", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}]}`) })) }) It(`Invoke ListInstanceVolumeAttachments successfully with retries`, func() { @@ -27698,7 +27699,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"volume_attachments": [{"bandwidth": 250, "created_at": "2019-01-01T12:00:00.000Z", "delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "status": "attached", "type": "boot", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}]}`) + fmt.Fprintf(res, "%s", `{"volume_attachments": [{"bandwidth": 250, "created_at": "2019-01-01T12:00:00.000Z", "delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "status": "attached", "type": "boot", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}]}`) })) }) It(`Invoke ListInstanceVolumeAttachments successfully`, func() { @@ -27826,7 +27827,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID model volumeAttachmentPrototypeVolumeModel := new(vpcv1.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID) - volumeAttachmentPrototypeVolumeModel.ID = core.StringPtr("1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + volumeAttachmentPrototypeVolumeModel.ID = core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") // Construct an instance of the CreateInstanceVolumeAttachmentOptions model createInstanceVolumeAttachmentOptionsModel := new(vpcv1.CreateInstanceVolumeAttachmentOptions) @@ -27889,7 +27890,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"bandwidth": 250, "created_at": "2019-01-01T12:00:00.000Z", "delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "status": "attached", "type": "boot", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}`) + fmt.Fprintf(res, "%s", `{"bandwidth": 250, "created_at": "2019-01-01T12:00:00.000Z", "delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "status": "attached", "type": "boot", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}`) })) }) It(`Invoke CreateInstanceVolumeAttachment successfully with retries`, func() { @@ -27904,7 +27905,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID model volumeAttachmentPrototypeVolumeModel := new(vpcv1.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID) - volumeAttachmentPrototypeVolumeModel.ID = core.StringPtr("1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + volumeAttachmentPrototypeVolumeModel.ID = core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") // Construct an instance of the CreateInstanceVolumeAttachmentOptions model createInstanceVolumeAttachmentOptionsModel := new(vpcv1.CreateInstanceVolumeAttachmentOptions) @@ -27969,7 +27970,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"bandwidth": 250, "created_at": "2019-01-01T12:00:00.000Z", "delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "status": "attached", "type": "boot", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}`) + fmt.Fprintf(res, "%s", `{"bandwidth": 250, "created_at": "2019-01-01T12:00:00.000Z", "delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "status": "attached", "type": "boot", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}`) })) }) It(`Invoke CreateInstanceVolumeAttachment successfully`, func() { @@ -27989,7 +27990,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID model volumeAttachmentPrototypeVolumeModel := new(vpcv1.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID) - volumeAttachmentPrototypeVolumeModel.ID = core.StringPtr("1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + volumeAttachmentPrototypeVolumeModel.ID = core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") // Construct an instance of the CreateInstanceVolumeAttachmentOptions model createInstanceVolumeAttachmentOptionsModel := new(vpcv1.CreateInstanceVolumeAttachmentOptions) @@ -28017,7 +28018,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID model volumeAttachmentPrototypeVolumeModel := new(vpcv1.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID) - volumeAttachmentPrototypeVolumeModel.ID = core.StringPtr("1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + volumeAttachmentPrototypeVolumeModel.ID = core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") // Construct an instance of the CreateInstanceVolumeAttachmentOptions model createInstanceVolumeAttachmentOptionsModel := new(vpcv1.CreateInstanceVolumeAttachmentOptions) @@ -28066,7 +28067,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID model volumeAttachmentPrototypeVolumeModel := new(vpcv1.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID) - volumeAttachmentPrototypeVolumeModel.ID = core.StringPtr("1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + volumeAttachmentPrototypeVolumeModel.ID = core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") // Construct an instance of the CreateInstanceVolumeAttachmentOptions model createInstanceVolumeAttachmentOptionsModel := new(vpcv1.CreateInstanceVolumeAttachmentOptions) @@ -28234,7 +28235,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"bandwidth": 250, "created_at": "2019-01-01T12:00:00.000Z", "delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "status": "attached", "type": "boot", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}`) + fmt.Fprintf(res, "%s", `{"bandwidth": 250, "created_at": "2019-01-01T12:00:00.000Z", "delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "status": "attached", "type": "boot", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}`) })) }) It(`Invoke GetInstanceVolumeAttachment successfully with retries`, func() { @@ -28292,7 +28293,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"bandwidth": 250, "created_at": "2019-01-01T12:00:00.000Z", "delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "status": "attached", "type": "boot", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}`) + fmt.Fprintf(res, "%s", `{"bandwidth": 250, "created_at": "2019-01-01T12:00:00.000Z", "delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "status": "attached", "type": "boot", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}`) })) }) It(`Invoke GetInstanceVolumeAttachment successfully`, func() { @@ -28488,7 +28489,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"bandwidth": 250, "created_at": "2019-01-01T12:00:00.000Z", "delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "status": "attached", "type": "boot", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}`) + fmt.Fprintf(res, "%s", `{"bandwidth": 250, "created_at": "2019-01-01T12:00:00.000Z", "delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "status": "attached", "type": "boot", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}`) })) }) It(`Invoke UpdateInstanceVolumeAttachment successfully with retries`, func() { @@ -28570,7 +28571,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"bandwidth": 250, "created_at": "2019-01-01T12:00:00.000Z", "delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "status": "attached", "type": "boot", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}`) + fmt.Fprintf(res, "%s", `{"bandwidth": 250, "created_at": "2019-01-01T12:00:00.000Z", "delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "status": "attached", "type": "boot", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}`) })) }) It(`Invoke UpdateInstanceVolumeAttachment successfully`, func() { @@ -28770,7 +28771,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups?limit=20"}, "instance_groups": [{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "load_balancer_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "updated_at": "2019-01-01T12:00:00.000Z", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups?limit=20"}, "instance_groups": [{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "load_balancer_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "updated_at": "2019-01-01T12:00:00.000Z", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListInstanceGroups successfully with retries`, func() { @@ -28830,7 +28831,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups?limit=20"}, "instance_groups": [{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "load_balancer_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "updated_at": "2019-01-01T12:00:00.000Z", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups?limit=20"}, "instance_groups": [{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "load_balancer_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "updated_at": "2019-01-01T12:00:00.000Z", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListInstanceGroups successfully`, func() { @@ -28968,9 +28969,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"instance_groups":[{"application_port":22,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","instance_template":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"a6b1a881-2ce8-41a3-80fc-36316a73f803","name":"my-instance-template"},"lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","load_balancer_pool":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004","name":"my-load-balancer-pool"},"managers":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance-group-manager"}],"membership_count":10,"name":"my-instance-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"status":"deleting","subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"updated_at":"2019-01-01T12:00:00.000Z","vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}]}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"instance_groups":[{"application_port":22,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","instance_template":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"a6b1a881-2ce8-41a3-80fc-36316a73f803","name":"my-instance-template"},"lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","load_balancer_pool":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004","name":"my-load-balancer-pool"},"managers":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance-group-manager"}],"membership_count":10,"name":"my-instance-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"status":"deleting","subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"updated_at":"2019-01-01T12:00:00.000Z","vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}]}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"instance_groups":[{"application_port":22,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","instance_template":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"a6b1a881-2ce8-41a3-80fc-36316a73f803","name":"my-instance-template"},"lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","load_balancer_pool":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004","name":"my-load-balancer-pool"},"managers":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance-group-manager"}],"membership_count":10,"name":"my-instance-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"status":"deleting","subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"updated_at":"2019-01-01T12:00:00.000Z","vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}]}`) + fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"instance_groups":[{"application_port":22,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","instance_template":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"a6b1a881-2ce8-41a3-80fc-36316a73f803","name":"my-instance-template"},"lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","load_balancer_pool":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004","name":"my-load-balancer-pool"},"managers":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance-group-manager"}],"membership_count":10,"name":"my-instance-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"status":"deleting","subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"updated_at":"2019-01-01T12:00:00.000Z","vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}]}`) } else { res.WriteHeader(400) } @@ -29059,7 +29060,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the LoadBalancerIdentityByID model loadBalancerIdentityModel := new(vpcv1.LoadBalancerIdentityByID) @@ -29138,7 +29139,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "load_balancer_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "updated_at": "2019-01-01T12:00:00.000Z", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "load_balancer_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "updated_at": "2019-01-01T12:00:00.000Z", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke CreateInstanceGroup successfully with retries`, func() { @@ -29157,7 +29158,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the LoadBalancerIdentityByID model loadBalancerIdentityModel := new(vpcv1.LoadBalancerIdentityByID) @@ -29238,7 +29239,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "load_balancer_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "updated_at": "2019-01-01T12:00:00.000Z", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "load_balancer_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "updated_at": "2019-01-01T12:00:00.000Z", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke CreateInstanceGroup successfully`, func() { @@ -29262,7 +29263,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the LoadBalancerIdentityByID model loadBalancerIdentityModel := new(vpcv1.LoadBalancerIdentityByID) @@ -29310,7 +29311,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the LoadBalancerIdentityByID model loadBalancerIdentityModel := new(vpcv1.LoadBalancerIdentityByID) @@ -29379,7 +29380,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the LoadBalancerIdentityByID model loadBalancerIdentityModel := new(vpcv1.LoadBalancerIdentityByID) @@ -29560,7 +29561,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "load_balancer_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "updated_at": "2019-01-01T12:00:00.000Z", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "load_balancer_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "updated_at": "2019-01-01T12:00:00.000Z", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke GetInstanceGroup successfully with retries`, func() { @@ -29617,7 +29618,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "load_balancer_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "updated_at": "2019-01-01T12:00:00.000Z", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "load_balancer_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "updated_at": "2019-01-01T12:00:00.000Z", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke GetInstanceGroup successfully`, func() { @@ -29757,7 +29758,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the InstanceGroupPatch model instanceGroupPatchModel := new(vpcv1.InstanceGroupPatch) @@ -29830,7 +29831,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "load_balancer_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "updated_at": "2019-01-01T12:00:00.000Z", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "load_balancer_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "updated_at": "2019-01-01T12:00:00.000Z", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke UpdateInstanceGroup successfully with retries`, func() { @@ -29857,7 +29858,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the InstanceGroupPatch model instanceGroupPatchModel := new(vpcv1.InstanceGroupPatch) @@ -29932,7 +29933,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "load_balancer_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "updated_at": "2019-01-01T12:00:00.000Z", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "load_balancer_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "updated_at": "2019-01-01T12:00:00.000Z", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke UpdateInstanceGroup successfully`, func() { @@ -29964,7 +29965,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the InstanceGroupPatch model instanceGroupPatchModel := new(vpcv1.InstanceGroupPatch) @@ -30014,7 +30015,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the InstanceGroupPatch model instanceGroupPatchModel := new(vpcv1.InstanceGroupPatch) @@ -30085,7 +30086,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the InstanceGroupPatch model instanceGroupPatchModel := new(vpcv1.InstanceGroupPatch) @@ -34246,7 +34247,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/7241e2a8-601f-11ea-8503-000c29475bed/memberships?limit=20"}, "limit": 20, "memberships": [{"created_at": "2019-01-01T12:00:00.000Z", "delete_instance_on_membership_delete": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/memberships/8b002d86-601f-11ea-898b-000c29475bed", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "name": "my-instance-group-membership", "pool_member": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "status": "deleting", "updated_at": "2019-01-01T12:00:00.000Z"}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/7241e2a8-601f-11ea-8503-000c29475bed/memberships?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/7241e2a8-601f-11ea-8503-000c29475bed/memberships?limit=20"}, "limit": 20, "memberships": [{"created_at": "2019-01-01T12:00:00.000Z", "delete_instance_on_membership_delete": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/memberships/8b002d86-601f-11ea-898b-000c29475bed", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "name": "my-instance-group-membership", "pool_member": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "status": "deleting", "updated_at": "2019-01-01T12:00:00.000Z"}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/7241e2a8-601f-11ea-8503-000c29475bed/memberships?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListInstanceGroupMemberships successfully with retries`, func() { @@ -34307,7 +34308,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/7241e2a8-601f-11ea-8503-000c29475bed/memberships?limit=20"}, "limit": 20, "memberships": [{"created_at": "2019-01-01T12:00:00.000Z", "delete_instance_on_membership_delete": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/memberships/8b002d86-601f-11ea-898b-000c29475bed", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "name": "my-instance-group-membership", "pool_member": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "status": "deleting", "updated_at": "2019-01-01T12:00:00.000Z"}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/7241e2a8-601f-11ea-8503-000c29475bed/memberships?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/7241e2a8-601f-11ea-8503-000c29475bed/memberships?limit=20"}, "limit": 20, "memberships": [{"created_at": "2019-01-01T12:00:00.000Z", "delete_instance_on_membership_delete": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/memberships/8b002d86-601f-11ea-898b-000c29475bed", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "name": "my-instance-group-membership", "pool_member": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "status": "deleting", "updated_at": "2019-01-01T12:00:00.000Z"}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/7241e2a8-601f-11ea-8503-000c29475bed/memberships?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListInstanceGroupMemberships successfully`, func() { @@ -34455,9 +34456,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"memberships":[{"created_at":"2019-01-01T12:00:00.000Z","delete_instance_on_membership_delete":true,"href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/memberships/8b002d86-601f-11ea-898b-000c29475bed","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","instance":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance"},"instance_template":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"a6b1a881-2ce8-41a3-80fc-36316a73f803","name":"my-instance-template"},"name":"my-instance-group-membership","pool_member":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004"},"status":"deleting","updated_at":"2019-01-01T12:00:00.000Z"}]}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"memberships":[{"created_at":"2019-01-01T12:00:00.000Z","delete_instance_on_membership_delete":true,"href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/memberships/8b002d86-601f-11ea-898b-000c29475bed","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","instance":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a","id":"0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","name":"my-instance"},"instance_template":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"a6b1a881-2ce8-41a3-80fc-36316a73f803","name":"my-instance-template"},"name":"my-instance-group-membership","pool_member":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004"},"status":"deleting","updated_at":"2019-01-01T12:00:00.000Z"}]}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"memberships":[{"created_at":"2019-01-01T12:00:00.000Z","delete_instance_on_membership_delete":true,"href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/memberships/8b002d86-601f-11ea-898b-000c29475bed","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","instance":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance"},"instance_template":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"a6b1a881-2ce8-41a3-80fc-36316a73f803","name":"my-instance-template"},"name":"my-instance-group-membership","pool_member":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004"},"status":"deleting","updated_at":"2019-01-01T12:00:00.000Z"}]}`) + fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"memberships":[{"created_at":"2019-01-01T12:00:00.000Z","delete_instance_on_membership_delete":true,"href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/memberships/8b002d86-601f-11ea-898b-000c29475bed","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","instance":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a","id":"0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","name":"my-instance"},"instance_template":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"a6b1a881-2ce8-41a3-80fc-36316a73f803","name":"my-instance-template"},"name":"my-instance-group-membership","pool_member":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004"},"status":"deleting","updated_at":"2019-01-01T12:00:00.000Z"}]}`) } else { res.WriteHeader(400) } @@ -34660,7 +34661,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "delete_instance_on_membership_delete": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/memberships/8b002d86-601f-11ea-898b-000c29475bed", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "name": "my-instance-group-membership", "pool_member": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "status": "deleting", "updated_at": "2019-01-01T12:00:00.000Z"}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "delete_instance_on_membership_delete": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/memberships/8b002d86-601f-11ea-898b-000c29475bed", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "name": "my-instance-group-membership", "pool_member": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "status": "deleting", "updated_at": "2019-01-01T12:00:00.000Z"}`) })) }) It(`Invoke GetInstanceGroupMembership successfully with retries`, func() { @@ -34718,7 +34719,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "delete_instance_on_membership_delete": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/memberships/8b002d86-601f-11ea-898b-000c29475bed", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "name": "my-instance-group-membership", "pool_member": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "status": "deleting", "updated_at": "2019-01-01T12:00:00.000Z"}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "delete_instance_on_membership_delete": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/memberships/8b002d86-601f-11ea-898b-000c29475bed", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "name": "my-instance-group-membership", "pool_member": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "status": "deleting", "updated_at": "2019-01-01T12:00:00.000Z"}`) })) }) It(`Invoke GetInstanceGroupMembership successfully`, func() { @@ -34913,7 +34914,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "delete_instance_on_membership_delete": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/memberships/8b002d86-601f-11ea-898b-000c29475bed", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "name": "my-instance-group-membership", "pool_member": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "status": "deleting", "updated_at": "2019-01-01T12:00:00.000Z"}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "delete_instance_on_membership_delete": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/memberships/8b002d86-601f-11ea-898b-000c29475bed", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "name": "my-instance-group-membership", "pool_member": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "status": "deleting", "updated_at": "2019-01-01T12:00:00.000Z"}`) })) }) It(`Invoke UpdateInstanceGroupMembership successfully with retries`, func() { @@ -34994,7 +34995,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "delete_instance_on_membership_delete": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/memberships/8b002d86-601f-11ea-898b-000c29475bed", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "name": "my-instance-group-membership", "pool_member": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "status": "deleting", "updated_at": "2019-01-01T12:00:00.000Z"}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "delete_instance_on_membership_delete": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/memberships/8b002d86-601f-11ea-898b-000c29475bed", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "name": "my-instance-group-membership", "pool_member": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "status": "deleting", "updated_at": "2019-01-01T12:00:00.000Z"}`) })) }) It(`Invoke UpdateInstanceGroupMembership successfully`, func() { @@ -35200,7 +35201,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/reservations?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/reservations?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "reservations": [{"affinity_policy": "restricted", "capacity": {"allocated": 10, "available": 2, "status": "allocated", "total": 10, "used": 8}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "Term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/reservations?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/reservations?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "reservations": [{"affinity_policy": "restricted", "capacity": {"allocated": 10, "available": 2, "status": "allocated", "total": 10, "used": 8}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "Term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}`) })) }) It(`Invoke ListReservations successfully with retries`, func() { @@ -35266,7 +35267,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/reservations?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/reservations?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "reservations": [{"affinity_policy": "restricted", "capacity": {"allocated": 10, "available": 2, "status": "allocated", "total": 10, "used": 8}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "Term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/reservations?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/reservations?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "reservations": [{"affinity_policy": "restricted", "capacity": {"allocated": 10, "available": 2, "status": "allocated", "total": 10, "used": 8}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "Term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}`) })) }) It(`Invoke ListReservations successfully`, func() { @@ -35413,9 +35414,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"reservations":[{"affinity_policy":"restricted","capacity":{"allocated":10,"available":2,"status":"allocated","total":10,"used":8},"committed_use":{"expiration_at":"2019-01-01T12:00:00.000Z","expiration_policy":"release","term":"Term"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63","href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"7187-ba49df72-37b8-43ac-98da-f8e029de0e63","lifecycle_state":"stable","name":"my-reservation","profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"reservation","status":"activating","status_reasons":[{"code":"cannot_activate_no_capacity_available","message":"The reservation cannot be activated because capacity is unavailable","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"reservations":[{"affinity_policy":"restricted","capacity":{"allocated":10,"available":2,"status":"allocated","total":10,"used":8},"committed_use":{"expiration_at":"2019-01-01T12:00:00.000Z","expiration_policy":"release","term":"Term"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63","href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"7187-ba49df72-37b8-43ac-98da-f8e029de0e63","lifecycle_state":"stable","name":"my-reservation","profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"reservation","status":"activating","status_reasons":[{"code":"cannot_activate_no_capacity_available","message":"The reservation cannot be activated because capacity is unavailable","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"reservations":[{"affinity_policy":"restricted","capacity":{"allocated":10,"available":2,"status":"allocated","total":10,"used":8},"committed_use":{"expiration_at":"2019-01-01T12:00:00.000Z","expiration_policy":"release","term":"Term"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63","href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"7187-ba49df72-37b8-43ac-98da-f8e029de0e63","lifecycle_state":"stable","name":"my-reservation","profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"reservation","status":"activating","status_reasons":[{"code":"cannot_activate_no_capacity_available","message":"The reservation cannot be activated because capacity is unavailable","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"reservations":[{"affinity_policy":"restricted","capacity":{"allocated":10,"available":2,"status":"allocated","total":10,"used":8},"committed_use":{"expiration_at":"2019-01-01T12:00:00.000Z","expiration_policy":"release","term":"Term"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63","href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"7187-ba49df72-37b8-43ac-98da-f8e029de0e63","lifecycle_state":"stable","name":"my-reservation","profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"reservation","status":"activating","status_reasons":[{"code":"cannot_activate_no_capacity_available","message":"The reservation cannot be activated because capacity is unavailable","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}`) } else { res.WriteHeader(400) } @@ -35590,7 +35591,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"affinity_policy": "restricted", "capacity": {"allocated": 10, "available": 2, "status": "allocated", "total": 10, "used": 8}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "Term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"affinity_policy": "restricted", "capacity": {"allocated": 10, "available": 2, "status": "allocated", "total": 10, "used": 8}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "Term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke CreateReservation successfully with retries`, func() { @@ -35691,7 +35692,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"affinity_policy": "restricted", "capacity": {"allocated": 10, "available": 2, "status": "allocated", "total": 10, "used": 8}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "Term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"affinity_policy": "restricted", "capacity": {"allocated": 10, "available": 2, "status": "allocated", "total": 10, "used": 8}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "Term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke CreateReservation successfully`, func() { @@ -35943,7 +35944,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(202) - fmt.Fprintf(res, "%s", `{"affinity_policy": "restricted", "capacity": {"allocated": 10, "available": 2, "status": "allocated", "total": 10, "used": 8}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "Term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"affinity_policy": "restricted", "capacity": {"allocated": 10, "available": 2, "status": "allocated", "total": 10, "used": 8}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "Term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke DeleteReservation successfully with retries`, func() { @@ -36000,7 +36001,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(202) - fmt.Fprintf(res, "%s", `{"affinity_policy": "restricted", "capacity": {"allocated": 10, "available": 2, "status": "allocated", "total": 10, "used": 8}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "Term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"affinity_policy": "restricted", "capacity": {"allocated": 10, "available": 2, "status": "allocated", "total": 10, "used": 8}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "Term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke DeleteReservation successfully`, func() { @@ -36168,7 +36169,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"affinity_policy": "restricted", "capacity": {"allocated": 10, "available": 2, "status": "allocated", "total": 10, "used": 8}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "Term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"affinity_policy": "restricted", "capacity": {"allocated": 10, "available": 2, "status": "allocated", "total": 10, "used": 8}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "Term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetReservation successfully with retries`, func() { @@ -36225,7 +36226,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"affinity_policy": "restricted", "capacity": {"allocated": 10, "available": 2, "status": "allocated", "total": 10, "used": 8}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "Term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"affinity_policy": "restricted", "capacity": {"allocated": 10, "available": 2, "status": "allocated", "total": 10, "used": 8}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "Term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetReservation successfully`, func() { @@ -36433,7 +36434,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"affinity_policy": "restricted", "capacity": {"allocated": 10, "available": 2, "status": "allocated", "total": 10, "used": 8}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "Term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"affinity_policy": "restricted", "capacity": {"allocated": 10, "available": 2, "status": "allocated", "total": 10, "used": 8}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "Term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke UpdateReservation successfully with retries`, func() { @@ -36530,7 +36531,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"affinity_policy": "restricted", "capacity": {"allocated": 10, "available": 2, "status": "allocated", "total": 10, "used": 8}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "Term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"affinity_policy": "restricted", "capacity": {"allocated": 10, "available": 2, "status": "allocated", "total": 10, "used": 8}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "Term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke UpdateReservation successfully`, func() { @@ -36857,7 +36858,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups?limit=20"}, "groups": [{"class": "mx2", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "dedicated_hosts": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host_group", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups?limit=20"}, "groups": [{"class": "mx2", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "dedicated_hosts": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host_group", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListDedicatedHostGroups successfully with retries`, func() { @@ -36923,7 +36924,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups?limit=20"}, "groups": [{"class": "mx2", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "dedicated_hosts": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host_group", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups?limit=20"}, "groups": [{"class": "mx2", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "dedicated_hosts": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host_group", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListDedicatedHostGroups successfully`, func() { @@ -37070,9 +37071,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"groups":[{"class":"mx2","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","dedicated_hosts":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-host","resource_type":"dedicated_host"}],"family":"balanced","href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"dedicated_host_group","supported_instance_profiles":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"}],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"groups":[{"class":"mx2","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","dedicated_hosts":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a","id":"0717-1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-host","resource_type":"dedicated_host"}],"family":"balanced","href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"dedicated_host_group","supported_instance_profiles":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"}],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"groups":[{"class":"mx2","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","dedicated_hosts":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-host","resource_type":"dedicated_host"}],"family":"balanced","href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"dedicated_host_group","supported_instance_profiles":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"}],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}`) + fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"groups":[{"class":"mx2","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","dedicated_hosts":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a","id":"0717-1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-host","resource_type":"dedicated_host"}],"family":"balanced","href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"dedicated_host_group","supported_instance_profiles":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"}],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}`) } else { res.WriteHeader(400) } @@ -37231,7 +37232,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"class": "mx2", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "dedicated_hosts": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host_group", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"class": "mx2", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "dedicated_hosts": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host_group", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke CreateDedicatedHostGroup successfully with retries`, func() { @@ -37316,7 +37317,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"class": "mx2", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "dedicated_hosts": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host_group", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"class": "mx2", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "dedicated_hosts": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host_group", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke CreateDedicatedHostGroup successfully`, func() { @@ -37593,7 +37594,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"class": "mx2", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "dedicated_hosts": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host_group", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"class": "mx2", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "dedicated_hosts": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host_group", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetDedicatedHostGroup successfully with retries`, func() { @@ -37650,7 +37651,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"class": "mx2", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "dedicated_hosts": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host_group", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"class": "mx2", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "dedicated_hosts": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host_group", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetDedicatedHostGroup successfully`, func() { @@ -37841,7 +37842,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"class": "mx2", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "dedicated_hosts": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host_group", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"class": "mx2", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "dedicated_hosts": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host_group", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke UpdateDedicatedHostGroup successfully with retries`, func() { @@ -37921,7 +37922,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"class": "mx2", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "dedicated_hosts": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host_group", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"class": "mx2", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "dedicated_hosts": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host_group", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke UpdateDedicatedHostGroup successfully`, func() { @@ -38115,7 +38116,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles?start=9da91&limit=20"}, "profiles": [{"class": "mx2", "disks": [{"interface_type": {"type": "fixed", "value": "nvme"}, "quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 3200}, "supported_instance_interface_types": {"type": "fixed", "value": ["nvme"]}}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "memory": {"type": "fixed", "value": 16}, "name": "mx2-host-152x1216", "socket_count": {"type": "fixed", "value": 2}, "status": "current", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "vcpu_architecture": {"type": "fixed", "value": "amd64"}, "vcpu_count": {"type": "fixed", "value": 16}, "vcpu_manufacturer": {"type": "fixed", "value": "intel"}}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles?start=9da91&limit=20"}, "profiles": [{"class": "mx2", "disks": [{"interface_type": {"type": "fixed", "value": "nvme"}, "quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 3200}, "supported_instance_interface_types": {"type": "fixed", "value": ["nvme"]}}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "memory": {"type": "fixed", "value": 16}, "name": "mx2-host-152x1216", "socket_count": {"type": "fixed", "value": 2}, "status": "current", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "vcpu_architecture": {"type": "fixed", "value": "amd64"}, "vcpu_count": {"type": "fixed", "value": 16}, "vcpu_manufacturer": {"type": "fixed", "value": "intel"}}], "total_count": 132}`) })) }) It(`Invoke ListDedicatedHostProfiles successfully with retries`, func() { @@ -38175,7 +38176,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles?start=9da91&limit=20"}, "profiles": [{"class": "mx2", "disks": [{"interface_type": {"type": "fixed", "value": "nvme"}, "quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 3200}, "supported_instance_interface_types": {"type": "fixed", "value": ["nvme"]}}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "memory": {"type": "fixed", "value": 16}, "name": "mx2-host-152x1216", "socket_count": {"type": "fixed", "value": 2}, "status": "current", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "vcpu_architecture": {"type": "fixed", "value": "amd64"}, "vcpu_count": {"type": "fixed", "value": 16}, "vcpu_manufacturer": {"type": "fixed", "value": "intel"}}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles?start=9da91&limit=20"}, "profiles": [{"class": "mx2", "disks": [{"interface_type": {"type": "fixed", "value": "nvme"}, "quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 3200}, "supported_instance_interface_types": {"type": "fixed", "value": ["nvme"]}}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "memory": {"type": "fixed", "value": 16}, "name": "mx2-host-152x1216", "socket_count": {"type": "fixed", "value": 2}, "status": "current", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "vcpu_architecture": {"type": "fixed", "value": "amd64"}, "vcpu_count": {"type": "fixed", "value": 16}, "vcpu_manufacturer": {"type": "fixed", "value": "intel"}}], "total_count": 132}`) })) }) It(`Invoke ListDedicatedHostProfiles successfully`, func() { @@ -38313,9 +38314,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"profiles":[{"class":"mx2","disks":[{"interface_type":{"type":"fixed","value":"nvme"},"quantity":{"type":"fixed","value":4},"size":{"type":"fixed","value":3200},"supported_instance_interface_types":{"type":"fixed","value":["nvme"]}}],"family":"balanced","href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a","memory":{"type":"fixed","value":16},"name":"mx2-host-152x1216","socket_count":{"type":"fixed","value":2},"status":"current","supported_instance_profiles":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"}],"vcpu_architecture":{"type":"fixed","value":"amd64"},"vcpu_count":{"type":"fixed","value":16},"vcpu_manufacturer":{"type":"fixed","value":"intel"}}]}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"profiles":[{"class":"mx2","disks":[{"interface_type":{"type":"fixed","value":"nvme"},"quantity":{"type":"fixed","value":4},"size":{"type":"fixed","value":3200},"supported_instance_interface_types":{"type":"fixed","value":["nvme"]}}],"family":"balanced","href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a","memory":{"type":"fixed","value":16},"name":"mx2-host-152x1216","socket_count":{"type":"fixed","value":2},"status":"current","supported_instance_profiles":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"}],"vcpu_architecture":{"type":"fixed","value":"amd64"},"vcpu_count":{"type":"fixed","value":16},"vcpu_manufacturer":{"type":"fixed","value":"intel"}}]}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"profiles":[{"class":"mx2","disks":[{"interface_type":{"type":"fixed","value":"nvme"},"quantity":{"type":"fixed","value":4},"size":{"type":"fixed","value":3200},"supported_instance_interface_types":{"type":"fixed","value":["nvme"]}}],"family":"balanced","href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a","memory":{"type":"fixed","value":16},"name":"mx2-host-152x1216","socket_count":{"type":"fixed","value":2},"status":"current","supported_instance_profiles":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"}],"vcpu_architecture":{"type":"fixed","value":"amd64"},"vcpu_count":{"type":"fixed","value":16},"vcpu_manufacturer":{"type":"fixed","value":"intel"}}]}`) + fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"profiles":[{"class":"mx2","disks":[{"interface_type":{"type":"fixed","value":"nvme"},"quantity":{"type":"fixed","value":4},"size":{"type":"fixed","value":3200},"supported_instance_interface_types":{"type":"fixed","value":["nvme"]}}],"family":"balanced","href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a","memory":{"type":"fixed","value":16},"name":"mx2-host-152x1216","socket_count":{"type":"fixed","value":2},"status":"current","supported_instance_profiles":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"}],"vcpu_architecture":{"type":"fixed","value":"amd64"},"vcpu_count":{"type":"fixed","value":16},"vcpu_manufacturer":{"type":"fixed","value":"intel"}}]}`) } else { res.WriteHeader(400) } @@ -38440,7 +38441,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"class": "mx2", "disks": [{"interface_type": {"type": "fixed", "value": "nvme"}, "quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 3200}, "supported_instance_interface_types": {"type": "fixed", "value": ["nvme"]}}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "memory": {"type": "fixed", "value": 16}, "name": "mx2-host-152x1216", "socket_count": {"type": "fixed", "value": 2}, "status": "current", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "vcpu_architecture": {"type": "fixed", "value": "amd64"}, "vcpu_count": {"type": "fixed", "value": 16}, "vcpu_manufacturer": {"type": "fixed", "value": "intel"}}`) + fmt.Fprintf(res, "%s", `{"class": "mx2", "disks": [{"interface_type": {"type": "fixed", "value": "nvme"}, "quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 3200}, "supported_instance_interface_types": {"type": "fixed", "value": ["nvme"]}}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "memory": {"type": "fixed", "value": 16}, "name": "mx2-host-152x1216", "socket_count": {"type": "fixed", "value": 2}, "status": "current", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "vcpu_architecture": {"type": "fixed", "value": "amd64"}, "vcpu_count": {"type": "fixed", "value": 16}, "vcpu_manufacturer": {"type": "fixed", "value": "intel"}}`) })) }) It(`Invoke GetDedicatedHostProfile successfully with retries`, func() { @@ -38497,7 +38498,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"class": "mx2", "disks": [{"interface_type": {"type": "fixed", "value": "nvme"}, "quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 3200}, "supported_instance_interface_types": {"type": "fixed", "value": ["nvme"]}}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "memory": {"type": "fixed", "value": 16}, "name": "mx2-host-152x1216", "socket_count": {"type": "fixed", "value": 2}, "status": "current", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "vcpu_architecture": {"type": "fixed", "value": "amd64"}, "vcpu_count": {"type": "fixed", "value": 16}, "vcpu_manufacturer": {"type": "fixed", "value": "intel"}}`) + fmt.Fprintf(res, "%s", `{"class": "mx2", "disks": [{"interface_type": {"type": "fixed", "value": "nvme"}, "quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 3200}, "supported_instance_interface_types": {"type": "fixed", "value": ["nvme"]}}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "memory": {"type": "fixed", "value": 16}, "name": "mx2-host-152x1216", "socket_count": {"type": "fixed", "value": 2}, "status": "current", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "vcpu_architecture": {"type": "fixed", "value": "amd64"}, "vcpu_count": {"type": "fixed", "value": 16}, "vcpu_manufacturer": {"type": "fixed", "value": "intel"}}`) })) }) It(`Invoke GetDedicatedHostProfile successfully`, func() { @@ -38682,7 +38683,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"dedicated_hosts": [{"available_memory": 128, "available_vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"available": 9, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "instance_disks": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-disk", "resource_type": "instance_disk"}], "interface_type": "nvme", "lifecycle_state": "stable", "name": "my-dedicated-host-disk", "provisionable": false, "resource_type": "dedicated_host_disk", "size": 4, "supported_instance_interface_types": ["nvme"]}], "group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_placement_enabled": true, "instances": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}], "lifecycle_state": "stable", "memory": 128, "name": "my-host", "numa": {"count": 2, "nodes": [{"available_vcpu": 24, "vcpu": 56}]}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "mx2-host-152x1216"}, "provisionable": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host", "socket_count": 4, "state": "available", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"dedicated_hosts": [{"available_memory": 128, "available_vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"available": 9, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "instance_disks": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-disk", "resource_type": "instance_disk"}], "interface_type": "nvme", "lifecycle_state": "stable", "name": "my-dedicated-host-disk", "provisionable": false, "resource_type": "dedicated_host_disk", "size": 4, "supported_instance_interface_types": ["nvme"]}], "group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_placement_enabled": true, "instances": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}], "lifecycle_state": "stable", "memory": 128, "name": "my-host", "numa": {"count": 2, "nodes": [{"available_vcpu": 24, "vcpu": 56}]}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "mx2-host-152x1216"}, "provisionable": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host", "socket_count": 4, "state": "available", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListDedicatedHosts successfully with retries`, func() { @@ -38750,7 +38751,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"dedicated_hosts": [{"available_memory": 128, "available_vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"available": 9, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "instance_disks": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-disk", "resource_type": "instance_disk"}], "interface_type": "nvme", "lifecycle_state": "stable", "name": "my-dedicated-host-disk", "provisionable": false, "resource_type": "dedicated_host_disk", "size": 4, "supported_instance_interface_types": ["nvme"]}], "group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_placement_enabled": true, "instances": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}], "lifecycle_state": "stable", "memory": 128, "name": "my-host", "numa": {"count": 2, "nodes": [{"available_vcpu": 24, "vcpu": 56}]}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "mx2-host-152x1216"}, "provisionable": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host", "socket_count": 4, "state": "available", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"dedicated_hosts": [{"available_memory": 128, "available_vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"available": 9, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "instance_disks": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-disk", "resource_type": "instance_disk"}], "interface_type": "nvme", "lifecycle_state": "stable", "name": "my-dedicated-host-disk", "provisionable": false, "resource_type": "dedicated_host_disk", "size": 4, "supported_instance_interface_types": ["nvme"]}], "group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_placement_enabled": true, "instances": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}], "lifecycle_state": "stable", "memory": 128, "name": "my-host", "numa": {"count": 2, "nodes": [{"available_vcpu": 24, "vcpu": 56}]}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "mx2-host-152x1216"}, "provisionable": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host", "socket_count": 4, "state": "available", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListDedicatedHosts successfully`, func() { @@ -38900,9 +38901,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"dedicated_hosts":[{"available_memory":128,"available_vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a","disks":[{"available":9,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","instance_disks":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-disk","resource_type":"instance_disk"}],"interface_type":"nvme","lifecycle_state":"stable","name":"my-dedicated-host-disk","provisionable":false,"resource_type":"dedicated_host_disk","size":4,"supported_instance_interface_types":["nvme"]}],"group":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_type":"dedicated_host_group"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","instance_placement_enabled":true,"instances":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance"}],"lifecycle_state":"stable","memory":128,"name":"my-host","numa":{"count":2,"nodes":[{"available_vcpu":24,"vcpu":56}]},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a","name":"mx2-host-152x1216"},"provisionable":false,"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"dedicated_host","socket_count":4,"state":"available","supported_instance_profiles":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"}],"vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"dedicated_hosts":[{"available_memory":128,"available_vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a","disks":[{"available":9,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","instance_disks":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-disk","resource_type":"instance_disk"}],"interface_type":"nvme","lifecycle_state":"stable","name":"my-dedicated-host-disk","provisionable":false,"resource_type":"dedicated_host_disk","size":4,"supported_instance_interface_types":["nvme"]}],"group":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_type":"dedicated_host_group"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a","id":"0717-1e09281b-f177-46fb-baf1-bc152b2e391a","instance_placement_enabled":true,"instances":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a","id":"0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","name":"my-instance"}],"lifecycle_state":"stable","memory":128,"name":"my-host","numa":{"count":2,"nodes":[{"available_vcpu":24,"vcpu":56}]},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a","name":"mx2-host-152x1216"},"provisionable":false,"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"dedicated_host","socket_count":4,"state":"available","supported_instance_profiles":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"}],"vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"dedicated_hosts":[{"available_memory":128,"available_vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a","disks":[{"available":9,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","instance_disks":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-disk","resource_type":"instance_disk"}],"interface_type":"nvme","lifecycle_state":"stable","name":"my-dedicated-host-disk","provisionable":false,"resource_type":"dedicated_host_disk","size":4,"supported_instance_interface_types":["nvme"]}],"group":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_type":"dedicated_host_group"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","instance_placement_enabled":true,"instances":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance"}],"lifecycle_state":"stable","memory":128,"name":"my-host","numa":{"count":2,"nodes":[{"available_vcpu":24,"vcpu":56}]},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a","name":"mx2-host-152x1216"},"provisionable":false,"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"dedicated_host","socket_count":4,"state":"available","supported_instance_profiles":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"}],"vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"dedicated_hosts":[{"available_memory":128,"available_vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a","disks":[{"available":9,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","instance_disks":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-disk","resource_type":"instance_disk"}],"interface_type":"nvme","lifecycle_state":"stable","name":"my-dedicated-host-disk","provisionable":false,"resource_type":"dedicated_host_disk","size":4,"supported_instance_interface_types":["nvme"]}],"group":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_type":"dedicated_host_group"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a","id":"0717-1e09281b-f177-46fb-baf1-bc152b2e391a","instance_placement_enabled":true,"instances":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a","id":"0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","name":"my-instance"}],"lifecycle_state":"stable","memory":128,"name":"my-host","numa":{"count":2,"nodes":[{"available_vcpu":24,"vcpu":56}]},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a","name":"mx2-host-152x1216"},"provisionable":false,"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"dedicated_host","socket_count":4,"state":"available","supported_instance_profiles":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"}],"vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}`) } else { res.WriteHeader(400) } @@ -39071,7 +39072,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"available_memory": 128, "available_vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"available": 9, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "instance_disks": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-disk", "resource_type": "instance_disk"}], "interface_type": "nvme", "lifecycle_state": "stable", "name": "my-dedicated-host-disk", "provisionable": false, "resource_type": "dedicated_host_disk", "size": 4, "supported_instance_interface_types": ["nvme"]}], "group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_placement_enabled": true, "instances": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}], "lifecycle_state": "stable", "memory": 128, "name": "my-host", "numa": {"count": 2, "nodes": [{"available_vcpu": 24, "vcpu": 56}]}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "mx2-host-152x1216"}, "provisionable": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host", "socket_count": 4, "state": "available", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"available_memory": 128, "available_vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"available": 9, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "instance_disks": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-disk", "resource_type": "instance_disk"}], "interface_type": "nvme", "lifecycle_state": "stable", "name": "my-dedicated-host-disk", "provisionable": false, "resource_type": "dedicated_host_disk", "size": 4, "supported_instance_interface_types": ["nvme"]}], "group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_placement_enabled": true, "instances": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}], "lifecycle_state": "stable", "memory": 128, "name": "my-host", "numa": {"count": 2, "nodes": [{"available_vcpu": 24, "vcpu": 56}]}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "mx2-host-152x1216"}, "provisionable": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host", "socket_count": 4, "state": "available", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke CreateDedicatedHost successfully with retries`, func() { @@ -39164,7 +39165,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"available_memory": 128, "available_vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"available": 9, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "instance_disks": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-disk", "resource_type": "instance_disk"}], "interface_type": "nvme", "lifecycle_state": "stable", "name": "my-dedicated-host-disk", "provisionable": false, "resource_type": "dedicated_host_disk", "size": 4, "supported_instance_interface_types": ["nvme"]}], "group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_placement_enabled": true, "instances": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}], "lifecycle_state": "stable", "memory": 128, "name": "my-host", "numa": {"count": 2, "nodes": [{"available_vcpu": 24, "vcpu": 56}]}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "mx2-host-152x1216"}, "provisionable": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host", "socket_count": 4, "state": "available", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"available_memory": 128, "available_vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"available": 9, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "instance_disks": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-disk", "resource_type": "instance_disk"}], "interface_type": "nvme", "lifecycle_state": "stable", "name": "my-dedicated-host-disk", "provisionable": false, "resource_type": "dedicated_host_disk", "size": 4, "supported_instance_interface_types": ["nvme"]}], "group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_placement_enabled": true, "instances": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}], "lifecycle_state": "stable", "memory": 128, "name": "my-host", "numa": {"count": 2, "nodes": [{"available_vcpu": 24, "vcpu": 56}]}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "mx2-host-152x1216"}, "provisionable": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host", "socket_count": 4, "state": "available", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke CreateDedicatedHost successfully`, func() { @@ -40217,7 +40218,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"available_memory": 128, "available_vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"available": 9, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "instance_disks": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-disk", "resource_type": "instance_disk"}], "interface_type": "nvme", "lifecycle_state": "stable", "name": "my-dedicated-host-disk", "provisionable": false, "resource_type": "dedicated_host_disk", "size": 4, "supported_instance_interface_types": ["nvme"]}], "group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_placement_enabled": true, "instances": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}], "lifecycle_state": "stable", "memory": 128, "name": "my-host", "numa": {"count": 2, "nodes": [{"available_vcpu": 24, "vcpu": 56}]}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "mx2-host-152x1216"}, "provisionable": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host", "socket_count": 4, "state": "available", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"available_memory": 128, "available_vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"available": 9, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "instance_disks": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-disk", "resource_type": "instance_disk"}], "interface_type": "nvme", "lifecycle_state": "stable", "name": "my-dedicated-host-disk", "provisionable": false, "resource_type": "dedicated_host_disk", "size": 4, "supported_instance_interface_types": ["nvme"]}], "group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_placement_enabled": true, "instances": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}], "lifecycle_state": "stable", "memory": 128, "name": "my-host", "numa": {"count": 2, "nodes": [{"available_vcpu": 24, "vcpu": 56}]}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "mx2-host-152x1216"}, "provisionable": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host", "socket_count": 4, "state": "available", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetDedicatedHost successfully with retries`, func() { @@ -40274,7 +40275,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"available_memory": 128, "available_vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"available": 9, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "instance_disks": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-disk", "resource_type": "instance_disk"}], "interface_type": "nvme", "lifecycle_state": "stable", "name": "my-dedicated-host-disk", "provisionable": false, "resource_type": "dedicated_host_disk", "size": 4, "supported_instance_interface_types": ["nvme"]}], "group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_placement_enabled": true, "instances": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}], "lifecycle_state": "stable", "memory": 128, "name": "my-host", "numa": {"count": 2, "nodes": [{"available_vcpu": 24, "vcpu": 56}]}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "mx2-host-152x1216"}, "provisionable": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host", "socket_count": 4, "state": "available", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"available_memory": 128, "available_vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"available": 9, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "instance_disks": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-disk", "resource_type": "instance_disk"}], "interface_type": "nvme", "lifecycle_state": "stable", "name": "my-dedicated-host-disk", "provisionable": false, "resource_type": "dedicated_host_disk", "size": 4, "supported_instance_interface_types": ["nvme"]}], "group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_placement_enabled": true, "instances": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}], "lifecycle_state": "stable", "memory": 128, "name": "my-host", "numa": {"count": 2, "nodes": [{"available_vcpu": 24, "vcpu": 56}]}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "mx2-host-152x1216"}, "provisionable": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host", "socket_count": 4, "state": "available", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetDedicatedHost successfully`, func() { @@ -40466,7 +40467,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"available_memory": 128, "available_vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"available": 9, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "instance_disks": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-disk", "resource_type": "instance_disk"}], "interface_type": "nvme", "lifecycle_state": "stable", "name": "my-dedicated-host-disk", "provisionable": false, "resource_type": "dedicated_host_disk", "size": 4, "supported_instance_interface_types": ["nvme"]}], "group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_placement_enabled": true, "instances": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}], "lifecycle_state": "stable", "memory": 128, "name": "my-host", "numa": {"count": 2, "nodes": [{"available_vcpu": 24, "vcpu": 56}]}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "mx2-host-152x1216"}, "provisionable": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host", "socket_count": 4, "state": "available", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"available_memory": 128, "available_vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"available": 9, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "instance_disks": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-disk", "resource_type": "instance_disk"}], "interface_type": "nvme", "lifecycle_state": "stable", "name": "my-dedicated-host-disk", "provisionable": false, "resource_type": "dedicated_host_disk", "size": 4, "supported_instance_interface_types": ["nvme"]}], "group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_placement_enabled": true, "instances": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}], "lifecycle_state": "stable", "memory": 128, "name": "my-host", "numa": {"count": 2, "nodes": [{"available_vcpu": 24, "vcpu": 56}]}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "mx2-host-152x1216"}, "provisionable": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host", "socket_count": 4, "state": "available", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke UpdateDedicatedHost successfully with retries`, func() { @@ -40547,7 +40548,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"available_memory": 128, "available_vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"available": 9, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "instance_disks": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-disk", "resource_type": "instance_disk"}], "interface_type": "nvme", "lifecycle_state": "stable", "name": "my-dedicated-host-disk", "provisionable": false, "resource_type": "dedicated_host_disk", "size": 4, "supported_instance_interface_types": ["nvme"]}], "group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_placement_enabled": true, "instances": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}], "lifecycle_state": "stable", "memory": 128, "name": "my-host", "numa": {"count": 2, "nodes": [{"available_vcpu": 24, "vcpu": 56}]}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "mx2-host-152x1216"}, "provisionable": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host", "socket_count": 4, "state": "available", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"available_memory": 128, "available_vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"available": 9, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "instance_disks": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-disk", "resource_type": "instance_disk"}], "interface_type": "nvme", "lifecycle_state": "stable", "name": "my-dedicated-host-disk", "provisionable": false, "resource_type": "dedicated_host_disk", "size": 4, "supported_instance_interface_types": ["nvme"]}], "group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_placement_enabled": true, "instances": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}], "lifecycle_state": "stable", "memory": 128, "name": "my-host", "numa": {"count": 2, "nodes": [{"available_vcpu": 24, "vcpu": 56}]}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "mx2-host-152x1216"}, "provisionable": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host", "socket_count": 4, "state": "available", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}], "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke UpdateDedicatedHost successfully`, func() { @@ -40744,7 +40745,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "placement_groups": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "id": "r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "lifecycle_state": "stable", "name": "my-placement-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "placement_group", "strategy": "host_spread"}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "placement_groups": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "id": "r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "lifecycle_state": "stable", "name": "my-placement-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "placement_group", "strategy": "host_spread"}], "total_count": 132}`) })) }) It(`Invoke ListPlacementGroups successfully with retries`, func() { @@ -40804,7 +40805,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "placement_groups": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "id": "r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "lifecycle_state": "stable", "name": "my-placement-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "placement_group", "strategy": "host_spread"}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "placement_groups": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "id": "r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "lifecycle_state": "stable", "name": "my-placement-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "placement_group", "strategy": "host_spread"}], "total_count": 132}`) })) }) It(`Invoke ListPlacementGroups successfully`, func() { @@ -40942,9 +40943,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"placement_groups":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871","href":"https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871","id":"r018-418fe842-a3e9-47b9-a938-1aa5bd632871","lifecycle_state":"stable","name":"my-placement-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"placement_group","strategy":"host_spread"}]}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"placement_groups":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871","href":"https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871","id":"r018-418fe842-a3e9-47b9-a938-1aa5bd632871","lifecycle_state":"stable","name":"my-placement-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"placement_group","strategy":"host_spread"}]}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"placement_groups":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871","href":"https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871","id":"r018-418fe842-a3e9-47b9-a938-1aa5bd632871","lifecycle_state":"stable","name":"my-placement-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"placement_group","strategy":"host_spread"}]}`) + fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"placement_groups":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871","href":"https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871","id":"r018-418fe842-a3e9-47b9-a938-1aa5bd632871","lifecycle_state":"stable","name":"my-placement-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"placement_group","strategy":"host_spread"}]}`) } else { res.WriteHeader(400) } @@ -41091,7 +41092,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "id": "r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "lifecycle_state": "stable", "name": "my-placement-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "placement_group", "strategy": "host_spread"}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "id": "r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "lifecycle_state": "stable", "name": "my-placement-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "placement_group", "strategy": "host_spread"}`) })) }) It(`Invoke CreatePlacementGroup successfully with retries`, func() { @@ -41170,7 +41171,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "id": "r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "lifecycle_state": "stable", "name": "my-placement-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "placement_group", "strategy": "host_spread"}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "id": "r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "lifecycle_state": "stable", "name": "my-placement-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "placement_group", "strategy": "host_spread"}`) })) }) It(`Invoke CreatePlacementGroup successfully`, func() { @@ -41429,7 +41430,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "id": "r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "lifecycle_state": "stable", "name": "my-placement-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "placement_group", "strategy": "host_spread"}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "id": "r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "lifecycle_state": "stable", "name": "my-placement-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "placement_group", "strategy": "host_spread"}`) })) }) It(`Invoke GetPlacementGroup successfully with retries`, func() { @@ -41486,7 +41487,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "id": "r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "lifecycle_state": "stable", "name": "my-placement-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "placement_group", "strategy": "host_spread"}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "id": "r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "lifecycle_state": "stable", "name": "my-placement-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "placement_group", "strategy": "host_spread"}`) })) }) It(`Invoke GetPlacementGroup successfully`, func() { @@ -41677,7 +41678,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "id": "r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "lifecycle_state": "stable", "name": "my-placement-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "placement_group", "strategy": "host_spread"}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "id": "r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "lifecycle_state": "stable", "name": "my-placement-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "placement_group", "strategy": "host_spread"}`) })) }) It(`Invoke UpdatePlacementGroup successfully with retries`, func() { @@ -41757,7 +41758,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "id": "r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "lifecycle_state": "stable", "name": "my-placement-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "placement_group", "strategy": "host_spread"}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "id": "r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "lifecycle_state": "stable", "name": "my-placement-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "placement_group", "strategy": "host_spread"}`) })) }) It(`Invoke UpdatePlacementGroup successfully`, func() { @@ -42450,7 +42451,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["vpc.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) + Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"my-vpc"})) res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -42473,7 +42474,7 @@ var _ = Describe(`VpcV1`, func() { listBareMetalServersOptionsModel.ResourceGroupID = core.StringPtr("testString") listBareMetalServersOptionsModel.Name = core.StringPtr("testString") listBareMetalServersOptionsModel.VPCID = core.StringPtr("testString") - listBareMetalServersOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listBareMetalServersOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listBareMetalServersOptionsModel.VPCName = core.StringPtr("my-vpc") listBareMetalServersOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Expect response parsing to fail since we are receiving a text/plain response @@ -42513,7 +42514,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["vpc.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) + Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"my-vpc"})) // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -42521,7 +42522,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"bare_metal_servers": [{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "message": "The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"bare_metal_servers": [{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "message": "The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListBareMetalServers successfully with retries`, func() { @@ -42541,7 +42542,7 @@ var _ = Describe(`VpcV1`, func() { listBareMetalServersOptionsModel.ResourceGroupID = core.StringPtr("testString") listBareMetalServersOptionsModel.Name = core.StringPtr("testString") listBareMetalServersOptionsModel.VPCID = core.StringPtr("testString") - listBareMetalServersOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listBareMetalServersOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listBareMetalServersOptionsModel.VPCName = core.StringPtr("my-vpc") listBareMetalServersOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -42586,12 +42587,12 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["vpc.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) + Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"my-vpc"})) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"bare_metal_servers": [{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "message": "The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"bare_metal_servers": [{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "message": "The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListBareMetalServers successfully`, func() { @@ -42616,7 +42617,7 @@ var _ = Describe(`VpcV1`, func() { listBareMetalServersOptionsModel.ResourceGroupID = core.StringPtr("testString") listBareMetalServersOptionsModel.Name = core.StringPtr("testString") listBareMetalServersOptionsModel.VPCID = core.StringPtr("testString") - listBareMetalServersOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listBareMetalServersOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listBareMetalServersOptionsModel.VPCName = core.StringPtr("my-vpc") listBareMetalServersOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -42643,7 +42644,7 @@ var _ = Describe(`VpcV1`, func() { listBareMetalServersOptionsModel.ResourceGroupID = core.StringPtr("testString") listBareMetalServersOptionsModel.Name = core.StringPtr("testString") listBareMetalServersOptionsModel.VPCID = core.StringPtr("testString") - listBareMetalServersOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listBareMetalServersOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listBareMetalServersOptionsModel.VPCName = core.StringPtr("my-vpc") listBareMetalServersOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) @@ -42684,7 +42685,7 @@ var _ = Describe(`VpcV1`, func() { listBareMetalServersOptionsModel.ResourceGroupID = core.StringPtr("testString") listBareMetalServersOptionsModel.Name = core.StringPtr("testString") listBareMetalServersOptionsModel.VPCID = core.StringPtr("testString") - listBareMetalServersOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listBareMetalServersOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listBareMetalServersOptionsModel.VPCName = core.StringPtr("my-vpc") listBareMetalServersOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -42744,9 +42745,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"bare_metal_servers":[{"bandwidth":20000,"boot_target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-bare-metal-server-disk","resource_type":"bare_metal_server_disk"},"cpu":{"architecture":"amd64","core_count":80,"socket_count":4,"threads_per_core":2},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a","disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","interface_type":"fcp","name":"my-bare-metal-server-disk","resource_type":"bare_metal_server_disk","size":100}],"enable_secure_boot":false,"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","memory":1536,"name":"my-bare-metal-server","network_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"bare_metal_server_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-bare-metal-server-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"primary_network_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"bare_metal_server_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-bare-metal-server-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768","name":"bx2-metal-192x768","resource_type":"bare_metal_server_profile"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"bare_metal_server","status":"deleting","status_reasons":[{"code":"cannot_start_capacity","message":"The bare metal server cannot start as there is no more capacity in this\\nzone for a bare metal server with the requested profile.","more_info":"https://console.bluemix.net/docs/iaas/bare_metal_server.html"}],"trusted_platform_module":{"enabled":true,"mode":"disabled","supported_modes":["disabled"]},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"bare_metal_servers":[{"bandwidth":20000,"boot_target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-bare-metal-server-disk","resource_type":"bare_metal_server_disk"},"cpu":{"architecture":"amd64","core_count":80,"socket_count":4,"threads_per_core":2},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a","disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","interface_type":"fcp","name":"my-bare-metal-server-disk","resource_type":"bare_metal_server_disk","size":100}],"enable_secure_boot":false,"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","memory":1536,"name":"my-bare-metal-server","network_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"bare_metal_server_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-bare-metal-server-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"primary_network_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"bare_metal_server_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-bare-metal-server-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768","name":"bx2-metal-192x768","resource_type":"bare_metal_server_profile"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"bare_metal_server","status":"deleting","status_reasons":[{"code":"cannot_start_capacity","message":"The bare metal server cannot start as there is no more capacity in this\\nzone for a bare metal server with the requested profile.","more_info":"https://console.bluemix.net/docs/iaas/bare_metal_server.html"}],"trusted_platform_module":{"enabled":true,"mode":"disabled","supported_modes":["disabled"]},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"bare_metal_servers":[{"bandwidth":20000,"boot_target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-bare-metal-server-disk","resource_type":"bare_metal_server_disk"},"cpu":{"architecture":"amd64","core_count":80,"socket_count":4,"threads_per_core":2},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a","disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","interface_type":"fcp","name":"my-bare-metal-server-disk","resource_type":"bare_metal_server_disk","size":100}],"enable_secure_boot":false,"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","memory":1536,"name":"my-bare-metal-server","network_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"bare_metal_server_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-bare-metal-server-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"primary_network_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"bare_metal_server_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-bare-metal-server-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768","name":"bx2-metal-192x768","resource_type":"bare_metal_server_profile"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"bare_metal_server","status":"deleting","status_reasons":[{"code":"cannot_start_capacity","message":"The bare metal server cannot start as there is no more capacity in this\\nzone for a bare metal server with the requested profile.","more_info":"https://console.bluemix.net/docs/iaas/bare_metal_server.html"}],"trusted_platform_module":{"enabled":true,"mode":"disabled","supported_modes":["disabled"]},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}`) + fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"bare_metal_servers":[{"bandwidth":20000,"boot_target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-bare-metal-server-disk","resource_type":"bare_metal_server_disk"},"cpu":{"architecture":"amd64","core_count":80,"socket_count":4,"threads_per_core":2},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a","disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","interface_type":"fcp","name":"my-bare-metal-server-disk","resource_type":"bare_metal_server_disk","size":100}],"enable_secure_boot":false,"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","memory":1536,"name":"my-bare-metal-server","network_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"bare_metal_server_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-bare-metal-server-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"primary_network_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"bare_metal_server_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-bare-metal-server-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768","name":"bx2-metal-192x768","resource_type":"bare_metal_server_profile"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"bare_metal_server","status":"deleting","status_reasons":[{"code":"cannot_start_capacity","message":"The bare metal server cannot start as there is no more capacity in this\\nzone for a bare metal server with the requested profile.","more_info":"https://console.bluemix.net/docs/iaas/bare_metal_server.html"}],"trusted_platform_module":{"enabled":true,"mode":"disabled","supported_modes":["disabled"]},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}`) } else { res.WriteHeader(400) } @@ -42766,7 +42767,7 @@ var _ = Describe(`VpcV1`, func() { ResourceGroupID: core.StringPtr("testString"), Name: core.StringPtr("testString"), VPCID: core.StringPtr("testString"), - VPCCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"), + VPCCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"), VPCName: core.StringPtr("my-vpc"), } @@ -42797,7 +42798,7 @@ var _ = Describe(`VpcV1`, func() { ResourceGroupID: core.StringPtr("testString"), Name: core.StringPtr("testString"), VPCID: core.StringPtr("testString"), - VPCCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"), + VPCCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"), VPCName: core.StringPtr("my-vpc"), } @@ -42841,7 +42842,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the ImageIdentityByID model imageIdentityModel := new(vpcv1.ImageIdentityByID) - imageIdentityModel.ID = core.StringPtr("72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") + imageIdentityModel.ID = core.StringPtr("r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") // Construct an instance of the KeyIdentityByID model keyIdentityModel := new(vpcv1.KeyIdentityByID) @@ -42867,7 +42868,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VPCIdentityByID model vpcIdentityModel := new(vpcv1.VPCIdentityByID) - vpcIdentityModel.ID = core.StringPtr("4727d842-f94f-4a2d-824a-9bc9b02c523b") + vpcIdentityModel.ID = core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") // Construct an instance of the ZoneIdentityByName model zoneIdentityModel := new(vpcv1.ZoneIdentityByName) @@ -42990,7 +42991,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "message": "The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "message": "The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke CreateBareMetalServer successfully with retries`, func() { @@ -43005,7 +43006,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the ImageIdentityByID model imageIdentityModel := new(vpcv1.ImageIdentityByID) - imageIdentityModel.ID = core.StringPtr("72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") + imageIdentityModel.ID = core.StringPtr("r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") // Construct an instance of the KeyIdentityByID model keyIdentityModel := new(vpcv1.KeyIdentityByID) @@ -43031,7 +43032,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VPCIdentityByID model vpcIdentityModel := new(vpcv1.VPCIdentityByID) - vpcIdentityModel.ID = core.StringPtr("4727d842-f94f-4a2d-824a-9bc9b02c523b") + vpcIdentityModel.ID = core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") // Construct an instance of the ZoneIdentityByName model zoneIdentityModel := new(vpcv1.ZoneIdentityByName) @@ -43156,7 +43157,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "message": "The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "message": "The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke CreateBareMetalServer successfully`, func() { @@ -43176,7 +43177,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the ImageIdentityByID model imageIdentityModel := new(vpcv1.ImageIdentityByID) - imageIdentityModel.ID = core.StringPtr("72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") + imageIdentityModel.ID = core.StringPtr("r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") // Construct an instance of the KeyIdentityByID model keyIdentityModel := new(vpcv1.KeyIdentityByID) @@ -43202,7 +43203,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VPCIdentityByID model vpcIdentityModel := new(vpcv1.VPCIdentityByID) - vpcIdentityModel.ID = core.StringPtr("4727d842-f94f-4a2d-824a-9bc9b02c523b") + vpcIdentityModel.ID = core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") // Construct an instance of the ZoneIdentityByName model zoneIdentityModel := new(vpcv1.ZoneIdentityByName) @@ -43290,7 +43291,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the ImageIdentityByID model imageIdentityModel := new(vpcv1.ImageIdentityByID) - imageIdentityModel.ID = core.StringPtr("72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") + imageIdentityModel.ID = core.StringPtr("r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") // Construct an instance of the KeyIdentityByID model keyIdentityModel := new(vpcv1.KeyIdentityByID) @@ -43316,7 +43317,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VPCIdentityByID model vpcIdentityModel := new(vpcv1.VPCIdentityByID) - vpcIdentityModel.ID = core.StringPtr("4727d842-f94f-4a2d-824a-9bc9b02c523b") + vpcIdentityModel.ID = core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") // Construct an instance of the ZoneIdentityByName model zoneIdentityModel := new(vpcv1.ZoneIdentityByName) @@ -43425,7 +43426,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the ImageIdentityByID model imageIdentityModel := new(vpcv1.ImageIdentityByID) - imageIdentityModel.ID = core.StringPtr("72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") + imageIdentityModel.ID = core.StringPtr("r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") // Construct an instance of the KeyIdentityByID model keyIdentityModel := new(vpcv1.KeyIdentityByID) @@ -43451,7 +43452,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VPCIdentityByID model vpcIdentityModel := new(vpcv1.VPCIdentityByID) - vpcIdentityModel.ID = core.StringPtr("4727d842-f94f-4a2d-824a-9bc9b02c523b") + vpcIdentityModel.ID = core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") // Construct an instance of the ZoneIdentityByName model zoneIdentityModel := new(vpcv1.ZoneIdentityByName) @@ -44628,7 +44629,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_attachments?limit=20"}, "limit": 20, "network_attachments": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "lifecycle_state": "stable", "name": "my-bare-metal-server-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "allowed_vlans": [4], "interface_type": "pci"}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_attachments?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_attachments?limit=20"}, "limit": 20, "network_attachments": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "lifecycle_state": "stable", "name": "my-bare-metal-server-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "allowed_vlans": [4], "interface_type": "pci"}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_attachments?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListBareMetalServerNetworkAttachments successfully with retries`, func() { @@ -44689,7 +44690,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_attachments?limit=20"}, "limit": 20, "network_attachments": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "lifecycle_state": "stable", "name": "my-bare-metal-server-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "allowed_vlans": [4], "interface_type": "pci"}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_attachments?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_attachments?limit=20"}, "limit": 20, "network_attachments": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "lifecycle_state": "stable", "name": "my-bare-metal-server-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "allowed_vlans": [4], "interface_type": "pci"}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_attachments?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListBareMetalServerNetworkAttachments successfully`, func() { @@ -44837,9 +44838,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"network_attachments":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","lifecycle_state":"stable","name":"my-bare-metal-server-network-attachment","port_speed":1000,"primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"bare_metal_server_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"type":"primary","virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","id":"0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"},"allowed_vlans":[4],"interface_type":"pci"}]}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"network_attachments":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","lifecycle_state":"stable","name":"my-bare-metal-server-network-attachment","port_speed":1000,"primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"bare_metal_server_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"type":"primary","virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","id":"0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"},"allowed_vlans":[4],"interface_type":"pci"}]}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"network_attachments":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","lifecycle_state":"stable","name":"my-bare-metal-server-network-attachment","port_speed":1000,"primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"bare_metal_server_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"type":"primary","virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","id":"0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"},"allowed_vlans":[4],"interface_type":"pci"}]}`) + fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"network_attachments":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","lifecycle_state":"stable","name":"my-bare-metal-server-network-attachment","port_speed":1000,"primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"bare_metal_server_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"type":"primary","virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","id":"0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"},"allowed_vlans":[4],"interface_type":"pci"}]}`) } else { res.WriteHeader(400) } @@ -45026,7 +45027,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "lifecycle_state": "stable", "name": "my-bare-metal-server-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "allowed_vlans": [4], "interface_type": "pci"}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "lifecycle_state": "stable", "name": "my-bare-metal-server-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "allowed_vlans": [4], "interface_type": "pci"}`) })) }) It(`Invoke CreateBareMetalServerNetworkAttachment successfully with retries`, func() { @@ -45143,7 +45144,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "lifecycle_state": "stable", "name": "my-bare-metal-server-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "allowed_vlans": [4], "interface_type": "pci"}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "lifecycle_state": "stable", "name": "my-bare-metal-server-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "allowed_vlans": [4], "interface_type": "pci"}`) })) }) It(`Invoke CreateBareMetalServerNetworkAttachment successfully`, func() { @@ -45519,7 +45520,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "lifecycle_state": "stable", "name": "my-bare-metal-server-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "allowed_vlans": [4], "interface_type": "pci"}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "lifecycle_state": "stable", "name": "my-bare-metal-server-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "allowed_vlans": [4], "interface_type": "pci"}`) })) }) It(`Invoke GetBareMetalServerNetworkAttachment successfully with retries`, func() { @@ -45577,7 +45578,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "lifecycle_state": "stable", "name": "my-bare-metal-server-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "allowed_vlans": [4], "interface_type": "pci"}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "lifecycle_state": "stable", "name": "my-bare-metal-server-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "allowed_vlans": [4], "interface_type": "pci"}`) })) }) It(`Invoke GetBareMetalServerNetworkAttachment successfully`, func() { @@ -45773,7 +45774,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "lifecycle_state": "stable", "name": "my-bare-metal-server-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "allowed_vlans": [4], "interface_type": "pci"}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "lifecycle_state": "stable", "name": "my-bare-metal-server-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "allowed_vlans": [4], "interface_type": "pci"}`) })) }) It(`Invoke UpdateBareMetalServerNetworkAttachment successfully with retries`, func() { @@ -45855,7 +45856,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "lifecycle_state": "stable", "name": "my-bare-metal-server-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "allowed_vlans": [4], "interface_type": "pci"}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "lifecycle_state": "stable", "name": "my-bare-metal-server-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "allowed_vlans": [4], "interface_type": "pci"}`) })) }) It(`Invoke UpdateBareMetalServerNetworkAttachment successfully`, func() { @@ -46056,7 +46057,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?limit=20"}, "limit": 20, "network_interfaces": [{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:04:00:C4:6A", "name": "my-bare-metal-server-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?limit=20"}, "limit": 20, "network_interfaces": [{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:04:00:C4:6A", "name": "my-bare-metal-server-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListBareMetalServerNetworkInterfaces successfully with retries`, func() { @@ -46117,7 +46118,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?limit=20"}, "limit": 20, "network_interfaces": [{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:04:00:C4:6A", "name": "my-bare-metal-server-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?limit=20"}, "limit": 20, "network_interfaces": [{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:04:00:C4:6A", "name": "my-bare-metal-server-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListBareMetalServerNetworkInterfaces successfully`, func() { @@ -46265,9 +46266,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"network_interfaces":[{"allow_ip_spoofing":true,"created_at":"2019-01-01T12:00:00.000Z","enable_infrastructure_nat":true,"floating_ips":[{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip"}],"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","mac_address":"02:00:04:00:C4:6A","name":"my-bare-metal-server-network-interface","port_speed":1000,"primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"status":"available","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"type":"primary","interface_type":"hipersocket"}]}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"network_interfaces":[{"allow_ip_spoofing":true,"created_at":"2019-01-01T12:00:00.000Z","enable_infrastructure_nat":true,"floating_ips":[{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip"}],"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","mac_address":"02:00:04:00:C4:6A","name":"my-bare-metal-server-network-interface","port_speed":1000,"primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"status":"available","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"type":"primary","interface_type":"hipersocket"}]}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"network_interfaces":[{"allow_ip_spoofing":true,"created_at":"2019-01-01T12:00:00.000Z","enable_infrastructure_nat":true,"floating_ips":[{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip"}],"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","mac_address":"02:00:04:00:C4:6A","name":"my-bare-metal-server-network-interface","port_speed":1000,"primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"status":"available","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"type":"primary","interface_type":"hipersocket"}]}`) + fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"network_interfaces":[{"allow_ip_spoofing":true,"created_at":"2019-01-01T12:00:00.000Z","enable_infrastructure_nat":true,"floating_ips":[{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip"}],"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","mac_address":"02:00:04:00:C4:6A","name":"my-bare-metal-server-network-interface","port_speed":1000,"primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"status":"available","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"type":"primary","interface_type":"hipersocket"}]}`) } else { res.WriteHeader(400) } @@ -46435,7 +46436,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:04:00:C4:6A", "name": "my-bare-metal-server-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}`) + fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:04:00:C4:6A", "name": "my-bare-metal-server-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}`) })) }) It(`Invoke CreateBareMetalServerNetworkInterface successfully with retries`, func() { @@ -46533,7 +46534,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:04:00:C4:6A", "name": "my-bare-metal-server-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}`) + fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:04:00:C4:6A", "name": "my-bare-metal-server-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}`) })) }) It(`Invoke CreateBareMetalServerNetworkInterface successfully`, func() { @@ -46852,7 +46853,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:04:00:C4:6A", "name": "my-bare-metal-server-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}`) + fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:04:00:C4:6A", "name": "my-bare-metal-server-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}`) })) }) It(`Invoke GetBareMetalServerNetworkInterface successfully with retries`, func() { @@ -46910,7 +46911,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:04:00:C4:6A", "name": "my-bare-metal-server-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}`) + fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:04:00:C4:6A", "name": "my-bare-metal-server-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}`) })) }) It(`Invoke GetBareMetalServerNetworkInterface successfully`, func() { @@ -47108,7 +47109,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:04:00:C4:6A", "name": "my-bare-metal-server-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}`) + fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:04:00:C4:6A", "name": "my-bare-metal-server-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}`) })) }) It(`Invoke UpdateBareMetalServerNetworkInterface successfully with retries`, func() { @@ -47192,7 +47193,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:04:00:C4:6A", "name": "my-bare-metal-server-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}`) + fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:04:00:C4:6A", "name": "my-bare-metal-server-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}`) })) }) It(`Invoke UpdateBareMetalServerNetworkInterface successfully`, func() { @@ -47394,7 +47395,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"floating_ips": [{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}`) + fmt.Fprintf(res, "%s", `{"floating_ips": [{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}`) })) }) It(`Invoke ListBareMetalServerNetworkInterfaceFloatingIps successfully with retries`, func() { @@ -47452,7 +47453,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"floating_ips": [{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}`) + fmt.Fprintf(res, "%s", `{"floating_ips": [{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}`) })) }) It(`Invoke ListBareMetalServerNetworkInterfaceFloatingIps successfully`, func() { @@ -47702,7 +47703,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetBareMetalServerNetworkInterfaceFloatingIP successfully with retries`, func() { @@ -47761,7 +47762,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetBareMetalServerNetworkInterfaceFloatingIP successfully`, func() { @@ -47937,7 +47938,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke AddBareMetalServerNetworkInterfaceFloatingIP successfully with retries`, func() { @@ -47996,7 +47997,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke AddBareMetalServerNetworkInterfaceFloatingIP successfully`, func() { @@ -48171,7 +48172,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20"}, "ips": [{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20"}, "ips": [{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListBareMetalServerNetworkInterfaceIps successfully with retries`, func() { @@ -48229,7 +48230,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20"}, "ips": [{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20"}, "ips": [{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListBareMetalServerNetworkInterfaceIps successfully`, func() { @@ -48402,7 +48403,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}`) + fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}`) })) }) It(`Invoke GetBareMetalServerNetworkInterfaceIP successfully with retries`, func() { @@ -48461,7 +48462,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}`) + fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}`) })) }) It(`Invoke GetBareMetalServerNetworkInterfaceIP successfully`, func() { @@ -48708,7 +48709,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "message": "The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "message": "The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetBareMetalServer successfully with retries`, func() { @@ -48765,7 +48766,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "message": "The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "message": "The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetBareMetalServer successfully`, func() { @@ -48962,7 +48963,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "message": "The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "message": "The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke UpdateBareMetalServer successfully with retries`, func() { @@ -49048,7 +49049,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "message": "The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "message": "The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke UpdateBareMetalServer successfully`, func() { @@ -49255,7 +49256,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "keys": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-key"}], "user_accounts": [{"encrypted_password": "qQ+/YEApnl1ZtEgIrfprzb065307thTkzlnLqL5ICpesdbBN03dyCQ==", "encryption_key": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-key"}, "resource_type": "host_user_account", "username": "Administrator"}]}`) + fmt.Fprintf(res, "%s", `{"image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "keys": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-key"}], "user_accounts": [{"encrypted_password": "qQ+/YEApnl1ZtEgIrfprzb065307thTkzlnLqL5ICpesdbBN03dyCQ==", "encryption_key": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-key"}, "resource_type": "host_user_account", "username": "Administrator"}]}`) })) }) It(`Invoke GetBareMetalServerInitialization successfully with retries`, func() { @@ -49312,7 +49313,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "keys": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-key"}], "user_accounts": [{"encrypted_password": "qQ+/YEApnl1ZtEgIrfprzb065307thTkzlnLqL5ICpesdbBN03dyCQ==", "encryption_key": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-key"}, "resource_type": "host_user_account", "username": "Administrator"}]}`) + fmt.Fprintf(res, "%s", `{"image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "keys": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-key"}], "user_accounts": [{"encrypted_password": "qQ+/YEApnl1ZtEgIrfprzb065307thTkzlnLqL5ICpesdbBN03dyCQ==", "encryption_key": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-key"}, "resource_type": "host_user_account", "username": "Administrator"}]}`) })) }) It(`Invoke GetBareMetalServerInitialization successfully`, func() { @@ -50298,7 +50299,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volumes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volumes?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132, "volumes": [{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["UserTags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volumes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volumes?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132, "volumes": [{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["UserTags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}`) })) }) It(`Invoke ListVolumes successfully with retries`, func() { @@ -50372,7 +50373,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volumes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volumes?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132, "volumes": [{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["UserTags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volumes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volumes?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132, "volumes": [{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["UserTags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}`) })) }) It(`Invoke ListVolumes successfully`, func() { @@ -50531,9 +50532,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"volumes":[{"active":true,"attachment_state":"attached","bandwidth":1000,"busy":true,"capacity":1000,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5","encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"health_reasons":[{"code":"initializing_from_snapshot","message":"Performance will be degraded while this volume is being initialized from its snapshot","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","iops":10000,"name":"my-volume","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose","name":"general-purpose"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"volume","source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"aa2432b1fa4d4ace891e9b80fc104e34","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"Message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"user_tags":["UserTags"],"volume_attachments":[{"delete_volume_on_instance_delete":true,"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"82cbf856-9cbb-45fb-b62f-d7bcef32399a","instance":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance"},"name":"my-volume-attachment","type":"boot"}],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"volumes":[{"active":true,"attachment_state":"attached","bandwidth":1000,"busy":true,"capacity":1000,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"health_reasons":[{"code":"initializing_from_snapshot","message":"Performance will be degraded while this volume is being initialized from its snapshot","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","iops":10000,"name":"my-volume","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose","name":"general-purpose"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"volume","source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"Message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"user_tags":["UserTags"],"volume_attachments":[{"delete_volume_on_instance_delete":true,"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","instance":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a","id":"0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","name":"my-instance"},"name":"my-volume-attachment","type":"boot"}],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"volumes":[{"active":true,"attachment_state":"attached","bandwidth":1000,"busy":true,"capacity":1000,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5","encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"health_reasons":[{"code":"initializing_from_snapshot","message":"Performance will be degraded while this volume is being initialized from its snapshot","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","iops":10000,"name":"my-volume","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose","name":"general-purpose"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"volume","source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"aa2432b1fa4d4ace891e9b80fc104e34","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"Message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"user_tags":["UserTags"],"volume_attachments":[{"delete_volume_on_instance_delete":true,"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"82cbf856-9cbb-45fb-b62f-d7bcef32399a","instance":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance"},"name":"my-volume-attachment","type":"boot"}],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}`) + fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"volumes":[{"active":true,"attachment_state":"attached","bandwidth":1000,"busy":true,"capacity":1000,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"health_reasons":[{"code":"initializing_from_snapshot","message":"Performance will be degraded while this volume is being initialized from its snapshot","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","iops":10000,"name":"my-volume","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose","name":"general-purpose"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"volume","source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"Message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"user_tags":["UserTags"],"volume_attachments":[{"delete_volume_on_instance_delete":true,"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","instance":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a","id":"0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","name":"my-instance"},"name":"my-volume-attachment","type":"boot"}],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}`) } else { res.WriteHeader(400) } @@ -50644,7 +50645,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the VolumePrototypeVolumeByCapacity model volumePrototypeModel := new(vpcv1.VolumePrototypeVolumeByCapacity) @@ -50715,7 +50716,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["UserTags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["UserTags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke CreateVolume successfully with retries`, func() { @@ -50742,7 +50743,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the VolumePrototypeVolumeByCapacity model volumePrototypeModel := new(vpcv1.VolumePrototypeVolumeByCapacity) @@ -50815,7 +50816,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["UserTags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["UserTags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke CreateVolume successfully`, func() { @@ -50847,7 +50848,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the VolumePrototypeVolumeByCapacity model volumePrototypeModel := new(vpcv1.VolumePrototypeVolumeByCapacity) @@ -50895,7 +50896,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the VolumePrototypeVolumeByCapacity model volumePrototypeModel := new(vpcv1.VolumePrototypeVolumeByCapacity) @@ -50964,7 +50965,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the VolumePrototypeVolumeByCapacity model volumePrototypeModel := new(vpcv1.VolumePrototypeVolumeByCapacity) @@ -51141,7 +51142,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["UserTags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["UserTags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetVolume successfully with retries`, func() { @@ -51198,7 +51199,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["UserTags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["UserTags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetVolume successfully`, func() { @@ -51402,7 +51403,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["UserTags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["UserTags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke UpdateVolume successfully with retries`, func() { @@ -51493,7 +51494,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["UserTags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "Message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["UserTags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke UpdateVolume successfully`, func() { @@ -51726,7 +51727,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "snapshot_consistency_groups": [{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["ServiceTags"], "snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "snapshot_consistency_groups": [{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["ServiceTags"], "snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}], "total_count": 132}`) })) }) It(`Invoke ListSnapshotConsistencyGroups successfully with retries`, func() { @@ -51794,7 +51795,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "snapshot_consistency_groups": [{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["ServiceTags"], "snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "snapshot_consistency_groups": [{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["ServiceTags"], "snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}], "total_count": 132}`) })) }) It(`Invoke ListSnapshotConsistencyGroups successfully`, func() { @@ -51944,9 +51945,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"snapshot_consistency_groups":[{"backup_policy_plan":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","name":"my-policy-plan","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"backup_policy_plan"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263","delete_snapshots_on_delete":false,"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263","id":"r134-fa329f6b-0e36-433f-a3bb-0df632e79263","lifecycle_state":"stable","name":"my-snapshot-consistency-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"snapshot_consistency_group","service_tags":["ServiceTags"],"snapshots":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}]}],"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"snapshot_consistency_groups":[{"backup_policy_plan":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","name":"my-policy-plan","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"backup_policy_plan"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263","delete_snapshots_on_delete":false,"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263","id":"r134-fa329f6b-0e36-433f-a3bb-0df632e79263","lifecycle_state":"stable","name":"my-snapshot-consistency-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"snapshot_consistency_group","service_tags":["ServiceTags"],"snapshots":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}]}],"total_count":2,"limit":1}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"snapshot_consistency_groups":[{"backup_policy_plan":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","name":"my-policy-plan","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"backup_policy_plan"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263","delete_snapshots_on_delete":false,"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263","id":"r134-fa329f6b-0e36-433f-a3bb-0df632e79263","lifecycle_state":"stable","name":"my-snapshot-consistency-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"snapshot_consistency_group","service_tags":["ServiceTags"],"snapshots":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}]}],"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"snapshot_consistency_groups":[{"backup_policy_plan":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","name":"my-policy-plan","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"backup_policy_plan"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263","delete_snapshots_on_delete":false,"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263","id":"r134-fa329f6b-0e36-433f-a3bb-0df632e79263","lifecycle_state":"stable","name":"my-snapshot-consistency-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"snapshot_consistency_group","service_tags":["ServiceTags"],"snapshots":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}]}],"total_count":2,"limit":1}`) } else { res.WriteHeader(400) } @@ -52043,7 +52044,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeIdentityByID model volumeIdentityModel := new(vpcv1.VolumeIdentityByID) - volumeIdentityModel.ID = core.StringPtr("1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + volumeIdentityModel.ID = core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") // Construct an instance of the SnapshotPrototypeSnapshotConsistencyGroupContext model snapshotPrototypeSnapshotConsistencyGroupContextModel := new(vpcv1.SnapshotPrototypeSnapshotConsistencyGroupContext) @@ -52116,7 +52117,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["ServiceTags"], "snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}`) + fmt.Fprintf(res, "%s", `{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["ServiceTags"], "snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}`) })) }) It(`Invoke CreateSnapshotConsistencyGroup successfully with retries`, func() { @@ -52135,7 +52136,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeIdentityByID model volumeIdentityModel := new(vpcv1.VolumeIdentityByID) - volumeIdentityModel.ID = core.StringPtr("1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + volumeIdentityModel.ID = core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") // Construct an instance of the SnapshotPrototypeSnapshotConsistencyGroupContext model snapshotPrototypeSnapshotConsistencyGroupContextModel := new(vpcv1.SnapshotPrototypeSnapshotConsistencyGroupContext) @@ -52210,7 +52211,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["ServiceTags"], "snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}`) + fmt.Fprintf(res, "%s", `{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["ServiceTags"], "snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}`) })) }) It(`Invoke CreateSnapshotConsistencyGroup successfully`, func() { @@ -52234,7 +52235,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeIdentityByID model volumeIdentityModel := new(vpcv1.VolumeIdentityByID) - volumeIdentityModel.ID = core.StringPtr("1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + volumeIdentityModel.ID = core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") // Construct an instance of the SnapshotPrototypeSnapshotConsistencyGroupContext model snapshotPrototypeSnapshotConsistencyGroupContextModel := new(vpcv1.SnapshotPrototypeSnapshotConsistencyGroupContext) @@ -52276,7 +52277,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeIdentityByID model volumeIdentityModel := new(vpcv1.VolumeIdentityByID) - volumeIdentityModel.ID = core.StringPtr("1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + volumeIdentityModel.ID = core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") // Construct an instance of the SnapshotPrototypeSnapshotConsistencyGroupContext model snapshotPrototypeSnapshotConsistencyGroupContextModel := new(vpcv1.SnapshotPrototypeSnapshotConsistencyGroupContext) @@ -52339,7 +52340,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeIdentityByID model volumeIdentityModel := new(vpcv1.VolumeIdentityByID) - volumeIdentityModel.ID = core.StringPtr("1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + volumeIdentityModel.ID = core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") // Construct an instance of the SnapshotPrototypeSnapshotConsistencyGroupContext model snapshotPrototypeSnapshotConsistencyGroupContextModel := new(vpcv1.SnapshotPrototypeSnapshotConsistencyGroupContext) @@ -52441,7 +52442,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(202) - fmt.Fprintf(res, "%s", `{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["ServiceTags"], "snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}`) + fmt.Fprintf(res, "%s", `{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["ServiceTags"], "snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}`) })) }) It(`Invoke DeleteSnapshotConsistencyGroup successfully with retries`, func() { @@ -52498,7 +52499,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(202) - fmt.Fprintf(res, "%s", `{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["ServiceTags"], "snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}`) + fmt.Fprintf(res, "%s", `{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["ServiceTags"], "snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}`) })) }) It(`Invoke DeleteSnapshotConsistencyGroup successfully`, func() { @@ -52666,7 +52667,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["ServiceTags"], "snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}`) + fmt.Fprintf(res, "%s", `{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["ServiceTags"], "snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}`) })) }) It(`Invoke GetSnapshotConsistencyGroup successfully with retries`, func() { @@ -52723,7 +52724,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["ServiceTags"], "snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}`) + fmt.Fprintf(res, "%s", `{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["ServiceTags"], "snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}`) })) }) It(`Invoke GetSnapshotConsistencyGroup successfully`, func() { @@ -52920,7 +52921,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["ServiceTags"], "snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}`) + fmt.Fprintf(res, "%s", `{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["ServiceTags"], "snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}`) })) }) It(`Invoke UpdateSnapshotConsistencyGroup successfully with retries`, func() { @@ -53004,7 +53005,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["ServiceTags"], "snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}`) + fmt.Fprintf(res, "%s", `{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["ServiceTags"], "snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}`) })) }) It(`Invoke UpdateSnapshotConsistencyGroup successfully`, func() { @@ -53223,9 +53224,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["source_volume.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["source_volume.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5"})) + Expect(req.URL.Query()["source_volume.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5"})) Expect(req.URL.Query()["source_image.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["source_image.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"})) + Expect(req.URL.Query()["source_image.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"})) Expect(req.URL.Query()["sort"]).To(Equal([]string{"name"})) Expect(req.URL.Query()["backup_policy_plan.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["copies[].id"]).To(Equal([]string{"testString"})) @@ -53238,7 +53239,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["source_image.remote.region.name"]).To(Equal([]string{"us-south"})) Expect(req.URL.Query()["clones[].zone.name"]).To(Equal([]string{"us-south-1"})) Expect(req.URL.Query()["snapshot_consistency_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["snapshot_consistency_group.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263"})) + Expect(req.URL.Query()["snapshot_consistency_group.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263"})) res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprint(res, `} this is not valid json {`) @@ -53261,9 +53262,9 @@ var _ = Describe(`VpcV1`, func() { listSnapshotsOptionsModel.ResourceGroupID = core.StringPtr("testString") listSnapshotsOptionsModel.Name = core.StringPtr("testString") listSnapshotsOptionsModel.SourceVolumeID = core.StringPtr("testString") - listSnapshotsOptionsModel.SourceVolumeCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + listSnapshotsOptionsModel.SourceVolumeCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5") listSnapshotsOptionsModel.SourceImageID = core.StringPtr("testString") - listSnapshotsOptionsModel.SourceImageCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") + listSnapshotsOptionsModel.SourceImageCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") listSnapshotsOptionsModel.Sort = core.StringPtr("name") listSnapshotsOptionsModel.BackupPolicyPlanID = core.StringPtr("testString") listSnapshotsOptionsModel.CopiesID = core.StringPtr("testString") @@ -53276,7 +53277,7 @@ var _ = Describe(`VpcV1`, func() { listSnapshotsOptionsModel.SourceImageRemoteRegionName = core.StringPtr("us-south") listSnapshotsOptionsModel.ClonesZoneName = core.StringPtr("us-south-1") listSnapshotsOptionsModel.SnapshotConsistencyGroupID = core.StringPtr("testString") - listSnapshotsOptionsModel.SnapshotConsistencyGroupCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263") + listSnapshotsOptionsModel.SnapshotConsistencyGroupCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263") listSnapshotsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Expect response parsing to fail since we are receiving a text/plain response result, response, operationErr := vpcService.ListSnapshots(listSnapshotsOptionsModel) @@ -53316,9 +53317,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["source_volume.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["source_volume.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5"})) + Expect(req.URL.Query()["source_volume.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5"})) Expect(req.URL.Query()["source_image.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["source_image.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"})) + Expect(req.URL.Query()["source_image.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"})) Expect(req.URL.Query()["sort"]).To(Equal([]string{"name"})) Expect(req.URL.Query()["backup_policy_plan.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["copies[].id"]).To(Equal([]string{"testString"})) @@ -53331,14 +53332,14 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["source_image.remote.region.name"]).To(Equal([]string{"us-south"})) Expect(req.URL.Query()["clones[].zone.name"]).To(Equal([]string{"us-south-1"})) Expect(req.URL.Query()["snapshot_consistency_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["snapshot_consistency_group.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263"})) + Expect(req.URL.Query()["snapshot_consistency_group.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263"})) // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "snapshots": [{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["ServiceTags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["UserTags"]}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "snapshots": [{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["ServiceTags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["UserTags"]}], "total_count": 132}`) })) }) It(`Invoke ListSnapshots successfully with retries`, func() { @@ -53359,9 +53360,9 @@ var _ = Describe(`VpcV1`, func() { listSnapshotsOptionsModel.ResourceGroupID = core.StringPtr("testString") listSnapshotsOptionsModel.Name = core.StringPtr("testString") listSnapshotsOptionsModel.SourceVolumeID = core.StringPtr("testString") - listSnapshotsOptionsModel.SourceVolumeCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + listSnapshotsOptionsModel.SourceVolumeCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5") listSnapshotsOptionsModel.SourceImageID = core.StringPtr("testString") - listSnapshotsOptionsModel.SourceImageCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") + listSnapshotsOptionsModel.SourceImageCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") listSnapshotsOptionsModel.Sort = core.StringPtr("name") listSnapshotsOptionsModel.BackupPolicyPlanID = core.StringPtr("testString") listSnapshotsOptionsModel.CopiesID = core.StringPtr("testString") @@ -53374,7 +53375,7 @@ var _ = Describe(`VpcV1`, func() { listSnapshotsOptionsModel.SourceImageRemoteRegionName = core.StringPtr("us-south") listSnapshotsOptionsModel.ClonesZoneName = core.StringPtr("us-south-1") listSnapshotsOptionsModel.SnapshotConsistencyGroupID = core.StringPtr("testString") - listSnapshotsOptionsModel.SnapshotConsistencyGroupCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263") + listSnapshotsOptionsModel.SnapshotConsistencyGroupCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263") listSnapshotsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with a Context to test a timeout error @@ -53419,9 +53420,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["source_volume.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["source_volume.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5"})) + Expect(req.URL.Query()["source_volume.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5"})) Expect(req.URL.Query()["source_image.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["source_image.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"})) + Expect(req.URL.Query()["source_image.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"})) Expect(req.URL.Query()["sort"]).To(Equal([]string{"name"})) Expect(req.URL.Query()["backup_policy_plan.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["copies[].id"]).To(Equal([]string{"testString"})) @@ -53434,11 +53435,11 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["source_image.remote.region.name"]).To(Equal([]string{"us-south"})) Expect(req.URL.Query()["clones[].zone.name"]).To(Equal([]string{"us-south-1"})) Expect(req.URL.Query()["snapshot_consistency_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["snapshot_consistency_group.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263"})) + Expect(req.URL.Query()["snapshot_consistency_group.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263"})) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "snapshots": [{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["ServiceTags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["UserTags"]}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "snapshots": [{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["ServiceTags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["UserTags"]}], "total_count": 132}`) })) }) It(`Invoke ListSnapshots successfully`, func() { @@ -53464,9 +53465,9 @@ var _ = Describe(`VpcV1`, func() { listSnapshotsOptionsModel.ResourceGroupID = core.StringPtr("testString") listSnapshotsOptionsModel.Name = core.StringPtr("testString") listSnapshotsOptionsModel.SourceVolumeID = core.StringPtr("testString") - listSnapshotsOptionsModel.SourceVolumeCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + listSnapshotsOptionsModel.SourceVolumeCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5") listSnapshotsOptionsModel.SourceImageID = core.StringPtr("testString") - listSnapshotsOptionsModel.SourceImageCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") + listSnapshotsOptionsModel.SourceImageCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") listSnapshotsOptionsModel.Sort = core.StringPtr("name") listSnapshotsOptionsModel.BackupPolicyPlanID = core.StringPtr("testString") listSnapshotsOptionsModel.CopiesID = core.StringPtr("testString") @@ -53479,7 +53480,7 @@ var _ = Describe(`VpcV1`, func() { listSnapshotsOptionsModel.SourceImageRemoteRegionName = core.StringPtr("us-south") listSnapshotsOptionsModel.ClonesZoneName = core.StringPtr("us-south-1") listSnapshotsOptionsModel.SnapshotConsistencyGroupID = core.StringPtr("testString") - listSnapshotsOptionsModel.SnapshotConsistencyGroupCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263") + listSnapshotsOptionsModel.SnapshotConsistencyGroupCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263") listSnapshotsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -53506,9 +53507,9 @@ var _ = Describe(`VpcV1`, func() { listSnapshotsOptionsModel.ResourceGroupID = core.StringPtr("testString") listSnapshotsOptionsModel.Name = core.StringPtr("testString") listSnapshotsOptionsModel.SourceVolumeID = core.StringPtr("testString") - listSnapshotsOptionsModel.SourceVolumeCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + listSnapshotsOptionsModel.SourceVolumeCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5") listSnapshotsOptionsModel.SourceImageID = core.StringPtr("testString") - listSnapshotsOptionsModel.SourceImageCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") + listSnapshotsOptionsModel.SourceImageCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") listSnapshotsOptionsModel.Sort = core.StringPtr("name") listSnapshotsOptionsModel.BackupPolicyPlanID = core.StringPtr("testString") listSnapshotsOptionsModel.CopiesID = core.StringPtr("testString") @@ -53521,7 +53522,7 @@ var _ = Describe(`VpcV1`, func() { listSnapshotsOptionsModel.SourceImageRemoteRegionName = core.StringPtr("us-south") listSnapshotsOptionsModel.ClonesZoneName = core.StringPtr("us-south-1") listSnapshotsOptionsModel.SnapshotConsistencyGroupID = core.StringPtr("testString") - listSnapshotsOptionsModel.SnapshotConsistencyGroupCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263") + listSnapshotsOptionsModel.SnapshotConsistencyGroupCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263") listSnapshotsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -53562,9 +53563,9 @@ var _ = Describe(`VpcV1`, func() { listSnapshotsOptionsModel.ResourceGroupID = core.StringPtr("testString") listSnapshotsOptionsModel.Name = core.StringPtr("testString") listSnapshotsOptionsModel.SourceVolumeID = core.StringPtr("testString") - listSnapshotsOptionsModel.SourceVolumeCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + listSnapshotsOptionsModel.SourceVolumeCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5") listSnapshotsOptionsModel.SourceImageID = core.StringPtr("testString") - listSnapshotsOptionsModel.SourceImageCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") + listSnapshotsOptionsModel.SourceImageCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") listSnapshotsOptionsModel.Sort = core.StringPtr("name") listSnapshotsOptionsModel.BackupPolicyPlanID = core.StringPtr("testString") listSnapshotsOptionsModel.CopiesID = core.StringPtr("testString") @@ -53577,7 +53578,7 @@ var _ = Describe(`VpcV1`, func() { listSnapshotsOptionsModel.SourceImageRemoteRegionName = core.StringPtr("us-south") listSnapshotsOptionsModel.ClonesZoneName = core.StringPtr("us-south-1") listSnapshotsOptionsModel.SnapshotConsistencyGroupID = core.StringPtr("testString") - listSnapshotsOptionsModel.SnapshotConsistencyGroupCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263") + listSnapshotsOptionsModel.SnapshotConsistencyGroupCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263") listSnapshotsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation @@ -53636,9 +53637,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"snapshots":[{"backup_policy_plan":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","name":"my-policy-plan","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"backup_policy_plan"},"bootable":true,"captured_at":"2019-01-01T12:00:00.000Z","clones":[{"available":false,"created_at":"2019-01-01T12:00:00.000Z","zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"copies":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}],"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deletable":false,"encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","lifecycle_state":"stable","minimum_capacity":1,"name":"my-snapshot","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"snapshot","service_tags":["ServiceTags"],"size":1,"snapshot_consistency_group":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263","id":"r134-fa329f6b-0e36-433f-a3bb-0df632e79263","name":"my-snapshot-consistency-group","resource_type":"snapshot_consistency_group"},"source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"aa2432b1fa4d4ace891e9b80fc104e34","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"},"source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"volume"},"user_tags":["UserTags"]}],"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"snapshots":[{"backup_policy_plan":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","name":"my-policy-plan","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"backup_policy_plan"},"bootable":true,"captured_at":"2019-01-01T12:00:00.000Z","clones":[{"available":false,"created_at":"2019-01-01T12:00:00.000Z","zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"copies":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}],"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deletable":false,"encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","lifecycle_state":"stable","minimum_capacity":1,"name":"my-snapshot","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"snapshot","service_tags":["ServiceTags"],"size":1,"snapshot_consistency_group":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263","id":"r134-fa329f6b-0e36-433f-a3bb-0df632e79263","name":"my-snapshot-consistency-group","resource_type":"snapshot_consistency_group"},"source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"},"source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"volume"},"user_tags":["UserTags"]}],"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"snapshots":[{"backup_policy_plan":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","name":"my-policy-plan","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"backup_policy_plan"},"bootable":true,"captured_at":"2019-01-01T12:00:00.000Z","clones":[{"available":false,"created_at":"2019-01-01T12:00:00.000Z","zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"copies":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}],"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deletable":false,"encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","lifecycle_state":"stable","minimum_capacity":1,"name":"my-snapshot","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"snapshot","service_tags":["ServiceTags"],"size":1,"snapshot_consistency_group":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263","id":"r134-fa329f6b-0e36-433f-a3bb-0df632e79263","name":"my-snapshot-consistency-group","resource_type":"snapshot_consistency_group"},"source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"aa2432b1fa4d4ace891e9b80fc104e34","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"},"source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"volume"},"user_tags":["UserTags"]}],"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"snapshots":[{"backup_policy_plan":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","name":"my-policy-plan","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"backup_policy_plan"},"bootable":true,"captured_at":"2019-01-01T12:00:00.000Z","clones":[{"available":false,"created_at":"2019-01-01T12:00:00.000Z","zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"copies":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}],"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deletable":false,"encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","lifecycle_state":"stable","minimum_capacity":1,"name":"my-snapshot","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"snapshot","service_tags":["ServiceTags"],"size":1,"snapshot_consistency_group":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263","id":"r134-fa329f6b-0e36-433f-a3bb-0df632e79263","name":"my-snapshot-consistency-group","resource_type":"snapshot_consistency_group"},"source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"},"source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"volume"},"user_tags":["UserTags"]}],"total_count":2,"limit":1}`) } else { res.WriteHeader(400) } @@ -53659,9 +53660,9 @@ var _ = Describe(`VpcV1`, func() { ResourceGroupID: core.StringPtr("testString"), Name: core.StringPtr("testString"), SourceVolumeID: core.StringPtr("testString"), - SourceVolumeCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5"), + SourceVolumeCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5"), SourceImageID: core.StringPtr("testString"), - SourceImageCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"), + SourceImageCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"), Sort: core.StringPtr("name"), BackupPolicyPlanID: core.StringPtr("testString"), CopiesID: core.StringPtr("testString"), @@ -53674,7 +53675,7 @@ var _ = Describe(`VpcV1`, func() { SourceImageRemoteRegionName: core.StringPtr("us-south"), ClonesZoneName: core.StringPtr("us-south-1"), SnapshotConsistencyGroupID: core.StringPtr("testString"), - SnapshotConsistencyGroupCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263"), + SnapshotConsistencyGroupCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263"), } pager, err := vpcService.NewSnapshotsPager(listSnapshotsOptionsModel) @@ -53705,9 +53706,9 @@ var _ = Describe(`VpcV1`, func() { ResourceGroupID: core.StringPtr("testString"), Name: core.StringPtr("testString"), SourceVolumeID: core.StringPtr("testString"), - SourceVolumeCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5"), + SourceVolumeCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5"), SourceImageID: core.StringPtr("testString"), - SourceImageCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"), + SourceImageCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"), Sort: core.StringPtr("name"), BackupPolicyPlanID: core.StringPtr("testString"), CopiesID: core.StringPtr("testString"), @@ -53720,7 +53721,7 @@ var _ = Describe(`VpcV1`, func() { SourceImageRemoteRegionName: core.StringPtr("us-south"), ClonesZoneName: core.StringPtr("us-south-1"), SnapshotConsistencyGroupID: core.StringPtr("testString"), - SnapshotConsistencyGroupCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263"), + SnapshotConsistencyGroupCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263"), } pager, err := vpcService.NewSnapshotsPager(listSnapshotsOptionsModel) @@ -53775,7 +53776,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeIdentityByID model volumeIdentityModel := new(vpcv1.VolumeIdentityByID) - volumeIdentityModel.ID = core.StringPtr("1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + volumeIdentityModel.ID = core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") // Construct an instance of the SnapshotPrototypeSnapshotBySourceVolume model snapshotPrototypeModel := new(vpcv1.SnapshotPrototypeSnapshotBySourceVolume) @@ -53843,7 +53844,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["ServiceTags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["UserTags"]}`) + fmt.Fprintf(res, "%s", `{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["ServiceTags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["UserTags"]}`) })) }) It(`Invoke CreateSnapshot successfully with retries`, func() { @@ -53870,7 +53871,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeIdentityByID model volumeIdentityModel := new(vpcv1.VolumeIdentityByID) - volumeIdentityModel.ID = core.StringPtr("1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + volumeIdentityModel.ID = core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") // Construct an instance of the SnapshotPrototypeSnapshotBySourceVolume model snapshotPrototypeModel := new(vpcv1.SnapshotPrototypeSnapshotBySourceVolume) @@ -53940,7 +53941,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["ServiceTags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["UserTags"]}`) + fmt.Fprintf(res, "%s", `{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["ServiceTags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["UserTags"]}`) })) }) It(`Invoke CreateSnapshot successfully`, func() { @@ -53972,7 +53973,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeIdentityByID model volumeIdentityModel := new(vpcv1.VolumeIdentityByID) - volumeIdentityModel.ID = core.StringPtr("1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + volumeIdentityModel.ID = core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") // Construct an instance of the SnapshotPrototypeSnapshotBySourceVolume model snapshotPrototypeModel := new(vpcv1.SnapshotPrototypeSnapshotBySourceVolume) @@ -54017,7 +54018,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeIdentityByID model volumeIdentityModel := new(vpcv1.VolumeIdentityByID) - volumeIdentityModel.ID = core.StringPtr("1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + volumeIdentityModel.ID = core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") // Construct an instance of the SnapshotPrototypeSnapshotBySourceVolume model snapshotPrototypeModel := new(vpcv1.SnapshotPrototypeSnapshotBySourceVolume) @@ -54083,7 +54084,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeIdentityByID model volumeIdentityModel := new(vpcv1.VolumeIdentityByID) - volumeIdentityModel.ID = core.StringPtr("1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + volumeIdentityModel.ID = core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") // Construct an instance of the SnapshotPrototypeSnapshotBySourceVolume model snapshotPrototypeModel := new(vpcv1.SnapshotPrototypeSnapshotBySourceVolume) @@ -54257,7 +54258,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["ServiceTags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["UserTags"]}`) + fmt.Fprintf(res, "%s", `{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["ServiceTags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["UserTags"]}`) })) }) It(`Invoke GetSnapshot successfully with retries`, func() { @@ -54314,7 +54315,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["ServiceTags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["UserTags"]}`) + fmt.Fprintf(res, "%s", `{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["ServiceTags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["UserTags"]}`) })) }) It(`Invoke GetSnapshot successfully`, func() { @@ -54511,7 +54512,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["ServiceTags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["UserTags"]}`) + fmt.Fprintf(res, "%s", `{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["ServiceTags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["UserTags"]}`) })) }) It(`Invoke UpdateSnapshot successfully with retries`, func() { @@ -54595,7 +54596,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["ServiceTags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "aa2432b1fa4d4ace891e9b80fc104e34", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["UserTags"]}`) + fmt.Fprintf(res, "%s", `{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["ServiceTags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["UserTags"]}`) })) }) It(`Invoke UpdateSnapshot successfully`, func() { @@ -56132,7 +56133,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "shares": [{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["UserTags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "shares": [{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["UserTags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}`) })) }) It(`Invoke ListShares successfully with retries`, func() { @@ -56200,7 +56201,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "shares": [{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["UserTags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "shares": [{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["UserTags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}`) })) }) It(`Invoke ListShares successfully`, func() { @@ -56350,9 +56351,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"shares":[{"access_control_mode":"security_group","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","iops":100,"latest_job":{"status":"cancelled","status_reasons":[{"code":"cannot_reach_source_share","message":"The replication failover failed because the source share cannot be reached.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}],"type":"replication_failover"},"latest_sync":{"completed_at":"2019-01-01T12:00:00.000Z","data_transferred":0,"started_at":"2019-01-01T12:00:00.000Z"},"lifecycle_state":"stable","mount_targets":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","name":"my-share-mount-target","resource_type":"share_mount_target"}],"name":"my-share","profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops","name":"tier-3iops","resource_type":"share_profile"},"replica_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"replication_cron_spec":"0 */5 * * *","replication_role":"none","replication_status":"active","replication_status_reasons":[{"code":"cannot_reach_source_share","message":"The replication failover failed because the source share cannot be reached.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"share","size":200,"source_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"user_tags":["UserTags"],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"shares":[{"access_control_mode":"security_group","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","iops":100,"latest_job":{"status":"cancelled","status_reasons":[{"code":"cannot_reach_source_share","message":"The replication failover failed because the source share cannot be reached.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}],"type":"replication_failover"},"latest_sync":{"completed_at":"2019-01-01T12:00:00.000Z","data_transferred":0,"started_at":"2019-01-01T12:00:00.000Z"},"lifecycle_state":"stable","mount_targets":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","name":"my-share-mount-target","resource_type":"share_mount_target"}],"name":"my-share","profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops","name":"tier-3iops","resource_type":"share_profile"},"replica_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"replication_cron_spec":"0 */5 * * *","replication_role":"none","replication_status":"active","replication_status_reasons":[{"code":"cannot_reach_source_share","message":"The replication failover failed because the source share cannot be reached.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"share","size":200,"source_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"user_tags":["UserTags"],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"shares":[{"access_control_mode":"security_group","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","iops":100,"latest_job":{"status":"cancelled","status_reasons":[{"code":"cannot_reach_source_share","message":"The replication failover failed because the source share cannot be reached.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}],"type":"replication_failover"},"latest_sync":{"completed_at":"2019-01-01T12:00:00.000Z","data_transferred":0,"started_at":"2019-01-01T12:00:00.000Z"},"lifecycle_state":"stable","mount_targets":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","name":"my-share-mount-target","resource_type":"share_mount_target"}],"name":"my-share","profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops","name":"tier-3iops","resource_type":"share_profile"},"replica_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"replication_cron_spec":"0 */5 * * *","replication_role":"none","replication_status":"active","replication_status_reasons":[{"code":"cannot_reach_source_share","message":"The replication failover failed because the source share cannot be reached.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"share","size":200,"source_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"user_tags":["UserTags"],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"shares":[{"access_control_mode":"security_group","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","iops":100,"latest_job":{"status":"cancelled","status_reasons":[{"code":"cannot_reach_source_share","message":"The replication failover failed because the source share cannot be reached.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}],"type":"replication_failover"},"latest_sync":{"completed_at":"2019-01-01T12:00:00.000Z","data_transferred":0,"started_at":"2019-01-01T12:00:00.000Z"},"lifecycle_state":"stable","mount_targets":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","name":"my-share-mount-target","resource_type":"share_mount_target"}],"name":"my-share","profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops","name":"tier-3iops","resource_type":"share_profile"},"replica_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"replication_cron_spec":"0 */5 * * *","replication_role":"none","replication_status":"active","replication_status_reasons":[{"code":"cannot_reach_source_share","message":"The replication failover failed because the source share cannot be reached.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"share","size":200,"source_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"user_tags":["UserTags"],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}`) } else { res.WriteHeader(400) } @@ -56506,7 +56507,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the ShareInitialOwner model shareInitialOwnerModel := new(vpcv1.ShareInitialOwner) @@ -56586,7 +56587,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["UserTags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["UserTags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke CreateShare successfully with retries`, func() { @@ -56662,7 +56663,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the ShareInitialOwner model shareInitialOwnerModel := new(vpcv1.ShareInitialOwner) @@ -56744,7 +56745,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["UserTags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["UserTags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke CreateShare successfully`, func() { @@ -56825,7 +56826,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the ShareInitialOwner model shareInitialOwnerModel := new(vpcv1.ShareInitialOwner) @@ -56931,7 +56932,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the ShareInitialOwner model shareInitialOwnerModel := new(vpcv1.ShareInitialOwner) @@ -57058,7 +57059,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the ShareInitialOwner model shareInitialOwnerModel := new(vpcv1.ShareInitialOwner) @@ -57172,7 +57173,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(202) - fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["UserTags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["UserTags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke DeleteShare successfully with retries`, func() { @@ -57232,7 +57233,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(202) - fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["UserTags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["UserTags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke DeleteShare successfully`, func() { @@ -57403,7 +57404,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["UserTags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["UserTags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetShare successfully with retries`, func() { @@ -57460,7 +57461,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["UserTags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["UserTags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetShare successfully`, func() { @@ -57666,7 +57667,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["UserTags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["UserTags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke UpdateShare successfully with retries`, func() { @@ -57759,7 +57760,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["UserTags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["UserTags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke UpdateShare successfully`, func() { @@ -58083,7 +58084,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets?limit=20"}, "limit": 20, "mount_targets": [{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "lifecycle_state": "stable", "mount_path": "10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e", "name": "my-share-mount-target", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "share_mount_target", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "transit_encryption": "none", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets?limit=20"}, "limit": 20, "mount_targets": [{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "lifecycle_state": "stable", "mount_path": "10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e", "name": "my-share-mount-target", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "share_mount_target", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "transit_encryption": "none", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListShareMountTargets successfully with retries`, func() { @@ -58146,7 +58147,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets?limit=20"}, "limit": 20, "mount_targets": [{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "lifecycle_state": "stable", "mount_path": "10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e", "name": "my-share-mount-target", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "share_mount_target", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "transit_encryption": "none", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets?limit=20"}, "limit": 20, "mount_targets": [{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "lifecycle_state": "stable", "mount_path": "10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e", "name": "my-share-mount-target", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "share_mount_target", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "transit_encryption": "none", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListShareMountTargets successfully`, func() { @@ -58297,9 +58298,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"mount_targets":[{"access_control_mode":"security_group","created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","lifecycle_state":"stable","mount_path":"10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e","name":"my-share-mount-target","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"share_mount_target","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"transit_encryption":"none","virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","id":"0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}]}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"mount_targets":[{"access_control_mode":"security_group","created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","lifecycle_state":"stable","mount_path":"10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e","name":"my-share-mount-target","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"share_mount_target","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"transit_encryption":"none","virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","id":"0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}]}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"mount_targets":[{"access_control_mode":"security_group","created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","lifecycle_state":"stable","mount_path":"10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e","name":"my-share-mount-target","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"share_mount_target","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"transit_encryption":"none","virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","id":"0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}]}`) + fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"mount_targets":[{"access_control_mode":"security_group","created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","lifecycle_state":"stable","mount_path":"10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e","name":"my-share-mount-target","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"share_mount_target","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"transit_encryption":"none","virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","id":"0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}]}`) } else { res.WriteHeader(400) } @@ -58487,7 +58488,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "lifecycle_state": "stable", "mount_path": "10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e", "name": "my-share-mount-target", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "share_mount_target", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "transit_encryption": "none", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "lifecycle_state": "stable", "mount_path": "10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e", "name": "my-share-mount-target", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "share_mount_target", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "transit_encryption": "none", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke CreateShareMountTarget successfully with retries`, func() { @@ -58603,7 +58604,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "lifecycle_state": "stable", "mount_path": "10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e", "name": "my-share-mount-target", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "share_mount_target", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "transit_encryption": "none", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "lifecycle_state": "stable", "mount_path": "10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e", "name": "my-share-mount-target", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "share_mount_target", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "transit_encryption": "none", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke CreateShareMountTarget successfully`, func() { @@ -58901,7 +58902,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(202) - fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "lifecycle_state": "stable", "mount_path": "10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e", "name": "my-share-mount-target", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "share_mount_target", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "transit_encryption": "none", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "lifecycle_state": "stable", "mount_path": "10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e", "name": "my-share-mount-target", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "share_mount_target", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "transit_encryption": "none", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke DeleteShareMountTarget successfully with retries`, func() { @@ -58959,7 +58960,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(202) - fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "lifecycle_state": "stable", "mount_path": "10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e", "name": "my-share-mount-target", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "share_mount_target", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "transit_encryption": "none", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "lifecycle_state": "stable", "mount_path": "10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e", "name": "my-share-mount-target", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "share_mount_target", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "transit_encryption": "none", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke DeleteShareMountTarget successfully`, func() { @@ -59131,7 +59132,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "lifecycle_state": "stable", "mount_path": "10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e", "name": "my-share-mount-target", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "share_mount_target", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "transit_encryption": "none", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "lifecycle_state": "stable", "mount_path": "10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e", "name": "my-share-mount-target", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "share_mount_target", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "transit_encryption": "none", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke GetShareMountTarget successfully with retries`, func() { @@ -59189,7 +59190,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "lifecycle_state": "stable", "mount_path": "10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e", "name": "my-share-mount-target", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "share_mount_target", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "transit_encryption": "none", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "lifecycle_state": "stable", "mount_path": "10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e", "name": "my-share-mount-target", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "share_mount_target", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "transit_encryption": "none", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke GetShareMountTarget successfully`, func() { @@ -59384,7 +59385,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "lifecycle_state": "stable", "mount_path": "10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e", "name": "my-share-mount-target", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "share_mount_target", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "transit_encryption": "none", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "lifecycle_state": "stable", "mount_path": "10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e", "name": "my-share-mount-target", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "share_mount_target", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "transit_encryption": "none", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke UpdateShareMountTarget successfully with retries`, func() { @@ -59465,7 +59466,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "lifecycle_state": "stable", "mount_path": "10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e", "name": "my-share-mount-target", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "share_mount_target", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "transit_encryption": "none", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "lifecycle_state": "stable", "mount_path": "10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e", "name": "my-share-mount-target", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "share_mount_target", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "transit_encryption": "none", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke UpdateShareMountTarget successfully`, func() { @@ -59730,7 +59731,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}`) + fmt.Fprintf(res, "%s", `{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}`) })) }) It(`Invoke GetShareSource successfully with retries`, func() { @@ -59787,7 +59788,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}`) + fmt.Fprintf(res, "%s", `{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}`) })) }) It(`Invoke GetShareSource successfully`, func() { @@ -59969,7 +59970,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"backup_policies": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["MatchUserTags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/123456::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "fee82deba12e4c0fb69c3b09d1f12345", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"backup_policies": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["MatchUserTags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "fee82deba12e4c0fb69c3b09d1f12345", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListBackupPolicies successfully with retries`, func() { @@ -60035,7 +60036,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"backup_policies": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["MatchUserTags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/123456::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "fee82deba12e4c0fb69c3b09d1f12345", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"backup_policies": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["MatchUserTags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "fee82deba12e4c0fb69c3b09d1f12345", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListBackupPolicies successfully`, func() { @@ -60182,9 +60183,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"backup_policies":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6","health_reasons":[{"code":"missing_service_authorization_policies","message":"One or more accounts are missing service authorization policies","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6","id":"r134-076191ba-49c2-4763-94fd-c70de73ee2e6","last_job_completed_at":"2019-01-01T12:00:00.000Z","lifecycle_state":"stable","match_user_tags":["MatchUserTags"],"name":"my-backup-policy","plans":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","name":"my-policy-plan","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"backup_policy_plan"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"backup_policy","scope":{"crn":"crn:v1:bluemix:public:enterprise::a/123456::enterprise:ebc2b430240943458b9e91e1432cfcce","id":"fee82deba12e4c0fb69c3b09d1f12345","resource_type":"enterprise"},"included_content":["data_volumes"],"match_resource_type":"instance"}],"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"backup_policies":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6","health_reasons":[{"code":"missing_service_authorization_policies","message":"One or more accounts are missing service authorization policies","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6","id":"r134-076191ba-49c2-4763-94fd-c70de73ee2e6","last_job_completed_at":"2019-01-01T12:00:00.000Z","lifecycle_state":"stable","match_user_tags":["MatchUserTags"],"name":"my-backup-policy","plans":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","name":"my-policy-plan","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"backup_policy_plan"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"backup_policy","scope":{"crn":"crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce","id":"fee82deba12e4c0fb69c3b09d1f12345","resource_type":"enterprise"},"included_content":["data_volumes"],"match_resource_type":"instance"}],"total_count":2,"limit":1}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"backup_policies":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6","health_reasons":[{"code":"missing_service_authorization_policies","message":"One or more accounts are missing service authorization policies","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6","id":"r134-076191ba-49c2-4763-94fd-c70de73ee2e6","last_job_completed_at":"2019-01-01T12:00:00.000Z","lifecycle_state":"stable","match_user_tags":["MatchUserTags"],"name":"my-backup-policy","plans":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","name":"my-policy-plan","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"backup_policy_plan"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"backup_policy","scope":{"crn":"crn:v1:bluemix:public:enterprise::a/123456::enterprise:ebc2b430240943458b9e91e1432cfcce","id":"fee82deba12e4c0fb69c3b09d1f12345","resource_type":"enterprise"},"included_content":["data_volumes"],"match_resource_type":"instance"}],"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"backup_policies":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6","health_reasons":[{"code":"missing_service_authorization_policies","message":"One or more accounts are missing service authorization policies","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6","id":"r134-076191ba-49c2-4763-94fd-c70de73ee2e6","last_job_completed_at":"2019-01-01T12:00:00.000Z","lifecycle_state":"stable","match_user_tags":["MatchUserTags"],"name":"my-backup-policy","plans":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","name":"my-policy-plan","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"backup_policy_plan"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"backup_policy","scope":{"crn":"crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce","id":"fee82deba12e4c0fb69c3b09d1f12345","resource_type":"enterprise"},"included_content":["data_volumes"],"match_resource_type":"instance"}],"total_count":2,"limit":1}`) } else { res.WriteHeader(400) } @@ -60289,7 +60290,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the RegionIdentityByName model regionIdentityModel := new(vpcv1.RegionIdentityByName) @@ -60318,7 +60319,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN model backupPolicyScopePrototypeModel := new(vpcv1.BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN) - backupPolicyScopePrototypeModel.CRN = core.StringPtr("crn:v1:bluemix:public:enterprise::a/123456::enterprise:ebc2b430240943458b9e91e1432cfcce") + backupPolicyScopePrototypeModel.CRN = core.StringPtr("crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce") // Construct an instance of the BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype model backupPolicyPrototypeModel := new(vpcv1.BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype) @@ -60387,7 +60388,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["MatchUserTags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/123456::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "fee82deba12e4c0fb69c3b09d1f12345", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["MatchUserTags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "fee82deba12e4c0fb69c3b09d1f12345", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}`) })) }) It(`Invoke CreateBackupPolicy successfully with retries`, func() { @@ -60416,7 +60417,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the RegionIdentityByName model regionIdentityModel := new(vpcv1.RegionIdentityByName) @@ -60445,7 +60446,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN model backupPolicyScopePrototypeModel := new(vpcv1.BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN) - backupPolicyScopePrototypeModel.CRN = core.StringPtr("crn:v1:bluemix:public:enterprise::a/123456::enterprise:ebc2b430240943458b9e91e1432cfcce") + backupPolicyScopePrototypeModel.CRN = core.StringPtr("crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce") // Construct an instance of the BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype model backupPolicyPrototypeModel := new(vpcv1.BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype) @@ -60516,7 +60517,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["MatchUserTags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/123456::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "fee82deba12e4c0fb69c3b09d1f12345", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["MatchUserTags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "fee82deba12e4c0fb69c3b09d1f12345", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}`) })) }) It(`Invoke CreateBackupPolicy successfully`, func() { @@ -60550,7 +60551,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the RegionIdentityByName model regionIdentityModel := new(vpcv1.RegionIdentityByName) @@ -60579,7 +60580,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN model backupPolicyScopePrototypeModel := new(vpcv1.BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN) - backupPolicyScopePrototypeModel.CRN = core.StringPtr("crn:v1:bluemix:public:enterprise::a/123456::enterprise:ebc2b430240943458b9e91e1432cfcce") + backupPolicyScopePrototypeModel.CRN = core.StringPtr("crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce") // Construct an instance of the BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype model backupPolicyPrototypeModel := new(vpcv1.BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype) @@ -60627,7 +60628,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the RegionIdentityByName model regionIdentityModel := new(vpcv1.RegionIdentityByName) @@ -60656,7 +60657,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN model backupPolicyScopePrototypeModel := new(vpcv1.BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN) - backupPolicyScopePrototypeModel.CRN = core.StringPtr("crn:v1:bluemix:public:enterprise::a/123456::enterprise:ebc2b430240943458b9e91e1432cfcce") + backupPolicyScopePrototypeModel.CRN = core.StringPtr("crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce") // Construct an instance of the BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype model backupPolicyPrototypeModel := new(vpcv1.BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype) @@ -60725,7 +60726,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the RegionIdentityByName model regionIdentityModel := new(vpcv1.RegionIdentityByName) @@ -60754,7 +60755,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN model backupPolicyScopePrototypeModel := new(vpcv1.BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN) - backupPolicyScopePrototypeModel.CRN = core.StringPtr("crn:v1:bluemix:public:enterprise::a/123456::enterprise:ebc2b430240943458b9e91e1432cfcce") + backupPolicyScopePrototypeModel.CRN = core.StringPtr("crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce") // Construct an instance of the BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype model backupPolicyPrototypeModel := new(vpcv1.BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype) @@ -60803,7 +60804,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["sort"]).To(Equal([]string{"name"})) Expect(req.URL.Query()["source.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["target_snapshots[].id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["target_snapshots[].crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263"})) + Expect(req.URL.Query()["target_snapshots[].crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263"})) res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprint(res, `} this is not valid json {`) @@ -60828,7 +60829,7 @@ var _ = Describe(`VpcV1`, func() { listBackupPolicyJobsOptionsModel.Sort = core.StringPtr("name") listBackupPolicyJobsOptionsModel.SourceID = core.StringPtr("testString") listBackupPolicyJobsOptionsModel.TargetSnapshotsID = core.StringPtr("testString") - listBackupPolicyJobsOptionsModel.TargetSnapshotsCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263") + listBackupPolicyJobsOptionsModel.TargetSnapshotsCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263") listBackupPolicyJobsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Expect response parsing to fail since we are receiving a text/plain response result, response, operationErr := vpcService.ListBackupPolicyJobs(listBackupPolicyJobsOptionsModel) @@ -60869,14 +60870,14 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["sort"]).To(Equal([]string{"name"})) Expect(req.URL.Query()["source.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["target_snapshots[].id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["target_snapshots[].crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263"})) + Expect(req.URL.Query()["target_snapshots[].crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263"})) // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/7241e2a8-601f-11ea-8503-000c29475bed/jobs?limit=20"}, "jobs": [{"auto_delete": true, "auto_delete_after": 90, "backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/0fe9e5d8-0a4d-4818-96ec-e99708644a58/jobs/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "job_type": "creation", "resource_type": "backup_policy_job", "source": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "failed", "status_reasons": [{"code": "source_volume_busy", "message": "Message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshooting-backup-for-vpc"}], "target_snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/7241e2a8-601f-11ea-8503-000c29475bed/jobss?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/7241e2a8-601f-11ea-8503-000c29475bed/jobs?limit=20"}, "jobs": [{"auto_delete": true, "auto_delete_after": 90, "backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/0fe9e5d8-0a4d-4818-96ec-e99708644a58/jobs/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "job_type": "creation", "resource_type": "backup_policy_job", "source": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "failed", "status_reasons": [{"code": "source_volume_busy", "message": "Message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot"}], "target_snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/7241e2a8-601f-11ea-8503-000c29475bed/jobss?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListBackupPolicyJobs successfully with retries`, func() { @@ -60899,7 +60900,7 @@ var _ = Describe(`VpcV1`, func() { listBackupPolicyJobsOptionsModel.Sort = core.StringPtr("name") listBackupPolicyJobsOptionsModel.SourceID = core.StringPtr("testString") listBackupPolicyJobsOptionsModel.TargetSnapshotsID = core.StringPtr("testString") - listBackupPolicyJobsOptionsModel.TargetSnapshotsCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263") + listBackupPolicyJobsOptionsModel.TargetSnapshotsCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263") listBackupPolicyJobsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with a Context to test a timeout error @@ -60945,11 +60946,11 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["sort"]).To(Equal([]string{"name"})) Expect(req.URL.Query()["source.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["target_snapshots[].id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["target_snapshots[].crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263"})) + Expect(req.URL.Query()["target_snapshots[].crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263"})) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/7241e2a8-601f-11ea-8503-000c29475bed/jobs?limit=20"}, "jobs": [{"auto_delete": true, "auto_delete_after": 90, "backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/0fe9e5d8-0a4d-4818-96ec-e99708644a58/jobs/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "job_type": "creation", "resource_type": "backup_policy_job", "source": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "failed", "status_reasons": [{"code": "source_volume_busy", "message": "Message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshooting-backup-for-vpc"}], "target_snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/7241e2a8-601f-11ea-8503-000c29475bed/jobss?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/7241e2a8-601f-11ea-8503-000c29475bed/jobs?limit=20"}, "jobs": [{"auto_delete": true, "auto_delete_after": 90, "backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/0fe9e5d8-0a4d-4818-96ec-e99708644a58/jobs/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "job_type": "creation", "resource_type": "backup_policy_job", "source": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "failed", "status_reasons": [{"code": "source_volume_busy", "message": "Message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot"}], "target_snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/7241e2a8-601f-11ea-8503-000c29475bed/jobss?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListBackupPolicyJobs successfully`, func() { @@ -60977,7 +60978,7 @@ var _ = Describe(`VpcV1`, func() { listBackupPolicyJobsOptionsModel.Sort = core.StringPtr("name") listBackupPolicyJobsOptionsModel.SourceID = core.StringPtr("testString") listBackupPolicyJobsOptionsModel.TargetSnapshotsID = core.StringPtr("testString") - listBackupPolicyJobsOptionsModel.TargetSnapshotsCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263") + listBackupPolicyJobsOptionsModel.TargetSnapshotsCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263") listBackupPolicyJobsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -61006,7 +61007,7 @@ var _ = Describe(`VpcV1`, func() { listBackupPolicyJobsOptionsModel.Sort = core.StringPtr("name") listBackupPolicyJobsOptionsModel.SourceID = core.StringPtr("testString") listBackupPolicyJobsOptionsModel.TargetSnapshotsID = core.StringPtr("testString") - listBackupPolicyJobsOptionsModel.TargetSnapshotsCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263") + listBackupPolicyJobsOptionsModel.TargetSnapshotsCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263") listBackupPolicyJobsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -61056,7 +61057,7 @@ var _ = Describe(`VpcV1`, func() { listBackupPolicyJobsOptionsModel.Sort = core.StringPtr("name") listBackupPolicyJobsOptionsModel.SourceID = core.StringPtr("testString") listBackupPolicyJobsOptionsModel.TargetSnapshotsID = core.StringPtr("testString") - listBackupPolicyJobsOptionsModel.TargetSnapshotsCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263") + listBackupPolicyJobsOptionsModel.TargetSnapshotsCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263") listBackupPolicyJobsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation @@ -61115,9 +61116,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"jobs":[{"auto_delete":true,"auto_delete_after":90,"backup_policy_plan":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","name":"my-policy-plan","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"backup_policy_plan"},"completed_at":"2019-01-01T12:00:00.000Z","created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/0fe9e5d8-0a4d-4818-96ec-e99708644a58/jobs/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","job_type":"creation","resource_type":"backup_policy_job","source":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"volume"},"status":"failed","status_reasons":[{"code":"source_volume_busy","message":"Message","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshooting-backup-for-vpc"}],"target_snapshots":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}]}],"limit":1}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"jobs":[{"auto_delete":true,"auto_delete_after":90,"backup_policy_plan":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","name":"my-policy-plan","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"backup_policy_plan"},"completed_at":"2019-01-01T12:00:00.000Z","created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/0fe9e5d8-0a4d-4818-96ec-e99708644a58/jobs/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","job_type":"creation","resource_type":"backup_policy_job","source":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"volume"},"status":"failed","status_reasons":[{"code":"source_volume_busy","message":"Message","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot"}],"target_snapshots":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}]}],"limit":1}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"total_count":2,"jobs":[{"auto_delete":true,"auto_delete_after":90,"backup_policy_plan":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","name":"my-policy-plan","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"backup_policy_plan"},"completed_at":"2019-01-01T12:00:00.000Z","created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/0fe9e5d8-0a4d-4818-96ec-e99708644a58/jobs/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","job_type":"creation","resource_type":"backup_policy_job","source":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"volume"},"status":"failed","status_reasons":[{"code":"source_volume_busy","message":"Message","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshooting-backup-for-vpc"}],"target_snapshots":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}]}],"limit":1}`) + fmt.Fprintf(res, "%s", `{"total_count":2,"jobs":[{"auto_delete":true,"auto_delete_after":90,"backup_policy_plan":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","name":"my-policy-plan","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"backup_policy_plan"},"completed_at":"2019-01-01T12:00:00.000Z","created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/0fe9e5d8-0a4d-4818-96ec-e99708644a58/jobs/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","job_type":"creation","resource_type":"backup_policy_job","source":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"volume"},"status":"failed","status_reasons":[{"code":"source_volume_busy","message":"Message","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot"}],"target_snapshots":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}]}],"limit":1}`) } else { res.WriteHeader(400) } @@ -61140,7 +61141,7 @@ var _ = Describe(`VpcV1`, func() { Sort: core.StringPtr("name"), SourceID: core.StringPtr("testString"), TargetSnapshotsID: core.StringPtr("testString"), - TargetSnapshotsCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263"), + TargetSnapshotsCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263"), } pager, err := vpcService.NewBackupPolicyJobsPager(listBackupPolicyJobsOptionsModel) @@ -61173,7 +61174,7 @@ var _ = Describe(`VpcV1`, func() { Sort: core.StringPtr("name"), SourceID: core.StringPtr("testString"), TargetSnapshotsID: core.StringPtr("testString"), - TargetSnapshotsCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263"), + TargetSnapshotsCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263"), } pager, err := vpcService.NewBackupPolicyJobsPager(listBackupPolicyJobsOptionsModel) @@ -61257,7 +61258,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"auto_delete": true, "auto_delete_after": 90, "backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/0fe9e5d8-0a4d-4818-96ec-e99708644a58/jobs/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "job_type": "creation", "resource_type": "backup_policy_job", "source": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "failed", "status_reasons": [{"code": "source_volume_busy", "message": "Message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshooting-backup-for-vpc"}], "target_snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}`) + fmt.Fprintf(res, "%s", `{"auto_delete": true, "auto_delete_after": 90, "backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/0fe9e5d8-0a4d-4818-96ec-e99708644a58/jobs/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "job_type": "creation", "resource_type": "backup_policy_job", "source": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "failed", "status_reasons": [{"code": "source_volume_busy", "message": "Message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot"}], "target_snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}`) })) }) It(`Invoke GetBackupPolicyJob successfully with retries`, func() { @@ -61315,7 +61316,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"auto_delete": true, "auto_delete_after": 90, "backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/0fe9e5d8-0a4d-4818-96ec-e99708644a58/jobs/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "job_type": "creation", "resource_type": "backup_policy_job", "source": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "failed", "status_reasons": [{"code": "source_volume_busy", "message": "Message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshooting-backup-for-vpc"}], "target_snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}`) + fmt.Fprintf(res, "%s", `{"auto_delete": true, "auto_delete_after": 90, "backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/0fe9e5d8-0a4d-4818-96ec-e99708644a58/jobs/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "job_type": "creation", "resource_type": "backup_policy_job", "source": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "failed", "status_reasons": [{"code": "source_volume_busy", "message": "Message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot"}], "target_snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}`) })) }) It(`Invoke GetBackupPolicyJob successfully`, func() { @@ -61489,7 +61490,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "plans": [{"active": true, "attach_user_tags": ["AttachUserTags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "plans": [{"active": true, "attach_user_tags": ["AttachUserTags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}], "total_count": 132}`) })) }) It(`Invoke ListBackupPolicyPlans successfully with retries`, func() { @@ -61548,7 +61549,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "plans": [{"active": true, "attach_user_tags": ["AttachUserTags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "plans": [{"active": true, "attach_user_tags": ["AttachUserTags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}], "total_count": 132}`) })) }) It(`Invoke ListBackupPolicyPlans successfully`, func() { @@ -61693,7 +61694,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the RegionIdentityByName model regionIdentityModel := new(vpcv1.RegionIdentityByName) @@ -61771,7 +61772,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"active": true, "attach_user_tags": ["AttachUserTags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}`) + fmt.Fprintf(res, "%s", `{"active": true, "attach_user_tags": ["AttachUserTags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}`) })) }) It(`Invoke CreateBackupPolicyPlan successfully with retries`, func() { @@ -61800,7 +61801,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the RegionIdentityByName model regionIdentityModel := new(vpcv1.RegionIdentityByName) @@ -61880,7 +61881,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"active": true, "attach_user_tags": ["AttachUserTags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}`) + fmt.Fprintf(res, "%s", `{"active": true, "attach_user_tags": ["AttachUserTags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}`) })) }) It(`Invoke CreateBackupPolicyPlan successfully`, func() { @@ -61914,7 +61915,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the RegionIdentityByName model regionIdentityModel := new(vpcv1.RegionIdentityByName) @@ -61971,7 +61972,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the RegionIdentityByName model regionIdentityModel := new(vpcv1.RegionIdentityByName) @@ -62049,7 +62050,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the RegionIdentityByName model regionIdentityModel := new(vpcv1.RegionIdentityByName) @@ -62162,7 +62163,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(202) - fmt.Fprintf(res, "%s", `{"active": true, "attach_user_tags": ["AttachUserTags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}`) + fmt.Fprintf(res, "%s", `{"active": true, "attach_user_tags": ["AttachUserTags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}`) })) }) It(`Invoke DeleteBackupPolicyPlan successfully with retries`, func() { @@ -62223,7 +62224,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(202) - fmt.Fprintf(res, "%s", `{"active": true, "attach_user_tags": ["AttachUserTags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}`) + fmt.Fprintf(res, "%s", `{"active": true, "attach_user_tags": ["AttachUserTags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}`) })) }) It(`Invoke DeleteBackupPolicyPlan successfully`, func() { @@ -62398,7 +62399,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"active": true, "attach_user_tags": ["AttachUserTags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}`) + fmt.Fprintf(res, "%s", `{"active": true, "attach_user_tags": ["AttachUserTags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}`) })) }) It(`Invoke GetBackupPolicyPlan successfully with retries`, func() { @@ -62456,7 +62457,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"active": true, "attach_user_tags": ["AttachUserTags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}`) + fmt.Fprintf(res, "%s", `{"active": true, "attach_user_tags": ["AttachUserTags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}`) })) }) It(`Invoke GetBackupPolicyPlan successfully`, func() { @@ -62603,7 +62604,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the RegionIdentityByName model regionIdentityModel := new(vpcv1.RegionIdentityByName) @@ -62691,7 +62692,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"active": true, "attach_user_tags": ["AttachUserTags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}`) + fmt.Fprintf(res, "%s", `{"active": true, "attach_user_tags": ["AttachUserTags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}`) })) }) It(`Invoke UpdateBackupPolicyPlan successfully with retries`, func() { @@ -62720,7 +62721,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the RegionIdentityByName model regionIdentityModel := new(vpcv1.RegionIdentityByName) @@ -62810,7 +62811,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"active": true, "attach_user_tags": ["AttachUserTags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}`) + fmt.Fprintf(res, "%s", `{"active": true, "attach_user_tags": ["AttachUserTags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}`) })) }) It(`Invoke UpdateBackupPolicyPlan successfully`, func() { @@ -62844,7 +62845,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the RegionIdentityByName model regionIdentityModel := new(vpcv1.RegionIdentityByName) @@ -62909,7 +62910,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the RegionIdentityByName model regionIdentityModel := new(vpcv1.RegionIdentityByName) @@ -62995,7 +62996,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") // Construct an instance of the RegionIdentityByName model regionIdentityModel := new(vpcv1.RegionIdentityByName) @@ -63115,7 +63116,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(202) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["MatchUserTags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/123456::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "fee82deba12e4c0fb69c3b09d1f12345", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["MatchUserTags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "fee82deba12e4c0fb69c3b09d1f12345", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}`) })) }) It(`Invoke DeleteBackupPolicy successfully with retries`, func() { @@ -63175,7 +63176,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(202) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["MatchUserTags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/123456::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "fee82deba12e4c0fb69c3b09d1f12345", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["MatchUserTags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "fee82deba12e4c0fb69c3b09d1f12345", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}`) })) }) It(`Invoke DeleteBackupPolicy successfully`, func() { @@ -63346,7 +63347,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["MatchUserTags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/123456::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "fee82deba12e4c0fb69c3b09d1f12345", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["MatchUserTags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "fee82deba12e4c0fb69c3b09d1f12345", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}`) })) }) It(`Invoke GetBackupPolicy successfully with retries`, func() { @@ -63403,7 +63404,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["MatchUserTags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/123456::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "fee82deba12e4c0fb69c3b09d1f12345", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["MatchUserTags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "fee82deba12e4c0fb69c3b09d1f12345", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}`) })) }) It(`Invoke GetBackupPolicy successfully`, func() { @@ -63601,7 +63602,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["MatchUserTags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/123456::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "fee82deba12e4c0fb69c3b09d1f12345", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["MatchUserTags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "fee82deba12e4c0fb69c3b09d1f12345", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}`) })) }) It(`Invoke UpdateBackupPolicy successfully with retries`, func() { @@ -63686,7 +63687,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["MatchUserTags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/123456::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "fee82deba12e4c0fb69c3b09d1f12345", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["MatchUserTags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "fee82deba12e4c0fb69c3b09d1f12345", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}`) })) }) It(`Invoke UpdateBackupPolicy successfully`, func() { @@ -64785,7 +64786,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20"}, "total_count": 132, "virtual_network_interfaces": [{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20"}, "total_count": 132, "virtual_network_interfaces": [{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}`) })) }) It(`Invoke ListVirtualNetworkInterfaces successfully with retries`, func() { @@ -64847,7 +64848,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20"}, "total_count": 132, "virtual_network_interfaces": [{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20"}, "total_count": 132, "virtual_network_interfaces": [{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}`) })) }) It(`Invoke ListVirtualNetworkInterfaces successfully`, func() { @@ -64988,9 +64989,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"virtual_network_interfaces":[{"allow_ip_spoofing":true,"auto_delete":false,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","enable_infrastructure_nat":true,"href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","id":"0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"lifecycle_state":"stable","mac_address":"02:00:4D:45:45:4D","name":"my-virtual-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"virtual_network_interface","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","name":"my-share-mount-target","resource_type":"share_mount_target"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"virtual_network_interfaces":[{"allow_ip_spoofing":true,"auto_delete":false,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","enable_infrastructure_nat":true,"href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","id":"0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"lifecycle_state":"stable","mac_address":"02:00:4D:45:45:4D","name":"my-virtual-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"virtual_network_interface","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","name":"my-share-mount-target","resource_type":"share_mount_target"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"virtual_network_interfaces":[{"allow_ip_spoofing":true,"auto_delete":false,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","enable_infrastructure_nat":true,"href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","id":"0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"lifecycle_state":"stable","mac_address":"02:00:4D:45:45:4D","name":"my-virtual-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"virtual_network_interface","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","name":"my-share-mount-target","resource_type":"share_mount_target"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"virtual_network_interfaces":[{"allow_ip_spoofing":true,"auto_delete":false,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","enable_infrastructure_nat":true,"href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","id":"0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"lifecycle_state":"stable","mac_address":"02:00:4D:45:45:4D","name":"my-virtual-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"virtual_network_interface","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","name":"my-share-mount-target","resource_type":"share_mount_target"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}`) } else { res.WriteHeader(400) } @@ -65077,11 +65078,11 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByID model virtualNetworkInterfaceIPPrototypeModel := new(vpcv1.VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByID) - virtualNetworkInterfaceIPPrototypeModel.ID = core.StringPtr("6d353a0f-aeb1-4ae1-832e-1110d10981bb") + virtualNetworkInterfaceIPPrototypeModel.ID = core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") // Construct an instance of the VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID model virtualNetworkInterfacePrimaryIPPrototypeModel := new(vpcv1.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID) - virtualNetworkInterfacePrimaryIPPrototypeModel.ID = core.StringPtr("6d353a0f-aeb1-4ae1-832e-1110d10981bb") + virtualNetworkInterfacePrimaryIPPrototypeModel.ID = core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) @@ -65089,7 +65090,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SecurityGroupIdentityByID model securityGroupIdentityModel := new(vpcv1.SecurityGroupIdentityByID) - securityGroupIdentityModel.ID = core.StringPtr("be5df5ca-12a0-494b-907e-aa6ec2bfa271") + securityGroupIdentityModel.ID = core.StringPtr("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) @@ -65161,7 +65162,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke CreateVirtualNetworkInterface successfully with retries`, func() { @@ -65176,11 +65177,11 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByID model virtualNetworkInterfaceIPPrototypeModel := new(vpcv1.VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByID) - virtualNetworkInterfaceIPPrototypeModel.ID = core.StringPtr("6d353a0f-aeb1-4ae1-832e-1110d10981bb") + virtualNetworkInterfaceIPPrototypeModel.ID = core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") // Construct an instance of the VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID model virtualNetworkInterfacePrimaryIPPrototypeModel := new(vpcv1.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID) - virtualNetworkInterfacePrimaryIPPrototypeModel.ID = core.StringPtr("6d353a0f-aeb1-4ae1-832e-1110d10981bb") + virtualNetworkInterfacePrimaryIPPrototypeModel.ID = core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) @@ -65188,7 +65189,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SecurityGroupIdentityByID model securityGroupIdentityModel := new(vpcv1.SecurityGroupIdentityByID) - securityGroupIdentityModel.ID = core.StringPtr("be5df5ca-12a0-494b-907e-aa6ec2bfa271") + securityGroupIdentityModel.ID = core.StringPtr("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) @@ -65262,7 +65263,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke CreateVirtualNetworkInterface successfully`, func() { @@ -65282,11 +65283,11 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByID model virtualNetworkInterfaceIPPrototypeModel := new(vpcv1.VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByID) - virtualNetworkInterfaceIPPrototypeModel.ID = core.StringPtr("6d353a0f-aeb1-4ae1-832e-1110d10981bb") + virtualNetworkInterfaceIPPrototypeModel.ID = core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") // Construct an instance of the VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID model virtualNetworkInterfacePrimaryIPPrototypeModel := new(vpcv1.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID) - virtualNetworkInterfacePrimaryIPPrototypeModel.ID = core.StringPtr("6d353a0f-aeb1-4ae1-832e-1110d10981bb") + virtualNetworkInterfacePrimaryIPPrototypeModel.ID = core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) @@ -65294,7 +65295,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SecurityGroupIdentityByID model securityGroupIdentityModel := new(vpcv1.SecurityGroupIdentityByID) - securityGroupIdentityModel.ID = core.StringPtr("be5df5ca-12a0-494b-907e-aa6ec2bfa271") + securityGroupIdentityModel.ID = core.StringPtr("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) @@ -65331,11 +65332,11 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByID model virtualNetworkInterfaceIPPrototypeModel := new(vpcv1.VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByID) - virtualNetworkInterfaceIPPrototypeModel.ID = core.StringPtr("6d353a0f-aeb1-4ae1-832e-1110d10981bb") + virtualNetworkInterfaceIPPrototypeModel.ID = core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") // Construct an instance of the VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID model virtualNetworkInterfacePrimaryIPPrototypeModel := new(vpcv1.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID) - virtualNetworkInterfacePrimaryIPPrototypeModel.ID = core.StringPtr("6d353a0f-aeb1-4ae1-832e-1110d10981bb") + virtualNetworkInterfacePrimaryIPPrototypeModel.ID = core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) @@ -65343,7 +65344,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SecurityGroupIdentityByID model securityGroupIdentityModel := new(vpcv1.SecurityGroupIdentityByID) - securityGroupIdentityModel.ID = core.StringPtr("be5df5ca-12a0-494b-907e-aa6ec2bfa271") + securityGroupIdentityModel.ID = core.StringPtr("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) @@ -65394,11 +65395,11 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByID model virtualNetworkInterfaceIPPrototypeModel := new(vpcv1.VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByID) - virtualNetworkInterfaceIPPrototypeModel.ID = core.StringPtr("6d353a0f-aeb1-4ae1-832e-1110d10981bb") + virtualNetworkInterfaceIPPrototypeModel.ID = core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") // Construct an instance of the VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID model virtualNetworkInterfacePrimaryIPPrototypeModel := new(vpcv1.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID) - virtualNetworkInterfacePrimaryIPPrototypeModel.ID = core.StringPtr("6d353a0f-aeb1-4ae1-832e-1110d10981bb") + virtualNetworkInterfacePrimaryIPPrototypeModel.ID = core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) @@ -65406,7 +65407,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SecurityGroupIdentityByID model securityGroupIdentityModel := new(vpcv1.SecurityGroupIdentityByID) - securityGroupIdentityModel.ID = core.StringPtr("be5df5ca-12a0-494b-907e-aa6ec2bfa271") + securityGroupIdentityModel.ID = core.StringPtr("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) @@ -65580,7 +65581,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetVirtualNetworkInterface successfully with retries`, func() { @@ -65637,7 +65638,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetVirtualNetworkInterface successfully`, func() { @@ -65831,7 +65832,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke UpdateVirtualNetworkInterface successfully with retries`, func() { @@ -65914,7 +65915,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke UpdateVirtualNetworkInterface successfully`, func() { @@ -66121,7 +66122,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9/floating_ips?limit=20"}, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9/floating_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9/floating_ips?limit=20"}, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9/floating_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListNetworkInterfaceFloatingIps successfully with retries`, func() { @@ -66184,7 +66185,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9/floating_ips?limit=20"}, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9/floating_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9/floating_ips?limit=20"}, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9/floating_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListNetworkInterfaceFloatingIps successfully`, func() { @@ -66335,9 +66336,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"floating_ips":[{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip"}]}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"floating_ips":[{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip"}]}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"floating_ips":[{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip"}]}`) + fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"floating_ips":[{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip"}]}`) } else { res.WriteHeader(400) } @@ -66542,7 +66543,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}`) + fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}`) })) }) It(`Invoke GetNetworkInterfaceFloatingIP successfully with retries`, func() { @@ -66600,7 +66601,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}`) + fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}`) })) }) It(`Invoke GetNetworkInterfaceFloatingIP successfully`, func() { @@ -66772,7 +66773,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}`) + fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}`) })) }) It(`Invoke AddNetworkInterfaceFloatingIP successfully with retries`, func() { @@ -66830,7 +66831,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}`) + fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}`) })) }) It(`Invoke AddNetworkInterfaceFloatingIP successfully`, func() { @@ -67010,7 +67011,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20"}, "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20"}, "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListVirtualNetworkInterfaceIps successfully with retries`, func() { @@ -67073,7 +67074,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20"}, "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20"}, "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListVirtualNetworkInterfaceIps successfully`, func() { @@ -67224,9 +67225,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}]}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}]}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}]}`) + fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}]}`) } else { res.WriteHeader(400) } @@ -67431,7 +67432,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}`) + fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}`) })) }) It(`Invoke GetVirtualNetworkInterfaceIP successfully with retries`, func() { @@ -67489,7 +67490,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}`) + fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}`) })) }) It(`Invoke GetVirtualNetworkInterfaceIP successfully`, func() { @@ -67661,7 +67662,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}`) + fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}`) })) }) It(`Invoke AddVirtualNetworkInterfaceIP successfully with retries`, func() { @@ -67719,7 +67720,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}`) + fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}`) })) }) It(`Invoke AddVirtualNetworkInterfaceIP successfully`, func() { @@ -67898,7 +67899,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "public_gateways": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "public_gateways": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}`) })) }) It(`Invoke ListPublicGateways successfully with retries`, func() { @@ -67960,7 +67961,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "public_gateways": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "public_gateways": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}`) })) }) It(`Invoke ListPublicGateways successfully`, func() { @@ -68101,9 +68102,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"public_gateways":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241","floating_ip":{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip"},"href":"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241","id":"dc5431ef-1fc6-4861-adc9-a59d077d1241","name":"my-public-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"public_gateway","status":"available","vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"public_gateways":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241","floating_ip":{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip"},"href":"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241","id":"dc5431ef-1fc6-4861-adc9-a59d077d1241","name":"my-public-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"public_gateway","status":"available","vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"public_gateways":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241","floating_ip":{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip"},"href":"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241","id":"dc5431ef-1fc6-4861-adc9-a59d077d1241","name":"my-public-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"public_gateway","status":"available","vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}`) + fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"public_gateways":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241","floating_ip":{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip"},"href":"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241","id":"dc5431ef-1fc6-4861-adc9-a59d077d1241","name":"my-public-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"public_gateway","status":"available","vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}`) } else { res.WriteHeader(400) } @@ -68190,7 +68191,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VPCIdentityByID model vpcIdentityModel := new(vpcv1.VPCIdentityByID) - vpcIdentityModel.ID = core.StringPtr("4727d842-f94f-4a2d-824a-9bc9b02c523b") + vpcIdentityModel.ID = core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") // Construct an instance of the ZoneIdentityByName model zoneIdentityModel := new(vpcv1.ZoneIdentityByName) @@ -68266,7 +68267,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke CreatePublicGateway successfully with retries`, func() { @@ -68281,7 +68282,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VPCIdentityByID model vpcIdentityModel := new(vpcv1.VPCIdentityByID) - vpcIdentityModel.ID = core.StringPtr("4727d842-f94f-4a2d-824a-9bc9b02c523b") + vpcIdentityModel.ID = core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") // Construct an instance of the ZoneIdentityByName model zoneIdentityModel := new(vpcv1.ZoneIdentityByName) @@ -68359,7 +68360,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke CreatePublicGateway successfully`, func() { @@ -68379,7 +68380,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VPCIdentityByID model vpcIdentityModel := new(vpcv1.VPCIdentityByID) - vpcIdentityModel.ID = core.StringPtr("4727d842-f94f-4a2d-824a-9bc9b02c523b") + vpcIdentityModel.ID = core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") // Construct an instance of the ZoneIdentityByName model zoneIdentityModel := new(vpcv1.ZoneIdentityByName) @@ -68420,7 +68421,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VPCIdentityByID model vpcIdentityModel := new(vpcv1.VPCIdentityByID) - vpcIdentityModel.ID = core.StringPtr("4727d842-f94f-4a2d-824a-9bc9b02c523b") + vpcIdentityModel.ID = core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") // Construct an instance of the ZoneIdentityByName model zoneIdentityModel := new(vpcv1.ZoneIdentityByName) @@ -68482,7 +68483,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VPCIdentityByID model vpcIdentityModel := new(vpcv1.VPCIdentityByID) - vpcIdentityModel.ID = core.StringPtr("4727d842-f94f-4a2d-824a-9bc9b02c523b") + vpcIdentityModel.ID = core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") // Construct an instance of the ZoneIdentityByName model zoneIdentityModel := new(vpcv1.ZoneIdentityByName) @@ -68660,7 +68661,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetPublicGateway successfully with retries`, func() { @@ -68717,7 +68718,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetPublicGateway successfully`, func() { @@ -68908,7 +68909,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke UpdatePublicGateway successfully with retries`, func() { @@ -68988,7 +68989,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke UpdatePublicGateway successfully`, func() { @@ -69126,7 +69127,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["sort"]).To(Equal([]string{"name"})) Expect(req.URL.Query()["target.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["target.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727"})) + Expect(req.URL.Query()["target.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727"})) Expect(req.URL.Query()["target.name"]).To(Equal([]string{"my-resource"})) Expect(req.URL.Query()["target.resource_type"]).To(Equal([]string{"testString"})) res.Header().Set("Content-type", "application/json") @@ -69150,7 +69151,7 @@ var _ = Describe(`VpcV1`, func() { listFloatingIpsOptionsModel.ResourceGroupID = core.StringPtr("testString") listFloatingIpsOptionsModel.Sort = core.StringPtr("name") listFloatingIpsOptionsModel.TargetID = core.StringPtr("testString") - listFloatingIpsOptionsModel.TargetCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727") + listFloatingIpsOptionsModel.TargetCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727") listFloatingIpsOptionsModel.TargetName = core.StringPtr("my-resource") listFloatingIpsOptionsModel.TargetResourceType = core.StringPtr("testString") listFloatingIpsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -69191,7 +69192,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["sort"]).To(Equal([]string{"name"})) Expect(req.URL.Query()["target.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["target.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727"})) + Expect(req.URL.Query()["target.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727"})) Expect(req.URL.Query()["target.name"]).To(Equal([]string{"my-resource"})) Expect(req.URL.Query()["target.resource_type"]).To(Equal([]string{"testString"})) // Sleep a short time to support a timeout test @@ -69200,7 +69201,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips?limit=20"}, "floating_ips": [{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips?limit=20"}, "floating_ips": [{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListFloatingIps successfully with retries`, func() { @@ -69220,7 +69221,7 @@ var _ = Describe(`VpcV1`, func() { listFloatingIpsOptionsModel.ResourceGroupID = core.StringPtr("testString") listFloatingIpsOptionsModel.Sort = core.StringPtr("name") listFloatingIpsOptionsModel.TargetID = core.StringPtr("testString") - listFloatingIpsOptionsModel.TargetCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727") + listFloatingIpsOptionsModel.TargetCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727") listFloatingIpsOptionsModel.TargetName = core.StringPtr("my-resource") listFloatingIpsOptionsModel.TargetResourceType = core.StringPtr("testString") listFloatingIpsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -69266,13 +69267,13 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["sort"]).To(Equal([]string{"name"})) Expect(req.URL.Query()["target.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["target.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727"})) + Expect(req.URL.Query()["target.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727"})) Expect(req.URL.Query()["target.name"]).To(Equal([]string{"my-resource"})) Expect(req.URL.Query()["target.resource_type"]).To(Equal([]string{"testString"})) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips?limit=20"}, "floating_ips": [{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips?limit=20"}, "floating_ips": [{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListFloatingIps successfully`, func() { @@ -69297,7 +69298,7 @@ var _ = Describe(`VpcV1`, func() { listFloatingIpsOptionsModel.ResourceGroupID = core.StringPtr("testString") listFloatingIpsOptionsModel.Sort = core.StringPtr("name") listFloatingIpsOptionsModel.TargetID = core.StringPtr("testString") - listFloatingIpsOptionsModel.TargetCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727") + listFloatingIpsOptionsModel.TargetCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727") listFloatingIpsOptionsModel.TargetName = core.StringPtr("my-resource") listFloatingIpsOptionsModel.TargetResourceType = core.StringPtr("testString") listFloatingIpsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -69325,7 +69326,7 @@ var _ = Describe(`VpcV1`, func() { listFloatingIpsOptionsModel.ResourceGroupID = core.StringPtr("testString") listFloatingIpsOptionsModel.Sort = core.StringPtr("name") listFloatingIpsOptionsModel.TargetID = core.StringPtr("testString") - listFloatingIpsOptionsModel.TargetCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727") + listFloatingIpsOptionsModel.TargetCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727") listFloatingIpsOptionsModel.TargetName = core.StringPtr("my-resource") listFloatingIpsOptionsModel.TargetResourceType = core.StringPtr("testString") listFloatingIpsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -69367,7 +69368,7 @@ var _ = Describe(`VpcV1`, func() { listFloatingIpsOptionsModel.ResourceGroupID = core.StringPtr("testString") listFloatingIpsOptionsModel.Sort = core.StringPtr("name") listFloatingIpsOptionsModel.TargetID = core.StringPtr("testString") - listFloatingIpsOptionsModel.TargetCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727") + listFloatingIpsOptionsModel.TargetCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727") listFloatingIpsOptionsModel.TargetName = core.StringPtr("my-resource") listFloatingIpsOptionsModel.TargetResourceType = core.StringPtr("testString") listFloatingIpsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -69428,9 +69429,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"floating_ips":[{"address":"203.0.113.1","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"status":"available","target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"floating_ips":[{"address":"203.0.113.1","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"status":"available","target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e","id":"0717-10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"floating_ips":[{"address":"203.0.113.1","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"status":"available","target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}`) + fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"floating_ips":[{"address":"203.0.113.1","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"status":"available","target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e","id":"0717-10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}`) } else { res.WriteHeader(400) } @@ -69450,7 +69451,7 @@ var _ = Describe(`VpcV1`, func() { ResourceGroupID: core.StringPtr("testString"), Sort: core.StringPtr("name"), TargetID: core.StringPtr("testString"), - TargetCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727"), + TargetCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727"), TargetName: core.StringPtr("my-resource"), TargetResourceType: core.StringPtr("testString"), } @@ -69482,7 +69483,7 @@ var _ = Describe(`VpcV1`, func() { ResourceGroupID: core.StringPtr("testString"), Sort: core.StringPtr("name"), TargetID: core.StringPtr("testString"), - TargetCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727"), + TargetCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727"), TargetName: core.StringPtr("my-resource"), TargetResourceType: core.StringPtr("testString"), } @@ -69597,7 +69598,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke CreateFloatingIP successfully with retries`, func() { @@ -69684,7 +69685,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke CreateFloatingIP successfully`, func() { @@ -69967,7 +69968,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetFloatingIP successfully with retries`, func() { @@ -70024,7 +70025,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetFloatingIP successfully`, func() { @@ -70220,7 +70221,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke UpdateFloatingIP successfully with retries`, func() { @@ -70305,7 +70306,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, "%s", `{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke UpdateFloatingIP successfully`, func() { @@ -70517,7 +70518,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls?limit=20"}, "limit": 20, "network_acls": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls?limit=20"}, "limit": 20, "network_acls": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListNetworkAcls successfully with retries`, func() { @@ -70579,7 +70580,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls?limit=20"}, "limit": 20, "network_acls": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls?limit=20"}, "limit": 20, "network_acls": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListNetworkAcls successfully`, func() { @@ -70720,9 +70721,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"network_acls":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"rules":[{"action":"allow","before":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9","id":"8daca77a-4980-4d33-8f3e-7038797be8f9","name":"my-rule-1"},"created_at":"2019-01-01T12:00:00.000Z","destination":"192.168.3.0/24","direction":"inbound","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9","id":"8daca77a-4980-4d33-8f3e-7038797be8f9","ip_version":"ipv4","name":"my-rule-1","source":"192.168.3.0/24","destination_port_max":22,"destination_port_min":22,"protocol":"udp","source_port_max":65535,"source_port_min":49152}],"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}],"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"network_acls":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"rules":[{"action":"allow","before":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9","id":"8daca77a-4980-4d33-8f3e-7038797be8f9","name":"my-rule-1"},"created_at":"2019-01-01T12:00:00.000Z","destination":"192.168.3.0/24","direction":"inbound","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9","id":"8daca77a-4980-4d33-8f3e-7038797be8f9","ip_version":"ipv4","name":"my-rule-1","source":"192.168.3.0/24","destination_port_max":22,"destination_port_min":22,"protocol":"udp","source_port_max":65535,"source_port_min":49152}],"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}],"total_count":2,"limit":1}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"network_acls":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"rules":[{"action":"allow","before":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9","id":"8daca77a-4980-4d33-8f3e-7038797be8f9","name":"my-rule-1"},"created_at":"2019-01-01T12:00:00.000Z","destination":"192.168.3.0/24","direction":"inbound","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9","id":"8daca77a-4980-4d33-8f3e-7038797be8f9","ip_version":"ipv4","name":"my-rule-1","source":"192.168.3.0/24","destination_port_max":22,"destination_port_min":22,"protocol":"udp","source_port_max":65535,"source_port_min":49152}],"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}],"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"network_acls":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"rules":[{"action":"allow","before":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9","id":"8daca77a-4980-4d33-8f3e-7038797be8f9","name":"my-rule-1"},"created_at":"2019-01-01T12:00:00.000Z","destination":"192.168.3.0/24","direction":"inbound","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9","id":"8daca77a-4980-4d33-8f3e-7038797be8f9","ip_version":"ipv4","name":"my-rule-1","source":"192.168.3.0/24","destination_port_max":22,"destination_port_min":22,"protocol":"udp","source_port_max":65535,"source_port_min":49152}],"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}],"total_count":2,"limit":1}`) } else { res.WriteHeader(400) } @@ -70894,7 +70895,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke CreateNetworkACL successfully with retries`, func() { @@ -70996,7 +70997,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke CreateNetworkACL successfully`, func() { @@ -71324,7 +71325,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke GetNetworkACL successfully with retries`, func() { @@ -71381,7 +71382,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke GetNetworkACL successfully`, func() { @@ -71572,7 +71573,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke UpdateNetworkACL successfully with retries`, func() { @@ -71652,7 +71653,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke UpdateNetworkACL successfully`, func() { @@ -73182,7 +73183,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["vpc.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) + Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"my-vpc"})) res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -73204,7 +73205,7 @@ var _ = Describe(`VpcV1`, func() { listSecurityGroupsOptionsModel.Limit = core.Int64Ptr(int64(10)) listSecurityGroupsOptionsModel.ResourceGroupID = core.StringPtr("testString") listSecurityGroupsOptionsModel.VPCID = core.StringPtr("testString") - listSecurityGroupsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listSecurityGroupsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listSecurityGroupsOptionsModel.VPCName = core.StringPtr("my-vpc") listSecurityGroupsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Expect response parsing to fail since we are receiving a text/plain response @@ -73243,7 +73244,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["vpc.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) + Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"my-vpc"})) // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -73251,7 +73252,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "security_groups": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "local": {"address": "192.168.3.4"}, "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "security_groups": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "local": {"address": "192.168.3.4"}, "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "total_count": 132}`) })) }) It(`Invoke ListSecurityGroups successfully with retries`, func() { @@ -73270,7 +73271,7 @@ var _ = Describe(`VpcV1`, func() { listSecurityGroupsOptionsModel.Limit = core.Int64Ptr(int64(10)) listSecurityGroupsOptionsModel.ResourceGroupID = core.StringPtr("testString") listSecurityGroupsOptionsModel.VPCID = core.StringPtr("testString") - listSecurityGroupsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listSecurityGroupsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listSecurityGroupsOptionsModel.VPCName = core.StringPtr("my-vpc") listSecurityGroupsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -73314,12 +73315,12 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["vpc.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) + Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"my-vpc"})) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "security_groups": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "local": {"address": "192.168.3.4"}, "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "security_groups": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "local": {"address": "192.168.3.4"}, "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "total_count": 132}`) })) }) It(`Invoke ListSecurityGroups successfully`, func() { @@ -73343,7 +73344,7 @@ var _ = Describe(`VpcV1`, func() { listSecurityGroupsOptionsModel.Limit = core.Int64Ptr(int64(10)) listSecurityGroupsOptionsModel.ResourceGroupID = core.StringPtr("testString") listSecurityGroupsOptionsModel.VPCID = core.StringPtr("testString") - listSecurityGroupsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listSecurityGroupsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listSecurityGroupsOptionsModel.VPCName = core.StringPtr("my-vpc") listSecurityGroupsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -73369,7 +73370,7 @@ var _ = Describe(`VpcV1`, func() { listSecurityGroupsOptionsModel.Limit = core.Int64Ptr(int64(10)) listSecurityGroupsOptionsModel.ResourceGroupID = core.StringPtr("testString") listSecurityGroupsOptionsModel.VPCID = core.StringPtr("testString") - listSecurityGroupsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listSecurityGroupsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listSecurityGroupsOptionsModel.VPCName = core.StringPtr("my-vpc") listSecurityGroupsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) @@ -73409,7 +73410,7 @@ var _ = Describe(`VpcV1`, func() { listSecurityGroupsOptionsModel.Limit = core.Int64Ptr(int64(10)) listSecurityGroupsOptionsModel.ResourceGroupID = core.StringPtr("testString") listSecurityGroupsOptionsModel.VPCID = core.StringPtr("testString") - listSecurityGroupsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listSecurityGroupsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listSecurityGroupsOptionsModel.VPCName = core.StringPtr("my-vpc") listSecurityGroupsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -73469,9 +73470,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"security_groups":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271","href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"rules":[{"direction":"inbound","href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a","id":"6f2a6efe-21e2-401c-b237-620aa26ba16a","ip_version":"ipv4","local":{"address":"192.168.3.4"},"remote":{"address":"192.168.3.4"},"protocol":"all"}],"targets":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","resource_type":"network_interface"}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}],"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"security_groups":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"rules":[{"direction":"inbound","href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a","id":"6f2a6efe-21e2-401c-b237-620aa26ba16a","ip_version":"ipv4","local":{"address":"192.168.3.4"},"remote":{"address":"192.168.3.4"},"protocol":"all"}],"targets":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e","id":"0717-10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","resource_type":"network_interface"}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}],"total_count":2,"limit":1}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"security_groups":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271","href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"rules":[{"direction":"inbound","href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a","id":"6f2a6efe-21e2-401c-b237-620aa26ba16a","ip_version":"ipv4","local":{"address":"192.168.3.4"},"remote":{"address":"192.168.3.4"},"protocol":"all"}],"targets":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","resource_type":"network_interface"}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}],"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"security_groups":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"rules":[{"direction":"inbound","href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a","id":"6f2a6efe-21e2-401c-b237-620aa26ba16a","ip_version":"ipv4","local":{"address":"192.168.3.4"},"remote":{"address":"192.168.3.4"},"protocol":"all"}],"targets":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e","id":"0717-10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","resource_type":"network_interface"}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}],"total_count":2,"limit":1}`) } else { res.WriteHeader(400) } @@ -73490,7 +73491,7 @@ var _ = Describe(`VpcV1`, func() { Limit: core.Int64Ptr(int64(10)), ResourceGroupID: core.StringPtr("testString"), VPCID: core.StringPtr("testString"), - VPCCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"), + VPCCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"), VPCName: core.StringPtr("my-vpc"), } @@ -73520,7 +73521,7 @@ var _ = Describe(`VpcV1`, func() { Limit: core.Int64Ptr(int64(10)), ResourceGroupID: core.StringPtr("testString"), VPCID: core.StringPtr("testString"), - VPCCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"), + VPCCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"), VPCName: core.StringPtr("my-vpc"), } @@ -73647,7 +73648,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "local": {"address": "192.168.3.4"}, "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "local": {"address": "192.168.3.4"}, "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke CreateSecurityGroup successfully with retries`, func() { @@ -73747,7 +73748,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "local": {"address": "192.168.3.4"}, "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "local": {"address": "192.168.3.4"}, "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke CreateSecurityGroup successfully`, func() { @@ -74069,7 +74070,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "local": {"address": "192.168.3.4"}, "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "local": {"address": "192.168.3.4"}, "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke GetSecurityGroup successfully with retries`, func() { @@ -74126,7 +74127,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "local": {"address": "192.168.3.4"}, "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "local": {"address": "192.168.3.4"}, "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke GetSecurityGroup successfully`, func() { @@ -74317,7 +74318,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "local": {"address": "192.168.3.4"}, "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "local": {"address": "192.168.3.4"}, "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke UpdateSecurityGroup successfully with retries`, func() { @@ -74397,7 +74398,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "local": {"address": "192.168.3.4"}, "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "local": {"address": "192.168.3.4"}, "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke UpdateSecurityGroup successfully`, func() { @@ -75836,7 +75837,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/targets?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/targets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/targets?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/targets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}], "total_count": 132}`) })) }) It(`Invoke ListSecurityGroupTargets successfully with retries`, func() { @@ -75897,7 +75898,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/targets?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/targets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/targets?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/targets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}], "total_count": 132}`) })) }) It(`Invoke ListSecurityGroupTargets successfully`, func() { @@ -76045,9 +76046,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"targets":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","resource_type":"network_interface"}]}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"targets":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e","id":"0717-10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","resource_type":"network_interface"}]}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"targets":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","resource_type":"network_interface"}]}`) + fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"targets":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e","id":"0717-10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","resource_type":"network_interface"}]}`) } else { res.WriteHeader(400) } @@ -76250,7 +76251,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}`) + fmt.Fprintf(res, "%s", `{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}`) })) }) It(`Invoke GetSecurityGroupTarget successfully with retries`, func() { @@ -76308,7 +76309,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}`) + fmt.Fprintf(res, "%s", `{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}`) })) }) It(`Invoke GetSecurityGroupTarget successfully`, func() { @@ -76480,7 +76481,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}`) + fmt.Fprintf(res, "%s", `{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}`) })) }) It(`Invoke CreateSecurityGroupTargetBinding successfully with retries`, func() { @@ -76538,7 +76539,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}`) + fmt.Fprintf(res, "%s", `{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}`) })) }) It(`Invoke CreateSecurityGroupTargetBinding successfully`, func() { @@ -77961,7 +77962,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "peer_address": "169.21.50.5", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}]}`) + fmt.Fprintf(res, "%s", `{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "establish_mode": "bidirectional", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "local": {"ike_identities": [{"type": "fqdn", "value": "my-service.example.com"}]}, "peer": {"ike_identity": {"type": "fqdn", "value": "my-service.example.com"}, "type": "address", "address": "169.21.50.5"}, "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}]}`) })) }) It(`Invoke ListIkePolicyConnections successfully with retries`, func() { @@ -78018,7 +78019,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "peer_address": "169.21.50.5", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}]}`) + fmt.Fprintf(res, "%s", `{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "establish_mode": "bidirectional", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "local": {"ike_identities": [{"type": "fqdn", "value": "my-service.example.com"}]}, "peer": {"ike_identity": {"type": "fqdn", "value": "my-service.example.com"}, "type": "address", "address": "169.21.50.5"}, "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}]}`) })) }) It(`Invoke ListIkePolicyConnections successfully`, func() { @@ -79428,7 +79429,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "peer_address": "169.21.50.5", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}]}`) + fmt.Fprintf(res, "%s", `{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "establish_mode": "bidirectional", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "local": {"ike_identities": [{"type": "fqdn", "value": "my-service.example.com"}]}, "peer": {"ike_identity": {"type": "fqdn", "value": "my-service.example.com"}, "type": "address", "address": "169.21.50.5"}, "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}]}`) })) }) It(`Invoke ListIpsecPolicyConnections successfully with retries`, func() { @@ -79485,7 +79486,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "peer_address": "169.21.50.5", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}]}`) + fmt.Fprintf(res, "%s", `{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "establish_mode": "bidirectional", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "local": {"ike_identities": [{"type": "fqdn", "value": "my-service.example.com"}]}, "peer": {"ike_identity": {"type": "fqdn", "value": "my-service.example.com"}, "type": "address", "address": "169.21.50.5"}, "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}]}`) })) }) It(`Invoke ListIpsecPolicyConnections successfully`, func() { @@ -79667,7 +79668,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132, "vpn_gateways": [{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "members": [{"health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "private_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "public_ip": {"address": "192.168.3.4"}, "role": "active"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "mode": "route"}]}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132, "vpn_gateways": [{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "members": [{"health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "private_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "public_ip": {"address": "192.168.3.4"}, "role": "active"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "mode": "route"}]}`) })) }) It(`Invoke ListVPNGateways successfully with retries`, func() { @@ -79733,7 +79734,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132, "vpn_gateways": [{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "members": [{"health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "private_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "public_ip": {"address": "192.168.3.4"}, "role": "active"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "mode": "route"}]}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132, "vpn_gateways": [{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "members": [{"health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "private_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "public_ip": {"address": "192.168.3.4"}, "role": "active"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "mode": "route"}]}`) })) }) It(`Invoke ListVPNGateways successfully`, func() { @@ -79880,9 +79881,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"vpn_gateways":[{"connections":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b","id":"a10a5771-dc23-442c-8460-c3601d8542f7","name":"my-vpn-connection","resource_type":"vpn_gateway_connection"}],"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","health_reasons":[{"code":"cannot_reserve_ip_address","message":"IP address exhaustion (release addresses on the VPN's subnet).","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","members":[{"health_reasons":[{"code":"cannot_reserve_ip_address","message":"IP address exhaustion (release addresses on the VPN's subnet).","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}],"health_state":"ok","lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","private_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"public_ip":{"address":"192.168.3.4"},"role":"active"}],"name":"my-vpn-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"vpn_gateway","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"mode":"route"}]}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"vpn_gateways":[{"connections":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b","id":"a10a5771-dc23-442c-8460-c3601d8542f7","name":"my-vpn-connection","resource_type":"vpn_gateway_connection"}],"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","health_reasons":[{"code":"cannot_reserve_ip_address","message":"IP address exhaustion (release addresses on the VPN's subnet).","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","members":[{"health_reasons":[{"code":"cannot_reserve_ip_address","message":"IP address exhaustion (release addresses on the VPN's subnet).","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}],"health_state":"ok","lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","private_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"public_ip":{"address":"192.168.3.4"},"role":"active"}],"name":"my-vpn-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"vpn_gateway","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"mode":"route"}]}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"vpn_gateways":[{"connections":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b","id":"a10a5771-dc23-442c-8460-c3601d8542f7","name":"my-vpn-connection","resource_type":"vpn_gateway_connection"}],"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","health_reasons":[{"code":"cannot_reserve_ip_address","message":"IP address exhaustion (release addresses on the VPN's subnet).","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","members":[{"health_reasons":[{"code":"cannot_reserve_ip_address","message":"IP address exhaustion (release addresses on the VPN's subnet).","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}],"health_state":"ok","lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","private_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"public_ip":{"address":"192.168.3.4"},"role":"active"}],"name":"my-vpn-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"vpn_gateway","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"mode":"route"}]}`) + fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"vpn_gateways":[{"connections":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b","id":"a10a5771-dc23-442c-8460-c3601d8542f7","name":"my-vpn-connection","resource_type":"vpn_gateway_connection"}],"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","health_reasons":[{"code":"cannot_reserve_ip_address","message":"IP address exhaustion (release addresses on the VPN's subnet).","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","members":[{"health_reasons":[{"code":"cannot_reserve_ip_address","message":"IP address exhaustion (release addresses on the VPN's subnet).","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}],"health_state":"ok","lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","private_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"public_ip":{"address":"192.168.3.4"},"role":"active"}],"name":"my-vpn-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"vpn_gateway","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"mode":"route"}]}`) } else { res.WriteHeader(400) } @@ -79977,7 +79978,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the VPNGatewayPrototypeVPNGatewayRouteModePrototype model vpnGatewayPrototypeModel := new(vpcv1.VPNGatewayPrototypeVPNGatewayRouteModePrototype) @@ -80044,7 +80045,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "members": [{"health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "private_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "public_ip": {"address": "192.168.3.4"}, "role": "active"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "mode": "route"}`) + fmt.Fprintf(res, "%s", `{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "members": [{"health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "private_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "public_ip": {"address": "192.168.3.4"}, "role": "active"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "mode": "route"}`) })) }) It(`Invoke CreateVPNGateway successfully with retries`, func() { @@ -80063,7 +80064,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the VPNGatewayPrototypeVPNGatewayRouteModePrototype model vpnGatewayPrototypeModel := new(vpcv1.VPNGatewayPrototypeVPNGatewayRouteModePrototype) @@ -80132,7 +80133,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "members": [{"health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "private_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "public_ip": {"address": "192.168.3.4"}, "role": "active"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "mode": "route"}`) + fmt.Fprintf(res, "%s", `{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "members": [{"health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "private_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "public_ip": {"address": "192.168.3.4"}, "role": "active"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "mode": "route"}`) })) }) It(`Invoke CreateVPNGateway successfully`, func() { @@ -80156,7 +80157,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the VPNGatewayPrototypeVPNGatewayRouteModePrototype model vpnGatewayPrototypeModel := new(vpcv1.VPNGatewayPrototypeVPNGatewayRouteModePrototype) @@ -80192,7 +80193,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the VPNGatewayPrototypeVPNGatewayRouteModePrototype model vpnGatewayPrototypeModel := new(vpcv1.VPNGatewayPrototypeVPNGatewayRouteModePrototype) @@ -80249,7 +80250,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the VPNGatewayPrototypeVPNGatewayRouteModePrototype model vpnGatewayPrototypeModel := new(vpcv1.VPNGatewayPrototypeVPNGatewayRouteModePrototype) @@ -80418,7 +80419,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "members": [{"health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "private_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "public_ip": {"address": "192.168.3.4"}, "role": "active"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "mode": "route"}`) + fmt.Fprintf(res, "%s", `{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "members": [{"health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "private_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "public_ip": {"address": "192.168.3.4"}, "role": "active"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "mode": "route"}`) })) }) It(`Invoke GetVPNGateway successfully with retries`, func() { @@ -80475,7 +80476,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "members": [{"health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "private_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "public_ip": {"address": "192.168.3.4"}, "role": "active"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "mode": "route"}`) + fmt.Fprintf(res, "%s", `{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "members": [{"health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "private_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "public_ip": {"address": "192.168.3.4"}, "role": "active"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "mode": "route"}`) })) }) It(`Invoke GetVPNGateway successfully`, func() { @@ -80666,7 +80667,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "members": [{"health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "private_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "public_ip": {"address": "192.168.3.4"}, "role": "active"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "mode": "route"}`) + fmt.Fprintf(res, "%s", `{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "members": [{"health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "private_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "public_ip": {"address": "192.168.3.4"}, "role": "active"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "mode": "route"}`) })) }) It(`Invoke UpdateVPNGateway successfully with retries`, func() { @@ -80746,7 +80747,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "members": [{"health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "private_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "public_ip": {"address": "192.168.3.4"}, "role": "active"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "mode": "route"}`) + fmt.Fprintf(res, "%s", `{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "members": [{"health_reasons": [{"code": "cannot_reserve_ip_address", "message": "IP address exhaustion (release addresses on the VPN's subnet).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health"}], "health_state": "ok", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "private_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "public_ip": {"address": "192.168.3.4"}, "role": "active"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "mode": "route"}`) })) }) It(`Invoke UpdateVPNGateway successfully`, func() { @@ -80938,7 +80939,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "peer_address": "169.21.50.5", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}]}`) + fmt.Fprintf(res, "%s", `{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "establish_mode": "bidirectional", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "local": {"ike_identities": [{"type": "fqdn", "value": "my-service.example.com"}]}, "peer": {"ike_identity": {"type": "fqdn", "value": "my-service.example.com"}, "type": "address", "address": "169.21.50.5"}, "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}]}`) })) }) It(`Invoke ListVPNGatewayConnections successfully with retries`, func() { @@ -80997,7 +80998,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "peer_address": "169.21.50.5", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}]}`) + fmt.Fprintf(res, "%s", `{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "establish_mode": "bidirectional", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "local": {"ike_identities": [{"type": "fqdn", "value": "my-service.example.com"}]}, "peer": {"ike_identity": {"type": "fqdn", "value": "my-service.example.com"}, "type": "address", "address": "169.21.50.5"}, "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}]}`) })) }) It(`Invoke ListVPNGatewayConnections successfully`, func() { @@ -81140,15 +81141,31 @@ var _ = Describe(`VpcV1`, func() { vpnGatewayConnectionIPsecPolicyPrototypeModel := new(vpcv1.VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID) vpnGatewayConnectionIPsecPolicyPrototypeModel.ID = core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b") + // Construct an instance of the VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn model + vpnGatewayConnectionIkeIdentityPrototypeModel := new(vpcv1.VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn) + vpnGatewayConnectionIkeIdentityPrototypeModel.Type = core.StringPtr("fqdn") + vpnGatewayConnectionIkeIdentityPrototypeModel.Value = core.StringPtr("my-service.example.com") + + // Construct an instance of the VPNGatewayConnectionStaticRouteModeLocalPrototype model + vpnGatewayConnectionStaticRouteModeLocalPrototypeModel := new(vpcv1.VPNGatewayConnectionStaticRouteModeLocalPrototype) + vpnGatewayConnectionStaticRouteModeLocalPrototypeModel.IkeIdentities = []vpcv1.VPNGatewayConnectionIkeIdentityPrototypeIntf{vpnGatewayConnectionIkeIdentityPrototypeModel} + + // Construct an instance of the VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress model + vpnGatewayConnectionStaticRouteModePeerPrototypeModel := new(vpcv1.VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress) + vpnGatewayConnectionStaticRouteModePeerPrototypeModel.IkeIdentity = vpnGatewayConnectionIkeIdentityPrototypeModel + vpnGatewayConnectionStaticRouteModePeerPrototypeModel.Address = core.StringPtr("169.21.50.5") + // Construct an instance of the VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype model vpnGatewayConnectionPrototypeModel := new(vpcv1.VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype) vpnGatewayConnectionPrototypeModel.AdminStateUp = core.BoolPtr(true) vpnGatewayConnectionPrototypeModel.DeadPeerDetection = vpnGatewayConnectionDpdPrototypeModel + vpnGatewayConnectionPrototypeModel.EstablishMode = core.StringPtr("bidirectional") vpnGatewayConnectionPrototypeModel.IkePolicy = vpnGatewayConnectionIkePolicyPrototypeModel vpnGatewayConnectionPrototypeModel.IpsecPolicy = vpnGatewayConnectionIPsecPolicyPrototypeModel vpnGatewayConnectionPrototypeModel.Name = core.StringPtr("my-vpn-connection") - vpnGatewayConnectionPrototypeModel.PeerAddress = core.StringPtr("169.21.50.5") vpnGatewayConnectionPrototypeModel.Psk = core.StringPtr("lkj14b1oi0alcniejkso") + vpnGatewayConnectionPrototypeModel.Local = vpnGatewayConnectionStaticRouteModeLocalPrototypeModel + vpnGatewayConnectionPrototypeModel.Peer = vpnGatewayConnectionStaticRouteModePeerPrototypeModel vpnGatewayConnectionPrototypeModel.RoutingProtocol = core.StringPtr("none") // Construct an instance of the CreateVPNGatewayConnectionOptions model @@ -81210,7 +81227,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "peer_address": "169.21.50.5", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}`) + fmt.Fprintf(res, "%s", `{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "establish_mode": "bidirectional", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "local": {"ike_identities": [{"type": "fqdn", "value": "my-service.example.com"}]}, "peer": {"ike_identity": {"type": "fqdn", "value": "my-service.example.com"}, "type": "address", "address": "169.21.50.5"}, "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}`) })) }) It(`Invoke CreateVPNGatewayConnection successfully with retries`, func() { @@ -81237,15 +81254,31 @@ var _ = Describe(`VpcV1`, func() { vpnGatewayConnectionIPsecPolicyPrototypeModel := new(vpcv1.VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID) vpnGatewayConnectionIPsecPolicyPrototypeModel.ID = core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b") + // Construct an instance of the VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn model + vpnGatewayConnectionIkeIdentityPrototypeModel := new(vpcv1.VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn) + vpnGatewayConnectionIkeIdentityPrototypeModel.Type = core.StringPtr("fqdn") + vpnGatewayConnectionIkeIdentityPrototypeModel.Value = core.StringPtr("my-service.example.com") + + // Construct an instance of the VPNGatewayConnectionStaticRouteModeLocalPrototype model + vpnGatewayConnectionStaticRouteModeLocalPrototypeModel := new(vpcv1.VPNGatewayConnectionStaticRouteModeLocalPrototype) + vpnGatewayConnectionStaticRouteModeLocalPrototypeModel.IkeIdentities = []vpcv1.VPNGatewayConnectionIkeIdentityPrototypeIntf{vpnGatewayConnectionIkeIdentityPrototypeModel} + + // Construct an instance of the VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress model + vpnGatewayConnectionStaticRouteModePeerPrototypeModel := new(vpcv1.VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress) + vpnGatewayConnectionStaticRouteModePeerPrototypeModel.IkeIdentity = vpnGatewayConnectionIkeIdentityPrototypeModel + vpnGatewayConnectionStaticRouteModePeerPrototypeModel.Address = core.StringPtr("169.21.50.5") + // Construct an instance of the VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype model vpnGatewayConnectionPrototypeModel := new(vpcv1.VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype) vpnGatewayConnectionPrototypeModel.AdminStateUp = core.BoolPtr(true) vpnGatewayConnectionPrototypeModel.DeadPeerDetection = vpnGatewayConnectionDpdPrototypeModel + vpnGatewayConnectionPrototypeModel.EstablishMode = core.StringPtr("bidirectional") vpnGatewayConnectionPrototypeModel.IkePolicy = vpnGatewayConnectionIkePolicyPrototypeModel vpnGatewayConnectionPrototypeModel.IpsecPolicy = vpnGatewayConnectionIPsecPolicyPrototypeModel vpnGatewayConnectionPrototypeModel.Name = core.StringPtr("my-vpn-connection") - vpnGatewayConnectionPrototypeModel.PeerAddress = core.StringPtr("169.21.50.5") vpnGatewayConnectionPrototypeModel.Psk = core.StringPtr("lkj14b1oi0alcniejkso") + vpnGatewayConnectionPrototypeModel.Local = vpnGatewayConnectionStaticRouteModeLocalPrototypeModel + vpnGatewayConnectionPrototypeModel.Peer = vpnGatewayConnectionStaticRouteModePeerPrototypeModel vpnGatewayConnectionPrototypeModel.RoutingProtocol = core.StringPtr("none") // Construct an instance of the CreateVPNGatewayConnectionOptions model @@ -81309,7 +81342,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "peer_address": "169.21.50.5", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}`) + fmt.Fprintf(res, "%s", `{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "establish_mode": "bidirectional", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "local": {"ike_identities": [{"type": "fqdn", "value": "my-service.example.com"}]}, "peer": {"ike_identity": {"type": "fqdn", "value": "my-service.example.com"}, "type": "address", "address": "169.21.50.5"}, "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}`) })) }) It(`Invoke CreateVPNGatewayConnection successfully`, func() { @@ -81341,15 +81374,31 @@ var _ = Describe(`VpcV1`, func() { vpnGatewayConnectionIPsecPolicyPrototypeModel := new(vpcv1.VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID) vpnGatewayConnectionIPsecPolicyPrototypeModel.ID = core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b") + // Construct an instance of the VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn model + vpnGatewayConnectionIkeIdentityPrototypeModel := new(vpcv1.VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn) + vpnGatewayConnectionIkeIdentityPrototypeModel.Type = core.StringPtr("fqdn") + vpnGatewayConnectionIkeIdentityPrototypeModel.Value = core.StringPtr("my-service.example.com") + + // Construct an instance of the VPNGatewayConnectionStaticRouteModeLocalPrototype model + vpnGatewayConnectionStaticRouteModeLocalPrototypeModel := new(vpcv1.VPNGatewayConnectionStaticRouteModeLocalPrototype) + vpnGatewayConnectionStaticRouteModeLocalPrototypeModel.IkeIdentities = []vpcv1.VPNGatewayConnectionIkeIdentityPrototypeIntf{vpnGatewayConnectionIkeIdentityPrototypeModel} + + // Construct an instance of the VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress model + vpnGatewayConnectionStaticRouteModePeerPrototypeModel := new(vpcv1.VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress) + vpnGatewayConnectionStaticRouteModePeerPrototypeModel.IkeIdentity = vpnGatewayConnectionIkeIdentityPrototypeModel + vpnGatewayConnectionStaticRouteModePeerPrototypeModel.Address = core.StringPtr("169.21.50.5") + // Construct an instance of the VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype model vpnGatewayConnectionPrototypeModel := new(vpcv1.VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype) vpnGatewayConnectionPrototypeModel.AdminStateUp = core.BoolPtr(true) vpnGatewayConnectionPrototypeModel.DeadPeerDetection = vpnGatewayConnectionDpdPrototypeModel + vpnGatewayConnectionPrototypeModel.EstablishMode = core.StringPtr("bidirectional") vpnGatewayConnectionPrototypeModel.IkePolicy = vpnGatewayConnectionIkePolicyPrototypeModel vpnGatewayConnectionPrototypeModel.IpsecPolicy = vpnGatewayConnectionIPsecPolicyPrototypeModel vpnGatewayConnectionPrototypeModel.Name = core.StringPtr("my-vpn-connection") - vpnGatewayConnectionPrototypeModel.PeerAddress = core.StringPtr("169.21.50.5") vpnGatewayConnectionPrototypeModel.Psk = core.StringPtr("lkj14b1oi0alcniejkso") + vpnGatewayConnectionPrototypeModel.Local = vpnGatewayConnectionStaticRouteModeLocalPrototypeModel + vpnGatewayConnectionPrototypeModel.Peer = vpnGatewayConnectionStaticRouteModePeerPrototypeModel vpnGatewayConnectionPrototypeModel.RoutingProtocol = core.StringPtr("none") // Construct an instance of the CreateVPNGatewayConnectionOptions model @@ -81388,15 +81437,31 @@ var _ = Describe(`VpcV1`, func() { vpnGatewayConnectionIPsecPolicyPrototypeModel := new(vpcv1.VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID) vpnGatewayConnectionIPsecPolicyPrototypeModel.ID = core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b") + // Construct an instance of the VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn model + vpnGatewayConnectionIkeIdentityPrototypeModel := new(vpcv1.VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn) + vpnGatewayConnectionIkeIdentityPrototypeModel.Type = core.StringPtr("fqdn") + vpnGatewayConnectionIkeIdentityPrototypeModel.Value = core.StringPtr("my-service.example.com") + + // Construct an instance of the VPNGatewayConnectionStaticRouteModeLocalPrototype model + vpnGatewayConnectionStaticRouteModeLocalPrototypeModel := new(vpcv1.VPNGatewayConnectionStaticRouteModeLocalPrototype) + vpnGatewayConnectionStaticRouteModeLocalPrototypeModel.IkeIdentities = []vpcv1.VPNGatewayConnectionIkeIdentityPrototypeIntf{vpnGatewayConnectionIkeIdentityPrototypeModel} + + // Construct an instance of the VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress model + vpnGatewayConnectionStaticRouteModePeerPrototypeModel := new(vpcv1.VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress) + vpnGatewayConnectionStaticRouteModePeerPrototypeModel.IkeIdentity = vpnGatewayConnectionIkeIdentityPrototypeModel + vpnGatewayConnectionStaticRouteModePeerPrototypeModel.Address = core.StringPtr("169.21.50.5") + // Construct an instance of the VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype model vpnGatewayConnectionPrototypeModel := new(vpcv1.VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype) vpnGatewayConnectionPrototypeModel.AdminStateUp = core.BoolPtr(true) vpnGatewayConnectionPrototypeModel.DeadPeerDetection = vpnGatewayConnectionDpdPrototypeModel + vpnGatewayConnectionPrototypeModel.EstablishMode = core.StringPtr("bidirectional") vpnGatewayConnectionPrototypeModel.IkePolicy = vpnGatewayConnectionIkePolicyPrototypeModel vpnGatewayConnectionPrototypeModel.IpsecPolicy = vpnGatewayConnectionIPsecPolicyPrototypeModel vpnGatewayConnectionPrototypeModel.Name = core.StringPtr("my-vpn-connection") - vpnGatewayConnectionPrototypeModel.PeerAddress = core.StringPtr("169.21.50.5") vpnGatewayConnectionPrototypeModel.Psk = core.StringPtr("lkj14b1oi0alcniejkso") + vpnGatewayConnectionPrototypeModel.Local = vpnGatewayConnectionStaticRouteModeLocalPrototypeModel + vpnGatewayConnectionPrototypeModel.Peer = vpnGatewayConnectionStaticRouteModePeerPrototypeModel vpnGatewayConnectionPrototypeModel.RoutingProtocol = core.StringPtr("none") // Construct an instance of the CreateVPNGatewayConnectionOptions model @@ -81456,15 +81521,31 @@ var _ = Describe(`VpcV1`, func() { vpnGatewayConnectionIPsecPolicyPrototypeModel := new(vpcv1.VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID) vpnGatewayConnectionIPsecPolicyPrototypeModel.ID = core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b") + // Construct an instance of the VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn model + vpnGatewayConnectionIkeIdentityPrototypeModel := new(vpcv1.VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn) + vpnGatewayConnectionIkeIdentityPrototypeModel.Type = core.StringPtr("fqdn") + vpnGatewayConnectionIkeIdentityPrototypeModel.Value = core.StringPtr("my-service.example.com") + + // Construct an instance of the VPNGatewayConnectionStaticRouteModeLocalPrototype model + vpnGatewayConnectionStaticRouteModeLocalPrototypeModel := new(vpcv1.VPNGatewayConnectionStaticRouteModeLocalPrototype) + vpnGatewayConnectionStaticRouteModeLocalPrototypeModel.IkeIdentities = []vpcv1.VPNGatewayConnectionIkeIdentityPrototypeIntf{vpnGatewayConnectionIkeIdentityPrototypeModel} + + // Construct an instance of the VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress model + vpnGatewayConnectionStaticRouteModePeerPrototypeModel := new(vpcv1.VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress) + vpnGatewayConnectionStaticRouteModePeerPrototypeModel.IkeIdentity = vpnGatewayConnectionIkeIdentityPrototypeModel + vpnGatewayConnectionStaticRouteModePeerPrototypeModel.Address = core.StringPtr("169.21.50.5") + // Construct an instance of the VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype model vpnGatewayConnectionPrototypeModel := new(vpcv1.VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype) vpnGatewayConnectionPrototypeModel.AdminStateUp = core.BoolPtr(true) vpnGatewayConnectionPrototypeModel.DeadPeerDetection = vpnGatewayConnectionDpdPrototypeModel + vpnGatewayConnectionPrototypeModel.EstablishMode = core.StringPtr("bidirectional") vpnGatewayConnectionPrototypeModel.IkePolicy = vpnGatewayConnectionIkePolicyPrototypeModel vpnGatewayConnectionPrototypeModel.IpsecPolicy = vpnGatewayConnectionIPsecPolicyPrototypeModel vpnGatewayConnectionPrototypeModel.Name = core.StringPtr("my-vpn-connection") - vpnGatewayConnectionPrototypeModel.PeerAddress = core.StringPtr("169.21.50.5") vpnGatewayConnectionPrototypeModel.Psk = core.StringPtr("lkj14b1oi0alcniejkso") + vpnGatewayConnectionPrototypeModel.Local = vpnGatewayConnectionStaticRouteModeLocalPrototypeModel + vpnGatewayConnectionPrototypeModel.Peer = vpnGatewayConnectionStaticRouteModePeerPrototypeModel vpnGatewayConnectionPrototypeModel.RoutingProtocol = core.StringPtr("none") // Construct an instance of the CreateVPNGatewayConnectionOptions model @@ -81631,7 +81712,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "peer_address": "169.21.50.5", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}`) + fmt.Fprintf(res, "%s", `{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "establish_mode": "bidirectional", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "local": {"ike_identities": [{"type": "fqdn", "value": "my-service.example.com"}]}, "peer": {"ike_identity": {"type": "fqdn", "value": "my-service.example.com"}, "type": "address", "address": "169.21.50.5"}, "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}`) })) }) It(`Invoke GetVPNGatewayConnection successfully with retries`, func() { @@ -81689,7 +81770,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "peer_address": "169.21.50.5", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}`) + fmt.Fprintf(res, "%s", `{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "establish_mode": "bidirectional", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "local": {"ike_identities": [{"type": "fqdn", "value": "my-service.example.com"}]}, "peer": {"ike_identity": {"type": "fqdn", "value": "my-service.example.com"}, "type": "address", "address": "169.21.50.5"}, "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}`) })) }) It(`Invoke GetVPNGatewayConnection successfully`, func() { @@ -81832,14 +81913,19 @@ var _ = Describe(`VpcV1`, func() { vpnGatewayConnectionIPsecPolicyPatchModel := new(vpcv1.VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID) vpnGatewayConnectionIPsecPolicyPatchModel.ID = core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b") + // Construct an instance of the VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch model + vpnGatewayConnectionPeerPatchModel := new(vpcv1.VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch) + vpnGatewayConnectionPeerPatchModel.Address = core.StringPtr("169.21.50.5") + // Construct an instance of the VPNGatewayConnectionPatch model vpnGatewayConnectionPatchModel := new(vpcv1.VPNGatewayConnectionPatch) vpnGatewayConnectionPatchModel.AdminStateUp = core.BoolPtr(true) vpnGatewayConnectionPatchModel.DeadPeerDetection = vpnGatewayConnectionDpdPatchModel + vpnGatewayConnectionPatchModel.EstablishMode = core.StringPtr("bidirectional") vpnGatewayConnectionPatchModel.IkePolicy = vpnGatewayConnectionIkePolicyPatchModel vpnGatewayConnectionPatchModel.IpsecPolicy = vpnGatewayConnectionIPsecPolicyPatchModel vpnGatewayConnectionPatchModel.Name = core.StringPtr("my-vpn-connection") - vpnGatewayConnectionPatchModel.PeerAddress = core.StringPtr("169.21.50.5") + vpnGatewayConnectionPatchModel.Peer = vpnGatewayConnectionPeerPatchModel vpnGatewayConnectionPatchModel.Psk = core.StringPtr("lkj14b1oi0alcniejkso") vpnGatewayConnectionPatchModel.RoutingProtocol = core.StringPtr("none") vpnGatewayConnectionPatchModelAsPatch, asPatchErr := vpnGatewayConnectionPatchModel.AsPatch() @@ -81905,7 +81991,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "peer_address": "169.21.50.5", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}`) + fmt.Fprintf(res, "%s", `{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "establish_mode": "bidirectional", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "local": {"ike_identities": [{"type": "fqdn", "value": "my-service.example.com"}]}, "peer": {"ike_identity": {"type": "fqdn", "value": "my-service.example.com"}, "type": "address", "address": "169.21.50.5"}, "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}`) })) }) It(`Invoke UpdateVPNGatewayConnection successfully with retries`, func() { @@ -81932,14 +82018,19 @@ var _ = Describe(`VpcV1`, func() { vpnGatewayConnectionIPsecPolicyPatchModel := new(vpcv1.VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID) vpnGatewayConnectionIPsecPolicyPatchModel.ID = core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b") + // Construct an instance of the VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch model + vpnGatewayConnectionPeerPatchModel := new(vpcv1.VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch) + vpnGatewayConnectionPeerPatchModel.Address = core.StringPtr("169.21.50.5") + // Construct an instance of the VPNGatewayConnectionPatch model vpnGatewayConnectionPatchModel := new(vpcv1.VPNGatewayConnectionPatch) vpnGatewayConnectionPatchModel.AdminStateUp = core.BoolPtr(true) vpnGatewayConnectionPatchModel.DeadPeerDetection = vpnGatewayConnectionDpdPatchModel + vpnGatewayConnectionPatchModel.EstablishMode = core.StringPtr("bidirectional") vpnGatewayConnectionPatchModel.IkePolicy = vpnGatewayConnectionIkePolicyPatchModel vpnGatewayConnectionPatchModel.IpsecPolicy = vpnGatewayConnectionIPsecPolicyPatchModel vpnGatewayConnectionPatchModel.Name = core.StringPtr("my-vpn-connection") - vpnGatewayConnectionPatchModel.PeerAddress = core.StringPtr("169.21.50.5") + vpnGatewayConnectionPatchModel.Peer = vpnGatewayConnectionPeerPatchModel vpnGatewayConnectionPatchModel.Psk = core.StringPtr("lkj14b1oi0alcniejkso") vpnGatewayConnectionPatchModel.RoutingProtocol = core.StringPtr("none") vpnGatewayConnectionPatchModelAsPatch, asPatchErr := vpnGatewayConnectionPatchModel.AsPatch() @@ -82007,7 +82098,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "peer_address": "169.21.50.5", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}`) + fmt.Fprintf(res, "%s", `{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "establish_mode": "bidirectional", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "local": {"ike_identities": [{"type": "fqdn", "value": "my-service.example.com"}]}, "peer": {"ike_identity": {"type": "fqdn", "value": "my-service.example.com"}, "type": "address", "address": "169.21.50.5"}, "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}`) })) }) It(`Invoke UpdateVPNGatewayConnection successfully`, func() { @@ -82039,14 +82130,19 @@ var _ = Describe(`VpcV1`, func() { vpnGatewayConnectionIPsecPolicyPatchModel := new(vpcv1.VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID) vpnGatewayConnectionIPsecPolicyPatchModel.ID = core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b") + // Construct an instance of the VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch model + vpnGatewayConnectionPeerPatchModel := new(vpcv1.VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch) + vpnGatewayConnectionPeerPatchModel.Address = core.StringPtr("169.21.50.5") + // Construct an instance of the VPNGatewayConnectionPatch model vpnGatewayConnectionPatchModel := new(vpcv1.VPNGatewayConnectionPatch) vpnGatewayConnectionPatchModel.AdminStateUp = core.BoolPtr(true) vpnGatewayConnectionPatchModel.DeadPeerDetection = vpnGatewayConnectionDpdPatchModel + vpnGatewayConnectionPatchModel.EstablishMode = core.StringPtr("bidirectional") vpnGatewayConnectionPatchModel.IkePolicy = vpnGatewayConnectionIkePolicyPatchModel vpnGatewayConnectionPatchModel.IpsecPolicy = vpnGatewayConnectionIPsecPolicyPatchModel vpnGatewayConnectionPatchModel.Name = core.StringPtr("my-vpn-connection") - vpnGatewayConnectionPatchModel.PeerAddress = core.StringPtr("169.21.50.5") + vpnGatewayConnectionPatchModel.Peer = vpnGatewayConnectionPeerPatchModel vpnGatewayConnectionPatchModel.Psk = core.StringPtr("lkj14b1oi0alcniejkso") vpnGatewayConnectionPatchModel.RoutingProtocol = core.StringPtr("none") vpnGatewayConnectionPatchModelAsPatch, asPatchErr := vpnGatewayConnectionPatchModel.AsPatch() @@ -82089,14 +82185,19 @@ var _ = Describe(`VpcV1`, func() { vpnGatewayConnectionIPsecPolicyPatchModel := new(vpcv1.VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID) vpnGatewayConnectionIPsecPolicyPatchModel.ID = core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b") + // Construct an instance of the VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch model + vpnGatewayConnectionPeerPatchModel := new(vpcv1.VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch) + vpnGatewayConnectionPeerPatchModel.Address = core.StringPtr("169.21.50.5") + // Construct an instance of the VPNGatewayConnectionPatch model vpnGatewayConnectionPatchModel := new(vpcv1.VPNGatewayConnectionPatch) vpnGatewayConnectionPatchModel.AdminStateUp = core.BoolPtr(true) vpnGatewayConnectionPatchModel.DeadPeerDetection = vpnGatewayConnectionDpdPatchModel + vpnGatewayConnectionPatchModel.EstablishMode = core.StringPtr("bidirectional") vpnGatewayConnectionPatchModel.IkePolicy = vpnGatewayConnectionIkePolicyPatchModel vpnGatewayConnectionPatchModel.IpsecPolicy = vpnGatewayConnectionIPsecPolicyPatchModel vpnGatewayConnectionPatchModel.Name = core.StringPtr("my-vpn-connection") - vpnGatewayConnectionPatchModel.PeerAddress = core.StringPtr("169.21.50.5") + vpnGatewayConnectionPatchModel.Peer = vpnGatewayConnectionPeerPatchModel vpnGatewayConnectionPatchModel.Psk = core.StringPtr("lkj14b1oi0alcniejkso") vpnGatewayConnectionPatchModel.RoutingProtocol = core.StringPtr("none") vpnGatewayConnectionPatchModelAsPatch, asPatchErr := vpnGatewayConnectionPatchModel.AsPatch() @@ -82160,14 +82261,19 @@ var _ = Describe(`VpcV1`, func() { vpnGatewayConnectionIPsecPolicyPatchModel := new(vpcv1.VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID) vpnGatewayConnectionIPsecPolicyPatchModel.ID = core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b") + // Construct an instance of the VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch model + vpnGatewayConnectionPeerPatchModel := new(vpcv1.VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch) + vpnGatewayConnectionPeerPatchModel.Address = core.StringPtr("169.21.50.5") + // Construct an instance of the VPNGatewayConnectionPatch model vpnGatewayConnectionPatchModel := new(vpcv1.VPNGatewayConnectionPatch) vpnGatewayConnectionPatchModel.AdminStateUp = core.BoolPtr(true) vpnGatewayConnectionPatchModel.DeadPeerDetection = vpnGatewayConnectionDpdPatchModel + vpnGatewayConnectionPatchModel.EstablishMode = core.StringPtr("bidirectional") vpnGatewayConnectionPatchModel.IkePolicy = vpnGatewayConnectionIkePolicyPatchModel vpnGatewayConnectionPatchModel.IpsecPolicy = vpnGatewayConnectionIPsecPolicyPatchModel vpnGatewayConnectionPatchModel.Name = core.StringPtr("my-vpn-connection") - vpnGatewayConnectionPatchModel.PeerAddress = core.StringPtr("169.21.50.5") + vpnGatewayConnectionPatchModel.Peer = vpnGatewayConnectionPeerPatchModel vpnGatewayConnectionPatchModel.Psk = core.StringPtr("lkj14b1oi0alcniejkso") vpnGatewayConnectionPatchModel.RoutingProtocol = core.StringPtr("none") vpnGatewayConnectionPatchModelAsPatch, asPatchErr := vpnGatewayConnectionPatchModel.AsPatch() @@ -82193,16 +82299,16 @@ var _ = Describe(`VpcV1`, func() { }) }) }) - Describe(`ListVPNGatewayConnectionLocalCIDRs(listVPNGatewayConnectionLocalCIDRsOptions *ListVPNGatewayConnectionLocalCIDRsOptions) - Operation response error`, func() { + Describe(`ListVPNGatewayConnectionsLocalCIDRs(listVPNGatewayConnectionsLocalCIDRsOptions *ListVPNGatewayConnectionsLocalCIDRsOptions) - Operation response error`, func() { version := "testString" - listVPNGatewayConnectionLocalCIDRsPath := "/vpn_gateways/testString/connections/testString/local_cidrs" + listVPNGatewayConnectionsLocalCIDRsPath := "/vpn_gateways/testString/connections/testString/local/cidrs" Context(`Using mock server endpoint with invalid JSON response`, func() { BeforeEach(func() { testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewayConnectionLocalCIDRsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewayConnectionsLocalCIDRsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) @@ -82211,7 +82317,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprint(res, `} this is not valid json {`) })) }) - It(`Invoke ListVPNGatewayConnectionLocalCIDRs with error: Operation response processing error`, func() { + It(`Invoke ListVPNGatewayConnectionsLocalCIDRs with error: Operation response processing error`, func() { vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -82220,20 +82326,20 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) - // Construct an instance of the ListVPNGatewayConnectionLocalCIDRsOptions model - listVPNGatewayConnectionLocalCIDRsOptionsModel := new(vpcv1.ListVPNGatewayConnectionLocalCIDRsOptions) - listVPNGatewayConnectionLocalCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") - listVPNGatewayConnectionLocalCIDRsOptionsModel.ID = core.StringPtr("testString") - listVPNGatewayConnectionLocalCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the ListVPNGatewayConnectionsLocalCIDRsOptions model + listVPNGatewayConnectionsLocalCIDRsOptionsModel := new(vpcv1.ListVPNGatewayConnectionsLocalCIDRsOptions) + listVPNGatewayConnectionsLocalCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") + listVPNGatewayConnectionsLocalCIDRsOptionsModel.ID = core.StringPtr("testString") + listVPNGatewayConnectionsLocalCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Expect response parsing to fail since we are receiving a text/plain response - result, response, operationErr := vpcService.ListVPNGatewayConnectionLocalCIDRs(listVPNGatewayConnectionLocalCIDRsOptionsModel) + result, response, operationErr := vpcService.ListVPNGatewayConnectionsLocalCIDRs(listVPNGatewayConnectionsLocalCIDRsOptionsModel) Expect(operationErr).ToNot(BeNil()) Expect(response).ToNot(BeNil()) Expect(result).To(BeNil()) // Enable retries and test again vpcService.EnableRetries(0, 0) - result, response, operationErr = vpcService.ListVPNGatewayConnectionLocalCIDRs(listVPNGatewayConnectionLocalCIDRsOptionsModel) + result, response, operationErr = vpcService.ListVPNGatewayConnectionsLocalCIDRs(listVPNGatewayConnectionsLocalCIDRsOptionsModel) Expect(operationErr).ToNot(BeNil()) Expect(response).ToNot(BeNil()) Expect(result).To(BeNil()) @@ -82243,16 +82349,16 @@ var _ = Describe(`VpcV1`, func() { }) }) }) - Describe(`ListVPNGatewayConnectionLocalCIDRs(listVPNGatewayConnectionLocalCIDRsOptions *ListVPNGatewayConnectionLocalCIDRsOptions)`, func() { + Describe(`ListVPNGatewayConnectionsLocalCIDRs(listVPNGatewayConnectionsLocalCIDRsOptions *ListVPNGatewayConnectionsLocalCIDRsOptions)`, func() { version := "testString" - listVPNGatewayConnectionLocalCIDRsPath := "/vpn_gateways/testString/connections/testString/local_cidrs" + listVPNGatewayConnectionsLocalCIDRsPath := "/vpn_gateways/testString/connections/testString/local/cidrs" Context(`Using mock server endpoint with timeout`, func() { BeforeEach(func() { testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewayConnectionLocalCIDRsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewayConnectionsLocalCIDRsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -82263,10 +82369,10 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"local_cidrs": ["192.168.1.0/24"]}`) + fmt.Fprintf(res, "%s", `{"cidrs": ["192.168.1.0/24"]}`) })) }) - It(`Invoke ListVPNGatewayConnectionLocalCIDRs successfully with retries`, func() { + It(`Invoke ListVPNGatewayConnectionsLocalCIDRs successfully with retries`, func() { vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -82276,22 +82382,22 @@ var _ = Describe(`VpcV1`, func() { Expect(vpcService).ToNot(BeNil()) vpcService.EnableRetries(0, 0) - // Construct an instance of the ListVPNGatewayConnectionLocalCIDRsOptions model - listVPNGatewayConnectionLocalCIDRsOptionsModel := new(vpcv1.ListVPNGatewayConnectionLocalCIDRsOptions) - listVPNGatewayConnectionLocalCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") - listVPNGatewayConnectionLocalCIDRsOptionsModel.ID = core.StringPtr("testString") - listVPNGatewayConnectionLocalCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the ListVPNGatewayConnectionsLocalCIDRsOptions model + listVPNGatewayConnectionsLocalCIDRsOptionsModel := new(vpcv1.ListVPNGatewayConnectionsLocalCIDRsOptions) + listVPNGatewayConnectionsLocalCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") + listVPNGatewayConnectionsLocalCIDRsOptionsModel.ID = core.StringPtr("testString") + listVPNGatewayConnectionsLocalCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with a Context to test a timeout error ctx, cancelFunc := context.WithTimeout(context.Background(), 80*time.Millisecond) defer cancelFunc() - _, _, operationErr := vpcService.ListVPNGatewayConnectionLocalCIDRsWithContext(ctx, listVPNGatewayConnectionLocalCIDRsOptionsModel) + _, _, operationErr := vpcService.ListVPNGatewayConnectionsLocalCIDRsWithContext(ctx, listVPNGatewayConnectionsLocalCIDRsOptionsModel) Expect(operationErr).ToNot(BeNil()) Expect(operationErr.Error()).To(ContainSubstring("deadline exceeded")) // Disable retries and test again vpcService.DisableRetries() - result, response, operationErr := vpcService.ListVPNGatewayConnectionLocalCIDRs(listVPNGatewayConnectionLocalCIDRsOptionsModel) + result, response, operationErr := vpcService.ListVPNGatewayConnectionsLocalCIDRs(listVPNGatewayConnectionsLocalCIDRsOptionsModel) Expect(operationErr).To(BeNil()) Expect(response).ToNot(BeNil()) Expect(result).ToNot(BeNil()) @@ -82299,7 +82405,7 @@ var _ = Describe(`VpcV1`, func() { // Re-test the timeout error with retries disabled ctx, cancelFunc2 := context.WithTimeout(context.Background(), 80*time.Millisecond) defer cancelFunc2() - _, _, operationErr = vpcService.ListVPNGatewayConnectionLocalCIDRsWithContext(ctx, listVPNGatewayConnectionLocalCIDRsOptionsModel) + _, _, operationErr = vpcService.ListVPNGatewayConnectionsLocalCIDRsWithContext(ctx, listVPNGatewayConnectionsLocalCIDRsOptionsModel) Expect(operationErr).ToNot(BeNil()) Expect(operationErr.Error()).To(ContainSubstring("deadline exceeded")) }) @@ -82313,7 +82419,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewayConnectionLocalCIDRsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewayConnectionsLocalCIDRsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -82321,10 +82427,10 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"local_cidrs": ["192.168.1.0/24"]}`) + fmt.Fprintf(res, "%s", `{"cidrs": ["192.168.1.0/24"]}`) })) }) - It(`Invoke ListVPNGatewayConnectionLocalCIDRs successfully`, func() { + It(`Invoke ListVPNGatewayConnectionsLocalCIDRs successfully`, func() { vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -82334,25 +82440,25 @@ var _ = Describe(`VpcV1`, func() { Expect(vpcService).ToNot(BeNil()) // Invoke operation with nil options model (negative test) - result, response, operationErr := vpcService.ListVPNGatewayConnectionLocalCIDRs(nil) + result, response, operationErr := vpcService.ListVPNGatewayConnectionsLocalCIDRs(nil) Expect(operationErr).NotTo(BeNil()) Expect(response).To(BeNil()) Expect(result).To(BeNil()) - // Construct an instance of the ListVPNGatewayConnectionLocalCIDRsOptions model - listVPNGatewayConnectionLocalCIDRsOptionsModel := new(vpcv1.ListVPNGatewayConnectionLocalCIDRsOptions) - listVPNGatewayConnectionLocalCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") - listVPNGatewayConnectionLocalCIDRsOptionsModel.ID = core.StringPtr("testString") - listVPNGatewayConnectionLocalCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the ListVPNGatewayConnectionsLocalCIDRsOptions model + listVPNGatewayConnectionsLocalCIDRsOptionsModel := new(vpcv1.ListVPNGatewayConnectionsLocalCIDRsOptions) + listVPNGatewayConnectionsLocalCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") + listVPNGatewayConnectionsLocalCIDRsOptionsModel.ID = core.StringPtr("testString") + listVPNGatewayConnectionsLocalCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) - result, response, operationErr = vpcService.ListVPNGatewayConnectionLocalCIDRs(listVPNGatewayConnectionLocalCIDRsOptionsModel) + result, response, operationErr = vpcService.ListVPNGatewayConnectionsLocalCIDRs(listVPNGatewayConnectionsLocalCIDRsOptionsModel) Expect(operationErr).To(BeNil()) Expect(response).ToNot(BeNil()) Expect(result).ToNot(BeNil()) }) - It(`Invoke ListVPNGatewayConnectionLocalCIDRs with error: Operation validation and request error`, func() { + It(`Invoke ListVPNGatewayConnectionsLocalCIDRs with error: Operation validation and request error`, func() { vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -82361,23 +82467,23 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) - // Construct an instance of the ListVPNGatewayConnectionLocalCIDRsOptions model - listVPNGatewayConnectionLocalCIDRsOptionsModel := new(vpcv1.ListVPNGatewayConnectionLocalCIDRsOptions) - listVPNGatewayConnectionLocalCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") - listVPNGatewayConnectionLocalCIDRsOptionsModel.ID = core.StringPtr("testString") - listVPNGatewayConnectionLocalCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the ListVPNGatewayConnectionsLocalCIDRsOptions model + listVPNGatewayConnectionsLocalCIDRsOptionsModel := new(vpcv1.ListVPNGatewayConnectionsLocalCIDRsOptions) + listVPNGatewayConnectionsLocalCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") + listVPNGatewayConnectionsLocalCIDRsOptionsModel.ID = core.StringPtr("testString") + listVPNGatewayConnectionsLocalCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") Expect(err).To(BeNil()) - result, response, operationErr := vpcService.ListVPNGatewayConnectionLocalCIDRs(listVPNGatewayConnectionLocalCIDRsOptionsModel) + result, response, operationErr := vpcService.ListVPNGatewayConnectionsLocalCIDRs(listVPNGatewayConnectionsLocalCIDRsOptionsModel) Expect(operationErr).ToNot(BeNil()) Expect(operationErr.Error()).To(ContainSubstring(core.ERRORMSG_SERVICE_URL_MISSING)) Expect(response).To(BeNil()) Expect(result).To(BeNil()) - // Construct a second instance of the ListVPNGatewayConnectionLocalCIDRsOptions model with no property values - listVPNGatewayConnectionLocalCIDRsOptionsModelNew := new(vpcv1.ListVPNGatewayConnectionLocalCIDRsOptions) + // Construct a second instance of the ListVPNGatewayConnectionsLocalCIDRsOptions model with no property values + listVPNGatewayConnectionsLocalCIDRsOptionsModelNew := new(vpcv1.ListVPNGatewayConnectionsLocalCIDRsOptions) // Invoke operation with invalid model (negative test) - result, response, operationErr = vpcService.ListVPNGatewayConnectionLocalCIDRs(listVPNGatewayConnectionLocalCIDRsOptionsModelNew) + result, response, operationErr = vpcService.ListVPNGatewayConnectionsLocalCIDRs(listVPNGatewayConnectionsLocalCIDRsOptionsModelNew) Expect(operationErr).ToNot(BeNil()) Expect(response).To(BeNil()) Expect(result).To(BeNil()) @@ -82395,7 +82501,7 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) })) }) - It(`Invoke ListVPNGatewayConnectionLocalCIDRs successfully`, func() { + It(`Invoke ListVPNGatewayConnectionsLocalCIDRs successfully`, func() { vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -82404,14 +82510,14 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) - // Construct an instance of the ListVPNGatewayConnectionLocalCIDRsOptions model - listVPNGatewayConnectionLocalCIDRsOptionsModel := new(vpcv1.ListVPNGatewayConnectionLocalCIDRsOptions) - listVPNGatewayConnectionLocalCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") - listVPNGatewayConnectionLocalCIDRsOptionsModel.ID = core.StringPtr("testString") - listVPNGatewayConnectionLocalCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the ListVPNGatewayConnectionsLocalCIDRsOptions model + listVPNGatewayConnectionsLocalCIDRsOptionsModel := new(vpcv1.ListVPNGatewayConnectionsLocalCIDRsOptions) + listVPNGatewayConnectionsLocalCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") + listVPNGatewayConnectionsLocalCIDRsOptionsModel.ID = core.StringPtr("testString") + listVPNGatewayConnectionsLocalCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation - result, response, operationErr := vpcService.ListVPNGatewayConnectionLocalCIDRs(listVPNGatewayConnectionLocalCIDRsOptionsModel) + result, response, operationErr := vpcService.ListVPNGatewayConnectionsLocalCIDRs(listVPNGatewayConnectionsLocalCIDRsOptionsModel) Expect(operationErr).To(BeNil()) Expect(response).ToNot(BeNil()) @@ -82423,16 +82529,16 @@ var _ = Describe(`VpcV1`, func() { }) }) }) - Describe(`RemoveVPNGatewayConnectionLocalCIDR(removeVPNGatewayConnectionLocalCIDROptions *RemoveVPNGatewayConnectionLocalCIDROptions)`, func() { + Describe(`RemoveVPNGatewayConnectionsLocalCIDR(removeVPNGatewayConnectionsLocalCIDROptions *RemoveVPNGatewayConnectionsLocalCIDROptions)`, func() { version := "testString" - removeVPNGatewayConnectionLocalCIDRPath := "/vpn_gateways/testString/connections/testString/local_cidrs/testString/testString" + removeVPNGatewayConnectionsLocalCIDRPath := "/vpn_gateways/testString/connections/testString/local/cidrs/192.168.1.0/24" Context(`Using mock server endpoint`, func() { BeforeEach(func() { testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.EscapedPath()).To(Equal(removeVPNGatewayConnectionLocalCIDRPath)) + Expect(req.URL.Path).To(Equal(removeVPNGatewayConnectionsLocalCIDRPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -82440,7 +82546,7 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(204) })) }) - It(`Invoke RemoveVPNGatewayConnectionLocalCIDR successfully`, func() { + It(`Invoke RemoveVPNGatewayConnectionsLocalCIDR successfully`, func() { vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -82450,24 +82556,23 @@ var _ = Describe(`VpcV1`, func() { Expect(vpcService).ToNot(BeNil()) // Invoke operation with nil options model (negative test) - response, operationErr := vpcService.RemoveVPNGatewayConnectionLocalCIDR(nil) + response, operationErr := vpcService.RemoveVPNGatewayConnectionsLocalCIDR(nil) Expect(operationErr).NotTo(BeNil()) Expect(response).To(BeNil()) - // Construct an instance of the RemoveVPNGatewayConnectionLocalCIDROptions model - removeVPNGatewayConnectionLocalCIDROptionsModel := new(vpcv1.RemoveVPNGatewayConnectionLocalCIDROptions) - removeVPNGatewayConnectionLocalCIDROptionsModel.VPNGatewayID = core.StringPtr("testString") - removeVPNGatewayConnectionLocalCIDROptionsModel.ID = core.StringPtr("testString") - removeVPNGatewayConnectionLocalCIDROptionsModel.CIDRPrefix = core.StringPtr("testString") - removeVPNGatewayConnectionLocalCIDROptionsModel.PrefixLength = core.StringPtr("testString") - removeVPNGatewayConnectionLocalCIDROptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the RemoveVPNGatewayConnectionsLocalCIDROptions model + removeVPNGatewayConnectionsLocalCIDROptionsModel := new(vpcv1.RemoveVPNGatewayConnectionsLocalCIDROptions) + removeVPNGatewayConnectionsLocalCIDROptionsModel.VPNGatewayID = core.StringPtr("testString") + removeVPNGatewayConnectionsLocalCIDROptionsModel.ID = core.StringPtr("testString") + removeVPNGatewayConnectionsLocalCIDROptionsModel.CIDR = core.StringPtr("192.168.1.0/24") + removeVPNGatewayConnectionsLocalCIDROptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) - response, operationErr = vpcService.RemoveVPNGatewayConnectionLocalCIDR(removeVPNGatewayConnectionLocalCIDROptionsModel) + response, operationErr = vpcService.RemoveVPNGatewayConnectionsLocalCIDR(removeVPNGatewayConnectionsLocalCIDROptionsModel) Expect(operationErr).To(BeNil()) Expect(response).ToNot(BeNil()) }) - It(`Invoke RemoveVPNGatewayConnectionLocalCIDR with error: Operation validation and request error`, func() { + It(`Invoke RemoveVPNGatewayConnectionsLocalCIDR with error: Operation validation and request error`, func() { vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -82476,24 +82581,23 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) - // Construct an instance of the RemoveVPNGatewayConnectionLocalCIDROptions model - removeVPNGatewayConnectionLocalCIDROptionsModel := new(vpcv1.RemoveVPNGatewayConnectionLocalCIDROptions) - removeVPNGatewayConnectionLocalCIDROptionsModel.VPNGatewayID = core.StringPtr("testString") - removeVPNGatewayConnectionLocalCIDROptionsModel.ID = core.StringPtr("testString") - removeVPNGatewayConnectionLocalCIDROptionsModel.CIDRPrefix = core.StringPtr("testString") - removeVPNGatewayConnectionLocalCIDROptionsModel.PrefixLength = core.StringPtr("testString") - removeVPNGatewayConnectionLocalCIDROptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the RemoveVPNGatewayConnectionsLocalCIDROptions model + removeVPNGatewayConnectionsLocalCIDROptionsModel := new(vpcv1.RemoveVPNGatewayConnectionsLocalCIDROptions) + removeVPNGatewayConnectionsLocalCIDROptionsModel.VPNGatewayID = core.StringPtr("testString") + removeVPNGatewayConnectionsLocalCIDROptionsModel.ID = core.StringPtr("testString") + removeVPNGatewayConnectionsLocalCIDROptionsModel.CIDR = core.StringPtr("192.168.1.0/24") + removeVPNGatewayConnectionsLocalCIDROptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") Expect(err).To(BeNil()) - response, operationErr := vpcService.RemoveVPNGatewayConnectionLocalCIDR(removeVPNGatewayConnectionLocalCIDROptionsModel) + response, operationErr := vpcService.RemoveVPNGatewayConnectionsLocalCIDR(removeVPNGatewayConnectionsLocalCIDROptionsModel) Expect(operationErr).ToNot(BeNil()) Expect(operationErr.Error()).To(ContainSubstring(core.ERRORMSG_SERVICE_URL_MISSING)) Expect(response).To(BeNil()) - // Construct a second instance of the RemoveVPNGatewayConnectionLocalCIDROptions model with no property values - removeVPNGatewayConnectionLocalCIDROptionsModelNew := new(vpcv1.RemoveVPNGatewayConnectionLocalCIDROptions) + // Construct a second instance of the RemoveVPNGatewayConnectionsLocalCIDROptions model with no property values + removeVPNGatewayConnectionsLocalCIDROptionsModelNew := new(vpcv1.RemoveVPNGatewayConnectionsLocalCIDROptions) // Invoke operation with invalid model (negative test) - response, operationErr = vpcService.RemoveVPNGatewayConnectionLocalCIDR(removeVPNGatewayConnectionLocalCIDROptionsModelNew) + response, operationErr = vpcService.RemoveVPNGatewayConnectionsLocalCIDR(removeVPNGatewayConnectionsLocalCIDROptionsModelNew) Expect(operationErr).ToNot(BeNil()) Expect(response).To(BeNil()) }) @@ -82502,16 +82606,16 @@ var _ = Describe(`VpcV1`, func() { }) }) }) - Describe(`CheckVPNGatewayConnectionLocalCIDR(checkVPNGatewayConnectionLocalCIDROptions *CheckVPNGatewayConnectionLocalCIDROptions)`, func() { + Describe(`CheckVPNGatewayConnectionsLocalCIDR(checkVPNGatewayConnectionsLocalCIDROptions *CheckVPNGatewayConnectionsLocalCIDROptions)`, func() { version := "testString" - checkVPNGatewayConnectionLocalCIDRPath := "/vpn_gateways/testString/connections/testString/local_cidrs/testString/testString" + checkVPNGatewayConnectionsLocalCIDRPath := "/vpn_gateways/testString/connections/testString/local/cidrs/192.168.1.0/24" Context(`Using mock server endpoint`, func() { BeforeEach(func() { testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.EscapedPath()).To(Equal(checkVPNGatewayConnectionLocalCIDRPath)) + Expect(req.URL.Path).To(Equal(checkVPNGatewayConnectionsLocalCIDRPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -82519,7 +82623,7 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(204) })) }) - It(`Invoke CheckVPNGatewayConnectionLocalCIDR successfully`, func() { + It(`Invoke CheckVPNGatewayConnectionsLocalCIDR successfully`, func() { vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -82529,24 +82633,23 @@ var _ = Describe(`VpcV1`, func() { Expect(vpcService).ToNot(BeNil()) // Invoke operation with nil options model (negative test) - response, operationErr := vpcService.CheckVPNGatewayConnectionLocalCIDR(nil) + response, operationErr := vpcService.CheckVPNGatewayConnectionsLocalCIDR(nil) Expect(operationErr).NotTo(BeNil()) Expect(response).To(BeNil()) - // Construct an instance of the CheckVPNGatewayConnectionLocalCIDROptions model - checkVPNGatewayConnectionLocalCIDROptionsModel := new(vpcv1.CheckVPNGatewayConnectionLocalCIDROptions) - checkVPNGatewayConnectionLocalCIDROptionsModel.VPNGatewayID = core.StringPtr("testString") - checkVPNGatewayConnectionLocalCIDROptionsModel.ID = core.StringPtr("testString") - checkVPNGatewayConnectionLocalCIDROptionsModel.CIDRPrefix = core.StringPtr("testString") - checkVPNGatewayConnectionLocalCIDROptionsModel.PrefixLength = core.StringPtr("testString") - checkVPNGatewayConnectionLocalCIDROptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the CheckVPNGatewayConnectionsLocalCIDROptions model + checkVPNGatewayConnectionsLocalCIDROptionsModel := new(vpcv1.CheckVPNGatewayConnectionsLocalCIDROptions) + checkVPNGatewayConnectionsLocalCIDROptionsModel.VPNGatewayID = core.StringPtr("testString") + checkVPNGatewayConnectionsLocalCIDROptionsModel.ID = core.StringPtr("testString") + checkVPNGatewayConnectionsLocalCIDROptionsModel.CIDR = core.StringPtr("192.168.1.0/24") + checkVPNGatewayConnectionsLocalCIDROptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) - response, operationErr = vpcService.CheckVPNGatewayConnectionLocalCIDR(checkVPNGatewayConnectionLocalCIDROptionsModel) + response, operationErr = vpcService.CheckVPNGatewayConnectionsLocalCIDR(checkVPNGatewayConnectionsLocalCIDROptionsModel) Expect(operationErr).To(BeNil()) Expect(response).ToNot(BeNil()) }) - It(`Invoke CheckVPNGatewayConnectionLocalCIDR with error: Operation validation and request error`, func() { + It(`Invoke CheckVPNGatewayConnectionsLocalCIDR with error: Operation validation and request error`, func() { vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -82555,24 +82658,23 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) - // Construct an instance of the CheckVPNGatewayConnectionLocalCIDROptions model - checkVPNGatewayConnectionLocalCIDROptionsModel := new(vpcv1.CheckVPNGatewayConnectionLocalCIDROptions) - checkVPNGatewayConnectionLocalCIDROptionsModel.VPNGatewayID = core.StringPtr("testString") - checkVPNGatewayConnectionLocalCIDROptionsModel.ID = core.StringPtr("testString") - checkVPNGatewayConnectionLocalCIDROptionsModel.CIDRPrefix = core.StringPtr("testString") - checkVPNGatewayConnectionLocalCIDROptionsModel.PrefixLength = core.StringPtr("testString") - checkVPNGatewayConnectionLocalCIDROptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the CheckVPNGatewayConnectionsLocalCIDROptions model + checkVPNGatewayConnectionsLocalCIDROptionsModel := new(vpcv1.CheckVPNGatewayConnectionsLocalCIDROptions) + checkVPNGatewayConnectionsLocalCIDROptionsModel.VPNGatewayID = core.StringPtr("testString") + checkVPNGatewayConnectionsLocalCIDROptionsModel.ID = core.StringPtr("testString") + checkVPNGatewayConnectionsLocalCIDROptionsModel.CIDR = core.StringPtr("192.168.1.0/24") + checkVPNGatewayConnectionsLocalCIDROptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") Expect(err).To(BeNil()) - response, operationErr := vpcService.CheckVPNGatewayConnectionLocalCIDR(checkVPNGatewayConnectionLocalCIDROptionsModel) + response, operationErr := vpcService.CheckVPNGatewayConnectionsLocalCIDR(checkVPNGatewayConnectionsLocalCIDROptionsModel) Expect(operationErr).ToNot(BeNil()) Expect(operationErr.Error()).To(ContainSubstring(core.ERRORMSG_SERVICE_URL_MISSING)) Expect(response).To(BeNil()) - // Construct a second instance of the CheckVPNGatewayConnectionLocalCIDROptions model with no property values - checkVPNGatewayConnectionLocalCIDROptionsModelNew := new(vpcv1.CheckVPNGatewayConnectionLocalCIDROptions) + // Construct a second instance of the CheckVPNGatewayConnectionsLocalCIDROptions model with no property values + checkVPNGatewayConnectionsLocalCIDROptionsModelNew := new(vpcv1.CheckVPNGatewayConnectionsLocalCIDROptions) // Invoke operation with invalid model (negative test) - response, operationErr = vpcService.CheckVPNGatewayConnectionLocalCIDR(checkVPNGatewayConnectionLocalCIDROptionsModelNew) + response, operationErr = vpcService.CheckVPNGatewayConnectionsLocalCIDR(checkVPNGatewayConnectionsLocalCIDROptionsModelNew) Expect(operationErr).ToNot(BeNil()) Expect(response).To(BeNil()) }) @@ -82581,24 +82683,24 @@ var _ = Describe(`VpcV1`, func() { }) }) }) - Describe(`AddVPNGatewayConnectionLocalCIDR(addVPNGatewayConnectionLocalCIDROptions *AddVPNGatewayConnectionLocalCIDROptions)`, func() { + Describe(`AddVPNGatewayConnectionsLocalCIDR(addVPNGatewayConnectionsLocalCIDROptions *AddVPNGatewayConnectionsLocalCIDROptions)`, func() { version := "testString" - addVPNGatewayConnectionLocalCIDRPath := "/vpn_gateways/testString/connections/testString/local_cidrs/testString/testString" + addVPNGatewayConnectionsLocalCIDRPath := "/vpn_gateways/testString/connections/testString/local/cidrs/192.168.1.0/24" Context(`Using mock server endpoint`, func() { BeforeEach(func() { testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.EscapedPath()).To(Equal(addVPNGatewayConnectionLocalCIDRPath)) + Expect(req.URL.Path).To(Equal(addVPNGatewayConnectionsLocalCIDRPath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) + res.WriteHeader(201) })) }) - It(`Invoke AddVPNGatewayConnectionLocalCIDR successfully`, func() { + It(`Invoke AddVPNGatewayConnectionsLocalCIDR successfully`, func() { vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -82608,24 +82710,23 @@ var _ = Describe(`VpcV1`, func() { Expect(vpcService).ToNot(BeNil()) // Invoke operation with nil options model (negative test) - response, operationErr := vpcService.AddVPNGatewayConnectionLocalCIDR(nil) + response, operationErr := vpcService.AddVPNGatewayConnectionsLocalCIDR(nil) Expect(operationErr).NotTo(BeNil()) Expect(response).To(BeNil()) - // Construct an instance of the AddVPNGatewayConnectionLocalCIDROptions model - addVPNGatewayConnectionLocalCIDROptionsModel := new(vpcv1.AddVPNGatewayConnectionLocalCIDROptions) - addVPNGatewayConnectionLocalCIDROptionsModel.VPNGatewayID = core.StringPtr("testString") - addVPNGatewayConnectionLocalCIDROptionsModel.ID = core.StringPtr("testString") - addVPNGatewayConnectionLocalCIDROptionsModel.CIDRPrefix = core.StringPtr("testString") - addVPNGatewayConnectionLocalCIDROptionsModel.PrefixLength = core.StringPtr("testString") - addVPNGatewayConnectionLocalCIDROptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the AddVPNGatewayConnectionsLocalCIDROptions model + addVPNGatewayConnectionsLocalCIDROptionsModel := new(vpcv1.AddVPNGatewayConnectionsLocalCIDROptions) + addVPNGatewayConnectionsLocalCIDROptionsModel.VPNGatewayID = core.StringPtr("testString") + addVPNGatewayConnectionsLocalCIDROptionsModel.ID = core.StringPtr("testString") + addVPNGatewayConnectionsLocalCIDROptionsModel.CIDR = core.StringPtr("192.168.1.0/24") + addVPNGatewayConnectionsLocalCIDROptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) - response, operationErr = vpcService.AddVPNGatewayConnectionLocalCIDR(addVPNGatewayConnectionLocalCIDROptionsModel) + response, operationErr = vpcService.AddVPNGatewayConnectionsLocalCIDR(addVPNGatewayConnectionsLocalCIDROptionsModel) Expect(operationErr).To(BeNil()) Expect(response).ToNot(BeNil()) }) - It(`Invoke AddVPNGatewayConnectionLocalCIDR with error: Operation validation and request error`, func() { + It(`Invoke AddVPNGatewayConnectionsLocalCIDR with error: Operation validation and request error`, func() { vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -82634,24 +82735,23 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) - // Construct an instance of the AddVPNGatewayConnectionLocalCIDROptions model - addVPNGatewayConnectionLocalCIDROptionsModel := new(vpcv1.AddVPNGatewayConnectionLocalCIDROptions) - addVPNGatewayConnectionLocalCIDROptionsModel.VPNGatewayID = core.StringPtr("testString") - addVPNGatewayConnectionLocalCIDROptionsModel.ID = core.StringPtr("testString") - addVPNGatewayConnectionLocalCIDROptionsModel.CIDRPrefix = core.StringPtr("testString") - addVPNGatewayConnectionLocalCIDROptionsModel.PrefixLength = core.StringPtr("testString") - addVPNGatewayConnectionLocalCIDROptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the AddVPNGatewayConnectionsLocalCIDROptions model + addVPNGatewayConnectionsLocalCIDROptionsModel := new(vpcv1.AddVPNGatewayConnectionsLocalCIDROptions) + addVPNGatewayConnectionsLocalCIDROptionsModel.VPNGatewayID = core.StringPtr("testString") + addVPNGatewayConnectionsLocalCIDROptionsModel.ID = core.StringPtr("testString") + addVPNGatewayConnectionsLocalCIDROptionsModel.CIDR = core.StringPtr("192.168.1.0/24") + addVPNGatewayConnectionsLocalCIDROptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") Expect(err).To(BeNil()) - response, operationErr := vpcService.AddVPNGatewayConnectionLocalCIDR(addVPNGatewayConnectionLocalCIDROptionsModel) + response, operationErr := vpcService.AddVPNGatewayConnectionsLocalCIDR(addVPNGatewayConnectionsLocalCIDROptionsModel) Expect(operationErr).ToNot(BeNil()) Expect(operationErr.Error()).To(ContainSubstring(core.ERRORMSG_SERVICE_URL_MISSING)) Expect(response).To(BeNil()) - // Construct a second instance of the AddVPNGatewayConnectionLocalCIDROptions model with no property values - addVPNGatewayConnectionLocalCIDROptionsModelNew := new(vpcv1.AddVPNGatewayConnectionLocalCIDROptions) + // Construct a second instance of the AddVPNGatewayConnectionsLocalCIDROptions model with no property values + addVPNGatewayConnectionsLocalCIDROptionsModelNew := new(vpcv1.AddVPNGatewayConnectionsLocalCIDROptions) // Invoke operation with invalid model (negative test) - response, operationErr = vpcService.AddVPNGatewayConnectionLocalCIDR(addVPNGatewayConnectionLocalCIDROptionsModelNew) + response, operationErr = vpcService.AddVPNGatewayConnectionsLocalCIDR(addVPNGatewayConnectionsLocalCIDROptionsModelNew) Expect(operationErr).ToNot(BeNil()) Expect(response).To(BeNil()) }) @@ -82660,16 +82760,16 @@ var _ = Describe(`VpcV1`, func() { }) }) }) - Describe(`ListVPNGatewayConnectionPeerCIDRs(listVPNGatewayConnectionPeerCIDRsOptions *ListVPNGatewayConnectionPeerCIDRsOptions) - Operation response error`, func() { + Describe(`ListVPNGatewayConnectionsPeerCIDRs(listVPNGatewayConnectionsPeerCIDRsOptions *ListVPNGatewayConnectionsPeerCIDRsOptions) - Operation response error`, func() { version := "testString" - listVPNGatewayConnectionPeerCIDRsPath := "/vpn_gateways/testString/connections/testString/peer_cidrs" + listVPNGatewayConnectionsPeerCIDRsPath := "/vpn_gateways/testString/connections/testString/peer/cidrs" Context(`Using mock server endpoint with invalid JSON response`, func() { BeforeEach(func() { testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewayConnectionPeerCIDRsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewayConnectionsPeerCIDRsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) @@ -82678,7 +82778,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprint(res, `} this is not valid json {`) })) }) - It(`Invoke ListVPNGatewayConnectionPeerCIDRs with error: Operation response processing error`, func() { + It(`Invoke ListVPNGatewayConnectionsPeerCIDRs with error: Operation response processing error`, func() { vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -82687,20 +82787,20 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) - // Construct an instance of the ListVPNGatewayConnectionPeerCIDRsOptions model - listVPNGatewayConnectionPeerCIDRsOptionsModel := new(vpcv1.ListVPNGatewayConnectionPeerCIDRsOptions) - listVPNGatewayConnectionPeerCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") - listVPNGatewayConnectionPeerCIDRsOptionsModel.ID = core.StringPtr("testString") - listVPNGatewayConnectionPeerCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the ListVPNGatewayConnectionsPeerCIDRsOptions model + listVPNGatewayConnectionsPeerCIDRsOptionsModel := new(vpcv1.ListVPNGatewayConnectionsPeerCIDRsOptions) + listVPNGatewayConnectionsPeerCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") + listVPNGatewayConnectionsPeerCIDRsOptionsModel.ID = core.StringPtr("testString") + listVPNGatewayConnectionsPeerCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Expect response parsing to fail since we are receiving a text/plain response - result, response, operationErr := vpcService.ListVPNGatewayConnectionPeerCIDRs(listVPNGatewayConnectionPeerCIDRsOptionsModel) + result, response, operationErr := vpcService.ListVPNGatewayConnectionsPeerCIDRs(listVPNGatewayConnectionsPeerCIDRsOptionsModel) Expect(operationErr).ToNot(BeNil()) Expect(response).ToNot(BeNil()) Expect(result).To(BeNil()) // Enable retries and test again vpcService.EnableRetries(0, 0) - result, response, operationErr = vpcService.ListVPNGatewayConnectionPeerCIDRs(listVPNGatewayConnectionPeerCIDRsOptionsModel) + result, response, operationErr = vpcService.ListVPNGatewayConnectionsPeerCIDRs(listVPNGatewayConnectionsPeerCIDRsOptionsModel) Expect(operationErr).ToNot(BeNil()) Expect(response).ToNot(BeNil()) Expect(result).To(BeNil()) @@ -82710,16 +82810,16 @@ var _ = Describe(`VpcV1`, func() { }) }) }) - Describe(`ListVPNGatewayConnectionPeerCIDRs(listVPNGatewayConnectionPeerCIDRsOptions *ListVPNGatewayConnectionPeerCIDRsOptions)`, func() { + Describe(`ListVPNGatewayConnectionsPeerCIDRs(listVPNGatewayConnectionsPeerCIDRsOptions *ListVPNGatewayConnectionsPeerCIDRsOptions)`, func() { version := "testString" - listVPNGatewayConnectionPeerCIDRsPath := "/vpn_gateways/testString/connections/testString/peer_cidrs" + listVPNGatewayConnectionsPeerCIDRsPath := "/vpn_gateways/testString/connections/testString/peer/cidrs" Context(`Using mock server endpoint with timeout`, func() { BeforeEach(func() { testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewayConnectionPeerCIDRsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewayConnectionsPeerCIDRsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -82730,10 +82830,10 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"peer_cidrs": ["10.45.1.0/24"]}`) + fmt.Fprintf(res, "%s", `{"cidrs": ["192.168.1.0/24"]}`) })) }) - It(`Invoke ListVPNGatewayConnectionPeerCIDRs successfully with retries`, func() { + It(`Invoke ListVPNGatewayConnectionsPeerCIDRs successfully with retries`, func() { vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -82743,22 +82843,22 @@ var _ = Describe(`VpcV1`, func() { Expect(vpcService).ToNot(BeNil()) vpcService.EnableRetries(0, 0) - // Construct an instance of the ListVPNGatewayConnectionPeerCIDRsOptions model - listVPNGatewayConnectionPeerCIDRsOptionsModel := new(vpcv1.ListVPNGatewayConnectionPeerCIDRsOptions) - listVPNGatewayConnectionPeerCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") - listVPNGatewayConnectionPeerCIDRsOptionsModel.ID = core.StringPtr("testString") - listVPNGatewayConnectionPeerCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the ListVPNGatewayConnectionsPeerCIDRsOptions model + listVPNGatewayConnectionsPeerCIDRsOptionsModel := new(vpcv1.ListVPNGatewayConnectionsPeerCIDRsOptions) + listVPNGatewayConnectionsPeerCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") + listVPNGatewayConnectionsPeerCIDRsOptionsModel.ID = core.StringPtr("testString") + listVPNGatewayConnectionsPeerCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with a Context to test a timeout error ctx, cancelFunc := context.WithTimeout(context.Background(), 80*time.Millisecond) defer cancelFunc() - _, _, operationErr := vpcService.ListVPNGatewayConnectionPeerCIDRsWithContext(ctx, listVPNGatewayConnectionPeerCIDRsOptionsModel) + _, _, operationErr := vpcService.ListVPNGatewayConnectionsPeerCIDRsWithContext(ctx, listVPNGatewayConnectionsPeerCIDRsOptionsModel) Expect(operationErr).ToNot(BeNil()) Expect(operationErr.Error()).To(ContainSubstring("deadline exceeded")) // Disable retries and test again vpcService.DisableRetries() - result, response, operationErr := vpcService.ListVPNGatewayConnectionPeerCIDRs(listVPNGatewayConnectionPeerCIDRsOptionsModel) + result, response, operationErr := vpcService.ListVPNGatewayConnectionsPeerCIDRs(listVPNGatewayConnectionsPeerCIDRsOptionsModel) Expect(operationErr).To(BeNil()) Expect(response).ToNot(BeNil()) Expect(result).ToNot(BeNil()) @@ -82766,7 +82866,7 @@ var _ = Describe(`VpcV1`, func() { // Re-test the timeout error with retries disabled ctx, cancelFunc2 := context.WithTimeout(context.Background(), 80*time.Millisecond) defer cancelFunc2() - _, _, operationErr = vpcService.ListVPNGatewayConnectionPeerCIDRsWithContext(ctx, listVPNGatewayConnectionPeerCIDRsOptionsModel) + _, _, operationErr = vpcService.ListVPNGatewayConnectionsPeerCIDRsWithContext(ctx, listVPNGatewayConnectionsPeerCIDRsOptionsModel) Expect(operationErr).ToNot(BeNil()) Expect(operationErr.Error()).To(ContainSubstring("deadline exceeded")) }) @@ -82780,7 +82880,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewayConnectionPeerCIDRsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewayConnectionsPeerCIDRsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -82788,10 +82888,10 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"peer_cidrs": ["10.45.1.0/24"]}`) + fmt.Fprintf(res, "%s", `{"cidrs": ["192.168.1.0/24"]}`) })) }) - It(`Invoke ListVPNGatewayConnectionPeerCIDRs successfully`, func() { + It(`Invoke ListVPNGatewayConnectionsPeerCIDRs successfully`, func() { vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -82801,25 +82901,25 @@ var _ = Describe(`VpcV1`, func() { Expect(vpcService).ToNot(BeNil()) // Invoke operation with nil options model (negative test) - result, response, operationErr := vpcService.ListVPNGatewayConnectionPeerCIDRs(nil) + result, response, operationErr := vpcService.ListVPNGatewayConnectionsPeerCIDRs(nil) Expect(operationErr).NotTo(BeNil()) Expect(response).To(BeNil()) Expect(result).To(BeNil()) - // Construct an instance of the ListVPNGatewayConnectionPeerCIDRsOptions model - listVPNGatewayConnectionPeerCIDRsOptionsModel := new(vpcv1.ListVPNGatewayConnectionPeerCIDRsOptions) - listVPNGatewayConnectionPeerCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") - listVPNGatewayConnectionPeerCIDRsOptionsModel.ID = core.StringPtr("testString") - listVPNGatewayConnectionPeerCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the ListVPNGatewayConnectionsPeerCIDRsOptions model + listVPNGatewayConnectionsPeerCIDRsOptionsModel := new(vpcv1.ListVPNGatewayConnectionsPeerCIDRsOptions) + listVPNGatewayConnectionsPeerCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") + listVPNGatewayConnectionsPeerCIDRsOptionsModel.ID = core.StringPtr("testString") + listVPNGatewayConnectionsPeerCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) - result, response, operationErr = vpcService.ListVPNGatewayConnectionPeerCIDRs(listVPNGatewayConnectionPeerCIDRsOptionsModel) + result, response, operationErr = vpcService.ListVPNGatewayConnectionsPeerCIDRs(listVPNGatewayConnectionsPeerCIDRsOptionsModel) Expect(operationErr).To(BeNil()) Expect(response).ToNot(BeNil()) Expect(result).ToNot(BeNil()) }) - It(`Invoke ListVPNGatewayConnectionPeerCIDRs with error: Operation validation and request error`, func() { + It(`Invoke ListVPNGatewayConnectionsPeerCIDRs with error: Operation validation and request error`, func() { vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -82828,23 +82928,23 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) - // Construct an instance of the ListVPNGatewayConnectionPeerCIDRsOptions model - listVPNGatewayConnectionPeerCIDRsOptionsModel := new(vpcv1.ListVPNGatewayConnectionPeerCIDRsOptions) - listVPNGatewayConnectionPeerCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") - listVPNGatewayConnectionPeerCIDRsOptionsModel.ID = core.StringPtr("testString") - listVPNGatewayConnectionPeerCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the ListVPNGatewayConnectionsPeerCIDRsOptions model + listVPNGatewayConnectionsPeerCIDRsOptionsModel := new(vpcv1.ListVPNGatewayConnectionsPeerCIDRsOptions) + listVPNGatewayConnectionsPeerCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") + listVPNGatewayConnectionsPeerCIDRsOptionsModel.ID = core.StringPtr("testString") + listVPNGatewayConnectionsPeerCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") Expect(err).To(BeNil()) - result, response, operationErr := vpcService.ListVPNGatewayConnectionPeerCIDRs(listVPNGatewayConnectionPeerCIDRsOptionsModel) + result, response, operationErr := vpcService.ListVPNGatewayConnectionsPeerCIDRs(listVPNGatewayConnectionsPeerCIDRsOptionsModel) Expect(operationErr).ToNot(BeNil()) Expect(operationErr.Error()).To(ContainSubstring(core.ERRORMSG_SERVICE_URL_MISSING)) Expect(response).To(BeNil()) Expect(result).To(BeNil()) - // Construct a second instance of the ListVPNGatewayConnectionPeerCIDRsOptions model with no property values - listVPNGatewayConnectionPeerCIDRsOptionsModelNew := new(vpcv1.ListVPNGatewayConnectionPeerCIDRsOptions) + // Construct a second instance of the ListVPNGatewayConnectionsPeerCIDRsOptions model with no property values + listVPNGatewayConnectionsPeerCIDRsOptionsModelNew := new(vpcv1.ListVPNGatewayConnectionsPeerCIDRsOptions) // Invoke operation with invalid model (negative test) - result, response, operationErr = vpcService.ListVPNGatewayConnectionPeerCIDRs(listVPNGatewayConnectionPeerCIDRsOptionsModelNew) + result, response, operationErr = vpcService.ListVPNGatewayConnectionsPeerCIDRs(listVPNGatewayConnectionsPeerCIDRsOptionsModelNew) Expect(operationErr).ToNot(BeNil()) Expect(response).To(BeNil()) Expect(result).To(BeNil()) @@ -82862,7 +82962,7 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) })) }) - It(`Invoke ListVPNGatewayConnectionPeerCIDRs successfully`, func() { + It(`Invoke ListVPNGatewayConnectionsPeerCIDRs successfully`, func() { vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -82871,14 +82971,14 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) - // Construct an instance of the ListVPNGatewayConnectionPeerCIDRsOptions model - listVPNGatewayConnectionPeerCIDRsOptionsModel := new(vpcv1.ListVPNGatewayConnectionPeerCIDRsOptions) - listVPNGatewayConnectionPeerCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") - listVPNGatewayConnectionPeerCIDRsOptionsModel.ID = core.StringPtr("testString") - listVPNGatewayConnectionPeerCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the ListVPNGatewayConnectionsPeerCIDRsOptions model + listVPNGatewayConnectionsPeerCIDRsOptionsModel := new(vpcv1.ListVPNGatewayConnectionsPeerCIDRsOptions) + listVPNGatewayConnectionsPeerCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") + listVPNGatewayConnectionsPeerCIDRsOptionsModel.ID = core.StringPtr("testString") + listVPNGatewayConnectionsPeerCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation - result, response, operationErr := vpcService.ListVPNGatewayConnectionPeerCIDRs(listVPNGatewayConnectionPeerCIDRsOptionsModel) + result, response, operationErr := vpcService.ListVPNGatewayConnectionsPeerCIDRs(listVPNGatewayConnectionsPeerCIDRsOptionsModel) Expect(operationErr).To(BeNil()) Expect(response).ToNot(BeNil()) @@ -82890,16 +82990,16 @@ var _ = Describe(`VpcV1`, func() { }) }) }) - Describe(`RemoveVPNGatewayConnectionPeerCIDR(removeVPNGatewayConnectionPeerCIDROptions *RemoveVPNGatewayConnectionPeerCIDROptions)`, func() { + Describe(`RemoveVPNGatewayConnectionsPeerCIDR(removeVPNGatewayConnectionsPeerCIDROptions *RemoveVPNGatewayConnectionsPeerCIDROptions)`, func() { version := "testString" - removeVPNGatewayConnectionPeerCIDRPath := "/vpn_gateways/testString/connections/testString/peer_cidrs/testString/testString" + removeVPNGatewayConnectionsPeerCIDRPath := "/vpn_gateways/testString/connections/testString/peer/cidrs/192.168.1.0/24" Context(`Using mock server endpoint`, func() { BeforeEach(func() { testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.EscapedPath()).To(Equal(removeVPNGatewayConnectionPeerCIDRPath)) + Expect(req.URL.Path).To(Equal(removeVPNGatewayConnectionsPeerCIDRPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -82907,7 +83007,7 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(204) })) }) - It(`Invoke RemoveVPNGatewayConnectionPeerCIDR successfully`, func() { + It(`Invoke RemoveVPNGatewayConnectionsPeerCIDR successfully`, func() { vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -82917,24 +83017,23 @@ var _ = Describe(`VpcV1`, func() { Expect(vpcService).ToNot(BeNil()) // Invoke operation with nil options model (negative test) - response, operationErr := vpcService.RemoveVPNGatewayConnectionPeerCIDR(nil) + response, operationErr := vpcService.RemoveVPNGatewayConnectionsPeerCIDR(nil) Expect(operationErr).NotTo(BeNil()) Expect(response).To(BeNil()) - // Construct an instance of the RemoveVPNGatewayConnectionPeerCIDROptions model - removeVPNGatewayConnectionPeerCIDROptionsModel := new(vpcv1.RemoveVPNGatewayConnectionPeerCIDROptions) - removeVPNGatewayConnectionPeerCIDROptionsModel.VPNGatewayID = core.StringPtr("testString") - removeVPNGatewayConnectionPeerCIDROptionsModel.ID = core.StringPtr("testString") - removeVPNGatewayConnectionPeerCIDROptionsModel.CIDRPrefix = core.StringPtr("testString") - removeVPNGatewayConnectionPeerCIDROptionsModel.PrefixLength = core.StringPtr("testString") - removeVPNGatewayConnectionPeerCIDROptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the RemoveVPNGatewayConnectionsPeerCIDROptions model + removeVPNGatewayConnectionsPeerCIDROptionsModel := new(vpcv1.RemoveVPNGatewayConnectionsPeerCIDROptions) + removeVPNGatewayConnectionsPeerCIDROptionsModel.VPNGatewayID = core.StringPtr("testString") + removeVPNGatewayConnectionsPeerCIDROptionsModel.ID = core.StringPtr("testString") + removeVPNGatewayConnectionsPeerCIDROptionsModel.CIDR = core.StringPtr("192.168.1.0/24") + removeVPNGatewayConnectionsPeerCIDROptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) - response, operationErr = vpcService.RemoveVPNGatewayConnectionPeerCIDR(removeVPNGatewayConnectionPeerCIDROptionsModel) + response, operationErr = vpcService.RemoveVPNGatewayConnectionsPeerCIDR(removeVPNGatewayConnectionsPeerCIDROptionsModel) Expect(operationErr).To(BeNil()) Expect(response).ToNot(BeNil()) }) - It(`Invoke RemoveVPNGatewayConnectionPeerCIDR with error: Operation validation and request error`, func() { + It(`Invoke RemoveVPNGatewayConnectionsPeerCIDR with error: Operation validation and request error`, func() { vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -82943,24 +83042,23 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) - // Construct an instance of the RemoveVPNGatewayConnectionPeerCIDROptions model - removeVPNGatewayConnectionPeerCIDROptionsModel := new(vpcv1.RemoveVPNGatewayConnectionPeerCIDROptions) - removeVPNGatewayConnectionPeerCIDROptionsModel.VPNGatewayID = core.StringPtr("testString") - removeVPNGatewayConnectionPeerCIDROptionsModel.ID = core.StringPtr("testString") - removeVPNGatewayConnectionPeerCIDROptionsModel.CIDRPrefix = core.StringPtr("testString") - removeVPNGatewayConnectionPeerCIDROptionsModel.PrefixLength = core.StringPtr("testString") - removeVPNGatewayConnectionPeerCIDROptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the RemoveVPNGatewayConnectionsPeerCIDROptions model + removeVPNGatewayConnectionsPeerCIDROptionsModel := new(vpcv1.RemoveVPNGatewayConnectionsPeerCIDROptions) + removeVPNGatewayConnectionsPeerCIDROptionsModel.VPNGatewayID = core.StringPtr("testString") + removeVPNGatewayConnectionsPeerCIDROptionsModel.ID = core.StringPtr("testString") + removeVPNGatewayConnectionsPeerCIDROptionsModel.CIDR = core.StringPtr("192.168.1.0/24") + removeVPNGatewayConnectionsPeerCIDROptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") Expect(err).To(BeNil()) - response, operationErr := vpcService.RemoveVPNGatewayConnectionPeerCIDR(removeVPNGatewayConnectionPeerCIDROptionsModel) + response, operationErr := vpcService.RemoveVPNGatewayConnectionsPeerCIDR(removeVPNGatewayConnectionsPeerCIDROptionsModel) Expect(operationErr).ToNot(BeNil()) Expect(operationErr.Error()).To(ContainSubstring(core.ERRORMSG_SERVICE_URL_MISSING)) Expect(response).To(BeNil()) - // Construct a second instance of the RemoveVPNGatewayConnectionPeerCIDROptions model with no property values - removeVPNGatewayConnectionPeerCIDROptionsModelNew := new(vpcv1.RemoveVPNGatewayConnectionPeerCIDROptions) + // Construct a second instance of the RemoveVPNGatewayConnectionsPeerCIDROptions model with no property values + removeVPNGatewayConnectionsPeerCIDROptionsModelNew := new(vpcv1.RemoveVPNGatewayConnectionsPeerCIDROptions) // Invoke operation with invalid model (negative test) - response, operationErr = vpcService.RemoveVPNGatewayConnectionPeerCIDR(removeVPNGatewayConnectionPeerCIDROptionsModelNew) + response, operationErr = vpcService.RemoveVPNGatewayConnectionsPeerCIDR(removeVPNGatewayConnectionsPeerCIDROptionsModelNew) Expect(operationErr).ToNot(BeNil()) Expect(response).To(BeNil()) }) @@ -82969,16 +83067,16 @@ var _ = Describe(`VpcV1`, func() { }) }) }) - Describe(`CheckVPNGatewayConnectionPeerCIDR(checkVPNGatewayConnectionPeerCIDROptions *CheckVPNGatewayConnectionPeerCIDROptions)`, func() { + Describe(`CheckVPNGatewayConnectionsPeerCIDR(checkVPNGatewayConnectionsPeerCIDROptions *CheckVPNGatewayConnectionsPeerCIDROptions)`, func() { version := "testString" - checkVPNGatewayConnectionPeerCIDRPath := "/vpn_gateways/testString/connections/testString/peer_cidrs/testString/testString" + checkVPNGatewayConnectionsPeerCIDRPath := "/vpn_gateways/testString/connections/testString/peer/cidrs/192.168.1.0/24" Context(`Using mock server endpoint`, func() { BeforeEach(func() { testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.EscapedPath()).To(Equal(checkVPNGatewayConnectionPeerCIDRPath)) + Expect(req.URL.Path).To(Equal(checkVPNGatewayConnectionsPeerCIDRPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -82986,7 +83084,7 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(204) })) }) - It(`Invoke CheckVPNGatewayConnectionPeerCIDR successfully`, func() { + It(`Invoke CheckVPNGatewayConnectionsPeerCIDR successfully`, func() { vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -82996,24 +83094,23 @@ var _ = Describe(`VpcV1`, func() { Expect(vpcService).ToNot(BeNil()) // Invoke operation with nil options model (negative test) - response, operationErr := vpcService.CheckVPNGatewayConnectionPeerCIDR(nil) + response, operationErr := vpcService.CheckVPNGatewayConnectionsPeerCIDR(nil) Expect(operationErr).NotTo(BeNil()) Expect(response).To(BeNil()) - // Construct an instance of the CheckVPNGatewayConnectionPeerCIDROptions model - checkVPNGatewayConnectionPeerCIDROptionsModel := new(vpcv1.CheckVPNGatewayConnectionPeerCIDROptions) - checkVPNGatewayConnectionPeerCIDROptionsModel.VPNGatewayID = core.StringPtr("testString") - checkVPNGatewayConnectionPeerCIDROptionsModel.ID = core.StringPtr("testString") - checkVPNGatewayConnectionPeerCIDROptionsModel.CIDRPrefix = core.StringPtr("testString") - checkVPNGatewayConnectionPeerCIDROptionsModel.PrefixLength = core.StringPtr("testString") - checkVPNGatewayConnectionPeerCIDROptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the CheckVPNGatewayConnectionsPeerCIDROptions model + checkVPNGatewayConnectionsPeerCIDROptionsModel := new(vpcv1.CheckVPNGatewayConnectionsPeerCIDROptions) + checkVPNGatewayConnectionsPeerCIDROptionsModel.VPNGatewayID = core.StringPtr("testString") + checkVPNGatewayConnectionsPeerCIDROptionsModel.ID = core.StringPtr("testString") + checkVPNGatewayConnectionsPeerCIDROptionsModel.CIDR = core.StringPtr("192.168.1.0/24") + checkVPNGatewayConnectionsPeerCIDROptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) - response, operationErr = vpcService.CheckVPNGatewayConnectionPeerCIDR(checkVPNGatewayConnectionPeerCIDROptionsModel) + response, operationErr = vpcService.CheckVPNGatewayConnectionsPeerCIDR(checkVPNGatewayConnectionsPeerCIDROptionsModel) Expect(operationErr).To(BeNil()) Expect(response).ToNot(BeNil()) }) - It(`Invoke CheckVPNGatewayConnectionPeerCIDR with error: Operation validation and request error`, func() { + It(`Invoke CheckVPNGatewayConnectionsPeerCIDR with error: Operation validation and request error`, func() { vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -83022,24 +83119,23 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) - // Construct an instance of the CheckVPNGatewayConnectionPeerCIDROptions model - checkVPNGatewayConnectionPeerCIDROptionsModel := new(vpcv1.CheckVPNGatewayConnectionPeerCIDROptions) - checkVPNGatewayConnectionPeerCIDROptionsModel.VPNGatewayID = core.StringPtr("testString") - checkVPNGatewayConnectionPeerCIDROptionsModel.ID = core.StringPtr("testString") - checkVPNGatewayConnectionPeerCIDROptionsModel.CIDRPrefix = core.StringPtr("testString") - checkVPNGatewayConnectionPeerCIDROptionsModel.PrefixLength = core.StringPtr("testString") - checkVPNGatewayConnectionPeerCIDROptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the CheckVPNGatewayConnectionsPeerCIDROptions model + checkVPNGatewayConnectionsPeerCIDROptionsModel := new(vpcv1.CheckVPNGatewayConnectionsPeerCIDROptions) + checkVPNGatewayConnectionsPeerCIDROptionsModel.VPNGatewayID = core.StringPtr("testString") + checkVPNGatewayConnectionsPeerCIDROptionsModel.ID = core.StringPtr("testString") + checkVPNGatewayConnectionsPeerCIDROptionsModel.CIDR = core.StringPtr("192.168.1.0/24") + checkVPNGatewayConnectionsPeerCIDROptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") Expect(err).To(BeNil()) - response, operationErr := vpcService.CheckVPNGatewayConnectionPeerCIDR(checkVPNGatewayConnectionPeerCIDROptionsModel) + response, operationErr := vpcService.CheckVPNGatewayConnectionsPeerCIDR(checkVPNGatewayConnectionsPeerCIDROptionsModel) Expect(operationErr).ToNot(BeNil()) Expect(operationErr.Error()).To(ContainSubstring(core.ERRORMSG_SERVICE_URL_MISSING)) Expect(response).To(BeNil()) - // Construct a second instance of the CheckVPNGatewayConnectionPeerCIDROptions model with no property values - checkVPNGatewayConnectionPeerCIDROptionsModelNew := new(vpcv1.CheckVPNGatewayConnectionPeerCIDROptions) + // Construct a second instance of the CheckVPNGatewayConnectionsPeerCIDROptions model with no property values + checkVPNGatewayConnectionsPeerCIDROptionsModelNew := new(vpcv1.CheckVPNGatewayConnectionsPeerCIDROptions) // Invoke operation with invalid model (negative test) - response, operationErr = vpcService.CheckVPNGatewayConnectionPeerCIDR(checkVPNGatewayConnectionPeerCIDROptionsModelNew) + response, operationErr = vpcService.CheckVPNGatewayConnectionsPeerCIDR(checkVPNGatewayConnectionsPeerCIDROptionsModelNew) Expect(operationErr).ToNot(BeNil()) Expect(response).To(BeNil()) }) @@ -83048,24 +83144,24 @@ var _ = Describe(`VpcV1`, func() { }) }) }) - Describe(`AddVPNGatewayConnectionPeerCIDR(addVPNGatewayConnectionPeerCIDROptions *AddVPNGatewayConnectionPeerCIDROptions)`, func() { + Describe(`AddVPNGatewayConnectionsPeerCIDR(addVPNGatewayConnectionsPeerCIDROptions *AddVPNGatewayConnectionsPeerCIDROptions)`, func() { version := "testString" - addVPNGatewayConnectionPeerCIDRPath := "/vpn_gateways/testString/connections/testString/peer_cidrs/testString/testString" + addVPNGatewayConnectionsPeerCIDRPath := "/vpn_gateways/testString/connections/testString/peer/cidrs/192.168.1.0/24" Context(`Using mock server endpoint`, func() { BeforeEach(func() { testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.EscapedPath()).To(Equal(addVPNGatewayConnectionPeerCIDRPath)) + Expect(req.URL.Path).To(Equal(addVPNGatewayConnectionsPeerCIDRPath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) + res.WriteHeader(201) })) }) - It(`Invoke AddVPNGatewayConnectionPeerCIDR successfully`, func() { + It(`Invoke AddVPNGatewayConnectionsPeerCIDR successfully`, func() { vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -83075,24 +83171,23 @@ var _ = Describe(`VpcV1`, func() { Expect(vpcService).ToNot(BeNil()) // Invoke operation with nil options model (negative test) - response, operationErr := vpcService.AddVPNGatewayConnectionPeerCIDR(nil) + response, operationErr := vpcService.AddVPNGatewayConnectionsPeerCIDR(nil) Expect(operationErr).NotTo(BeNil()) Expect(response).To(BeNil()) - // Construct an instance of the AddVPNGatewayConnectionPeerCIDROptions model - addVPNGatewayConnectionPeerCIDROptionsModel := new(vpcv1.AddVPNGatewayConnectionPeerCIDROptions) - addVPNGatewayConnectionPeerCIDROptionsModel.VPNGatewayID = core.StringPtr("testString") - addVPNGatewayConnectionPeerCIDROptionsModel.ID = core.StringPtr("testString") - addVPNGatewayConnectionPeerCIDROptionsModel.CIDRPrefix = core.StringPtr("testString") - addVPNGatewayConnectionPeerCIDROptionsModel.PrefixLength = core.StringPtr("testString") - addVPNGatewayConnectionPeerCIDROptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the AddVPNGatewayConnectionsPeerCIDROptions model + addVPNGatewayConnectionsPeerCIDROptionsModel := new(vpcv1.AddVPNGatewayConnectionsPeerCIDROptions) + addVPNGatewayConnectionsPeerCIDROptionsModel.VPNGatewayID = core.StringPtr("testString") + addVPNGatewayConnectionsPeerCIDROptionsModel.ID = core.StringPtr("testString") + addVPNGatewayConnectionsPeerCIDROptionsModel.CIDR = core.StringPtr("192.168.1.0/24") + addVPNGatewayConnectionsPeerCIDROptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) - response, operationErr = vpcService.AddVPNGatewayConnectionPeerCIDR(addVPNGatewayConnectionPeerCIDROptionsModel) + response, operationErr = vpcService.AddVPNGatewayConnectionsPeerCIDR(addVPNGatewayConnectionsPeerCIDROptionsModel) Expect(operationErr).To(BeNil()) Expect(response).ToNot(BeNil()) }) - It(`Invoke AddVPNGatewayConnectionPeerCIDR with error: Operation validation and request error`, func() { + It(`Invoke AddVPNGatewayConnectionsPeerCIDR with error: Operation validation and request error`, func() { vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -83101,24 +83196,23 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) - // Construct an instance of the AddVPNGatewayConnectionPeerCIDROptions model - addVPNGatewayConnectionPeerCIDROptionsModel := new(vpcv1.AddVPNGatewayConnectionPeerCIDROptions) - addVPNGatewayConnectionPeerCIDROptionsModel.VPNGatewayID = core.StringPtr("testString") - addVPNGatewayConnectionPeerCIDROptionsModel.ID = core.StringPtr("testString") - addVPNGatewayConnectionPeerCIDROptionsModel.CIDRPrefix = core.StringPtr("testString") - addVPNGatewayConnectionPeerCIDROptionsModel.PrefixLength = core.StringPtr("testString") - addVPNGatewayConnectionPeerCIDROptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the AddVPNGatewayConnectionsPeerCIDROptions model + addVPNGatewayConnectionsPeerCIDROptionsModel := new(vpcv1.AddVPNGatewayConnectionsPeerCIDROptions) + addVPNGatewayConnectionsPeerCIDROptionsModel.VPNGatewayID = core.StringPtr("testString") + addVPNGatewayConnectionsPeerCIDROptionsModel.ID = core.StringPtr("testString") + addVPNGatewayConnectionsPeerCIDROptionsModel.CIDR = core.StringPtr("192.168.1.0/24") + addVPNGatewayConnectionsPeerCIDROptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") Expect(err).To(BeNil()) - response, operationErr := vpcService.AddVPNGatewayConnectionPeerCIDR(addVPNGatewayConnectionPeerCIDROptionsModel) + response, operationErr := vpcService.AddVPNGatewayConnectionsPeerCIDR(addVPNGatewayConnectionsPeerCIDROptionsModel) Expect(operationErr).ToNot(BeNil()) Expect(operationErr.Error()).To(ContainSubstring(core.ERRORMSG_SERVICE_URL_MISSING)) Expect(response).To(BeNil()) - // Construct a second instance of the AddVPNGatewayConnectionPeerCIDROptions model with no property values - addVPNGatewayConnectionPeerCIDROptionsModelNew := new(vpcv1.AddVPNGatewayConnectionPeerCIDROptions) + // Construct a second instance of the AddVPNGatewayConnectionsPeerCIDROptions model with no property values + addVPNGatewayConnectionsPeerCIDROptionsModelNew := new(vpcv1.AddVPNGatewayConnectionsPeerCIDROptions) // Invoke operation with invalid model (negative test) - response, operationErr = vpcService.AddVPNGatewayConnectionPeerCIDR(addVPNGatewayConnectionPeerCIDROptionsModelNew) + response, operationErr = vpcService.AddVPNGatewayConnectionsPeerCIDR(addVPNGatewayConnectionsPeerCIDROptionsModelNew) Expect(operationErr).ToNot(BeNil()) Expect(response).To(BeNil()) }) @@ -83210,7 +83304,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers?start=ffd653466e284937896724b2dd044c9c&limit=20"}, "total_count": 132, "vpn_servers": [{"certificate": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "client_authentication": [{"method": "certificate", "identity_provider": {"provider_type": "iam"}}], "client_auto_delete": true, "client_auto_delete_timeout": 1, "client_dns_server_ips": [{"address": "192.168.3.4"}], "client_idle_timeout": 600, "client_ip_pool": "172.16.0.0/16", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "enable_split_tunneling": true, "health_reasons": [{"code": "cannot_access_server_certificate", "message": "Failed to get VPN server's server certificate from Secrets Manager.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health"}], "health_state": "ok", "hostname": "a8506291.us-south.vpn-server.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-server", "port": 443, "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "protocol": "udp", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_server", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}]}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers?start=ffd653466e284937896724b2dd044c9c&limit=20"}, "total_count": 132, "vpn_servers": [{"certificate": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "client_authentication": [{"method": "certificate", "identity_provider": {"provider_type": "iam"}}], "client_auto_delete": true, "client_auto_delete_timeout": 1, "client_dns_server_ips": [{"address": "192.168.3.4"}], "client_idle_timeout": 600, "client_ip_pool": "172.16.0.0/16", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "enable_split_tunneling": true, "health_reasons": [{"code": "cannot_access_server_certificate", "message": "Failed to get VPN server's server certificate from Secrets Manager.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health"}], "health_state": "ok", "hostname": "a8506291.us-south.vpn-server.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-server", "port": 443, "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "protocol": "udp", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_server", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}]}`) })) }) It(`Invoke ListVPNServers successfully with retries`, func() { @@ -83276,7 +83370,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers?start=ffd653466e284937896724b2dd044c9c&limit=20"}, "total_count": 132, "vpn_servers": [{"certificate": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "client_authentication": [{"method": "certificate", "identity_provider": {"provider_type": "iam"}}], "client_auto_delete": true, "client_auto_delete_timeout": 1, "client_dns_server_ips": [{"address": "192.168.3.4"}], "client_idle_timeout": 600, "client_ip_pool": "172.16.0.0/16", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "enable_split_tunneling": true, "health_reasons": [{"code": "cannot_access_server_certificate", "message": "Failed to get VPN server's server certificate from Secrets Manager.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health"}], "health_state": "ok", "hostname": "a8506291.us-south.vpn-server.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-server", "port": 443, "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "protocol": "udp", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_server", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}]}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers?start=ffd653466e284937896724b2dd044c9c&limit=20"}, "total_count": 132, "vpn_servers": [{"certificate": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "client_authentication": [{"method": "certificate", "identity_provider": {"provider_type": "iam"}}], "client_auto_delete": true, "client_auto_delete_timeout": 1, "client_dns_server_ips": [{"address": "192.168.3.4"}], "client_idle_timeout": 600, "client_ip_pool": "172.16.0.0/16", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "enable_split_tunneling": true, "health_reasons": [{"code": "cannot_access_server_certificate", "message": "Failed to get VPN server's server certificate from Secrets Manager.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health"}], "health_state": "ok", "hostname": "a8506291.us-south.vpn-server.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-server", "port": 443, "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "protocol": "udp", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_server", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}]}`) })) }) It(`Invoke ListVPNServers successfully`, func() { @@ -83423,9 +83517,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"vpn_servers":[{"certificate":{"crn":"crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"},"client_authentication":[{"method":"certificate","identity_provider":{"provider_type":"iam"}}],"client_auto_delete":true,"client_auto_delete_timeout":1,"client_dns_server_ips":[{"address":"192.168.3.4"}],"client_idle_timeout":600,"client_ip_pool":"172.16.0.0/16","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5","enable_split_tunneling":true,"health_reasons":[{"code":"cannot_access_server_certificate","message":"Failed to get VPN server's server certificate from Secrets Manager.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health"}],"health_state":"ok","hostname":"a8506291.us-south.vpn-server.appdomain.cloud","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5","lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","name":"my-vpn-server","port":443,"private_ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"protocol":"udp","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"vpn_server","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}],"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"vpn_servers":[{"certificate":{"crn":"crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"},"client_authentication":[{"method":"certificate","identity_provider":{"provider_type":"iam"}}],"client_auto_delete":true,"client_auto_delete_timeout":1,"client_dns_server_ips":[{"address":"192.168.3.4"}],"client_idle_timeout":600,"client_ip_pool":"172.16.0.0/16","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5","enable_split_tunneling":true,"health_reasons":[{"code":"cannot_access_server_certificate","message":"Failed to get VPN server's server certificate from Secrets Manager.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health"}],"health_state":"ok","hostname":"a8506291.us-south.vpn-server.appdomain.cloud","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5","lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","name":"my-vpn-server","port":443,"private_ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"protocol":"udp","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"vpn_server","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}],"total_count":2,"limit":1}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"vpn_servers":[{"certificate":{"crn":"crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"},"client_authentication":[{"method":"certificate","identity_provider":{"provider_type":"iam"}}],"client_auto_delete":true,"client_auto_delete_timeout":1,"client_dns_server_ips":[{"address":"192.168.3.4"}],"client_idle_timeout":600,"client_ip_pool":"172.16.0.0/16","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5","enable_split_tunneling":true,"health_reasons":[{"code":"cannot_access_server_certificate","message":"Failed to get VPN server's server certificate from Secrets Manager.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health"}],"health_state":"ok","hostname":"a8506291.us-south.vpn-server.appdomain.cloud","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5","lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","name":"my-vpn-server","port":443,"private_ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"protocol":"udp","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"vpn_server","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}],"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"vpn_servers":[{"certificate":{"crn":"crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"},"client_authentication":[{"method":"certificate","identity_provider":{"provider_type":"iam"}}],"client_auto_delete":true,"client_auto_delete_timeout":1,"client_dns_server_ips":[{"address":"192.168.3.4"}],"client_idle_timeout":600,"client_ip_pool":"172.16.0.0/16","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5","enable_split_tunneling":true,"health_reasons":[{"code":"cannot_access_server_certificate","message":"Failed to get VPN server's server certificate from Secrets Manager.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health"}],"health_state":"ok","hostname":"a8506291.us-south.vpn-server.appdomain.cloud","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5","lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","name":"my-vpn-server","port":443,"private_ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"protocol":"udp","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"vpn_server","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}],"total_count":2,"limit":1}`) } else { res.WriteHeader(400) } @@ -83516,7 +83610,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the CertificateInstanceIdentityByCRN model certificateInstanceIdentityModel := new(vpcv1.CertificateInstanceIdentityByCRN) - certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") // Construct an instance of the VPNServerAuthenticationByUsernameIDProviderByIam model vpnServerAuthenticationByUsernameIDProviderModel := new(vpcv1.VPNServerAuthenticationByUsernameIDProviderByIam) @@ -83529,7 +83623,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the IP model ipModel := new(vpcv1.IP) @@ -83612,7 +83706,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"certificate": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "client_authentication": [{"method": "certificate", "identity_provider": {"provider_type": "iam"}}], "client_auto_delete": true, "client_auto_delete_timeout": 1, "client_dns_server_ips": [{"address": "192.168.3.4"}], "client_idle_timeout": 600, "client_ip_pool": "172.16.0.0/16", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "enable_split_tunneling": true, "health_reasons": [{"code": "cannot_access_server_certificate", "message": "Failed to get VPN server's server certificate from Secrets Manager.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health"}], "health_state": "ok", "hostname": "a8506291.us-south.vpn-server.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-server", "port": 443, "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "protocol": "udp", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_server", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"certificate": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "client_authentication": [{"method": "certificate", "identity_provider": {"provider_type": "iam"}}], "client_auto_delete": true, "client_auto_delete_timeout": 1, "client_dns_server_ips": [{"address": "192.168.3.4"}], "client_idle_timeout": 600, "client_ip_pool": "172.16.0.0/16", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "enable_split_tunneling": true, "health_reasons": [{"code": "cannot_access_server_certificate", "message": "Failed to get VPN server's server certificate from Secrets Manager.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health"}], "health_state": "ok", "hostname": "a8506291.us-south.vpn-server.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-server", "port": 443, "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "protocol": "udp", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_server", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke CreateVPNServer successfully with retries`, func() { @@ -83627,7 +83721,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the CertificateInstanceIdentityByCRN model certificateInstanceIdentityModel := new(vpcv1.CertificateInstanceIdentityByCRN) - certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") // Construct an instance of the VPNServerAuthenticationByUsernameIDProviderByIam model vpnServerAuthenticationByUsernameIDProviderModel := new(vpcv1.VPNServerAuthenticationByUsernameIDProviderByIam) @@ -83640,7 +83734,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the IP model ipModel := new(vpcv1.IP) @@ -83725,7 +83819,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"certificate": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "client_authentication": [{"method": "certificate", "identity_provider": {"provider_type": "iam"}}], "client_auto_delete": true, "client_auto_delete_timeout": 1, "client_dns_server_ips": [{"address": "192.168.3.4"}], "client_idle_timeout": 600, "client_ip_pool": "172.16.0.0/16", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "enable_split_tunneling": true, "health_reasons": [{"code": "cannot_access_server_certificate", "message": "Failed to get VPN server's server certificate from Secrets Manager.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health"}], "health_state": "ok", "hostname": "a8506291.us-south.vpn-server.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-server", "port": 443, "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "protocol": "udp", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_server", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"certificate": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "client_authentication": [{"method": "certificate", "identity_provider": {"provider_type": "iam"}}], "client_auto_delete": true, "client_auto_delete_timeout": 1, "client_dns_server_ips": [{"address": "192.168.3.4"}], "client_idle_timeout": 600, "client_ip_pool": "172.16.0.0/16", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "enable_split_tunneling": true, "health_reasons": [{"code": "cannot_access_server_certificate", "message": "Failed to get VPN server's server certificate from Secrets Manager.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health"}], "health_state": "ok", "hostname": "a8506291.us-south.vpn-server.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-server", "port": 443, "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "protocol": "udp", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_server", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke CreateVPNServer successfully`, func() { @@ -83745,7 +83839,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the CertificateInstanceIdentityByCRN model certificateInstanceIdentityModel := new(vpcv1.CertificateInstanceIdentityByCRN) - certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") // Construct an instance of the VPNServerAuthenticationByUsernameIDProviderByIam model vpnServerAuthenticationByUsernameIDProviderModel := new(vpcv1.VPNServerAuthenticationByUsernameIDProviderByIam) @@ -83758,7 +83852,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the IP model ipModel := new(vpcv1.IP) @@ -83806,7 +83900,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the CertificateInstanceIdentityByCRN model certificateInstanceIdentityModel := new(vpcv1.CertificateInstanceIdentityByCRN) - certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") // Construct an instance of the VPNServerAuthenticationByUsernameIDProviderByIam model vpnServerAuthenticationByUsernameIDProviderModel := new(vpcv1.VPNServerAuthenticationByUsernameIDProviderByIam) @@ -83819,7 +83913,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the IP model ipModel := new(vpcv1.IP) @@ -83888,7 +83982,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the CertificateInstanceIdentityByCRN model certificateInstanceIdentityModel := new(vpcv1.CertificateInstanceIdentityByCRN) - certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") // Construct an instance of the VPNServerAuthenticationByUsernameIDProviderByIam model vpnServerAuthenticationByUsernameIDProviderModel := new(vpcv1.VPNServerAuthenticationByUsernameIDProviderByIam) @@ -83901,7 +83995,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the IP model ipModel := new(vpcv1.IP) @@ -84090,7 +84184,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"certificate": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "client_authentication": [{"method": "certificate", "identity_provider": {"provider_type": "iam"}}], "client_auto_delete": true, "client_auto_delete_timeout": 1, "client_dns_server_ips": [{"address": "192.168.3.4"}], "client_idle_timeout": 600, "client_ip_pool": "172.16.0.0/16", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "enable_split_tunneling": true, "health_reasons": [{"code": "cannot_access_server_certificate", "message": "Failed to get VPN server's server certificate from Secrets Manager.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health"}], "health_state": "ok", "hostname": "a8506291.us-south.vpn-server.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-server", "port": 443, "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "protocol": "udp", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_server", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"certificate": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "client_authentication": [{"method": "certificate", "identity_provider": {"provider_type": "iam"}}], "client_auto_delete": true, "client_auto_delete_timeout": 1, "client_dns_server_ips": [{"address": "192.168.3.4"}], "client_idle_timeout": 600, "client_ip_pool": "172.16.0.0/16", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "enable_split_tunneling": true, "health_reasons": [{"code": "cannot_access_server_certificate", "message": "Failed to get VPN server's server certificate from Secrets Manager.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health"}], "health_state": "ok", "hostname": "a8506291.us-south.vpn-server.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-server", "port": 443, "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "protocol": "udp", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_server", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke GetVPNServer successfully with retries`, func() { @@ -84147,7 +84241,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"certificate": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "client_authentication": [{"method": "certificate", "identity_provider": {"provider_type": "iam"}}], "client_auto_delete": true, "client_auto_delete_timeout": 1, "client_dns_server_ips": [{"address": "192.168.3.4"}], "client_idle_timeout": 600, "client_ip_pool": "172.16.0.0/16", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "enable_split_tunneling": true, "health_reasons": [{"code": "cannot_access_server_certificate", "message": "Failed to get VPN server's server certificate from Secrets Manager.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health"}], "health_state": "ok", "hostname": "a8506291.us-south.vpn-server.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-server", "port": 443, "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "protocol": "udp", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_server", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"certificate": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "client_authentication": [{"method": "certificate", "identity_provider": {"provider_type": "iam"}}], "client_auto_delete": true, "client_auto_delete_timeout": 1, "client_dns_server_ips": [{"address": "192.168.3.4"}], "client_idle_timeout": 600, "client_ip_pool": "172.16.0.0/16", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "enable_split_tunneling": true, "health_reasons": [{"code": "cannot_access_server_certificate", "message": "Failed to get VPN server's server certificate from Secrets Manager.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health"}], "health_state": "ok", "hostname": "a8506291.us-south.vpn-server.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-server", "port": 443, "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "protocol": "udp", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_server", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke GetVPNServer successfully`, func() { @@ -84277,7 +84371,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the CertificateInstanceIdentityByCRN model certificateInstanceIdentityModel := new(vpcv1.CertificateInstanceIdentityByCRN) - certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") // Construct an instance of the VPNServerAuthenticationByUsernameIDProviderByIam model vpnServerAuthenticationByUsernameIDProviderModel := new(vpcv1.VPNServerAuthenticationByUsernameIDProviderByIam) @@ -84294,7 +84388,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the VPNServerPatch model vpnServerPatchModel := new(vpcv1.VPNServerPatch) @@ -84373,7 +84467,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"certificate": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "client_authentication": [{"method": "certificate", "identity_provider": {"provider_type": "iam"}}], "client_auto_delete": true, "client_auto_delete_timeout": 1, "client_dns_server_ips": [{"address": "192.168.3.4"}], "client_idle_timeout": 600, "client_ip_pool": "172.16.0.0/16", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "enable_split_tunneling": true, "health_reasons": [{"code": "cannot_access_server_certificate", "message": "Failed to get VPN server's server certificate from Secrets Manager.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health"}], "health_state": "ok", "hostname": "a8506291.us-south.vpn-server.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-server", "port": 443, "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "protocol": "udp", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_server", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"certificate": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "client_authentication": [{"method": "certificate", "identity_provider": {"provider_type": "iam"}}], "client_auto_delete": true, "client_auto_delete_timeout": 1, "client_dns_server_ips": [{"address": "192.168.3.4"}], "client_idle_timeout": 600, "client_ip_pool": "172.16.0.0/16", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "enable_split_tunneling": true, "health_reasons": [{"code": "cannot_access_server_certificate", "message": "Failed to get VPN server's server certificate from Secrets Manager.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health"}], "health_state": "ok", "hostname": "a8506291.us-south.vpn-server.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-server", "port": 443, "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "protocol": "udp", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_server", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke UpdateVPNServer successfully with retries`, func() { @@ -84388,7 +84482,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the CertificateInstanceIdentityByCRN model certificateInstanceIdentityModel := new(vpcv1.CertificateInstanceIdentityByCRN) - certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") // Construct an instance of the VPNServerAuthenticationByUsernameIDProviderByIam model vpnServerAuthenticationByUsernameIDProviderModel := new(vpcv1.VPNServerAuthenticationByUsernameIDProviderByIam) @@ -84405,7 +84499,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the VPNServerPatch model vpnServerPatchModel := new(vpcv1.VPNServerPatch) @@ -84486,7 +84580,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"certificate": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "client_authentication": [{"method": "certificate", "identity_provider": {"provider_type": "iam"}}], "client_auto_delete": true, "client_auto_delete_timeout": 1, "client_dns_server_ips": [{"address": "192.168.3.4"}], "client_idle_timeout": 600, "client_ip_pool": "172.16.0.0/16", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "enable_split_tunneling": true, "health_reasons": [{"code": "cannot_access_server_certificate", "message": "Failed to get VPN server's server certificate from Secrets Manager.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health"}], "health_state": "ok", "hostname": "a8506291.us-south.vpn-server.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-server", "port": 443, "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "protocol": "udp", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_server", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"certificate": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "client_authentication": [{"method": "certificate", "identity_provider": {"provider_type": "iam"}}], "client_auto_delete": true, "client_auto_delete_timeout": 1, "client_dns_server_ips": [{"address": "192.168.3.4"}], "client_idle_timeout": 600, "client_ip_pool": "172.16.0.0/16", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "enable_split_tunneling": true, "health_reasons": [{"code": "cannot_access_server_certificate", "message": "Failed to get VPN server's server certificate from Secrets Manager.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health"}], "health_state": "ok", "hostname": "a8506291.us-south.vpn-server.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-server", "port": 443, "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "protocol": "udp", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_server", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke UpdateVPNServer successfully`, func() { @@ -84506,7 +84600,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the CertificateInstanceIdentityByCRN model certificateInstanceIdentityModel := new(vpcv1.CertificateInstanceIdentityByCRN) - certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") // Construct an instance of the VPNServerAuthenticationByUsernameIDProviderByIam model vpnServerAuthenticationByUsernameIDProviderModel := new(vpcv1.VPNServerAuthenticationByUsernameIDProviderByIam) @@ -84523,7 +84617,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the VPNServerPatch model vpnServerPatchModel := new(vpcv1.VPNServerPatch) @@ -84565,7 +84659,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the CertificateInstanceIdentityByCRN model certificateInstanceIdentityModel := new(vpcv1.CertificateInstanceIdentityByCRN) - certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") // Construct an instance of the VPNServerAuthenticationByUsernameIDProviderByIam model vpnServerAuthenticationByUsernameIDProviderModel := new(vpcv1.VPNServerAuthenticationByUsernameIDProviderByIam) @@ -84582,7 +84676,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the VPNServerPatch model vpnServerPatchModel := new(vpcv1.VPNServerPatch) @@ -84645,7 +84739,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the CertificateInstanceIdentityByCRN model certificateInstanceIdentityModel := new(vpcv1.CertificateInstanceIdentityByCRN) - certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") // Construct an instance of the VPNServerAuthenticationByUsernameIDProviderByIam model vpnServerAuthenticationByUsernameIDProviderModel := new(vpcv1.VPNServerAuthenticationByUsernameIDProviderByIam) @@ -84662,7 +84756,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the VPNServerPatch model vpnServerPatchModel := new(vpcv1.VPNServerPatch) @@ -87466,7 +87560,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers?limit=20"}, "limit": 20, "load_balancers": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/123456:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers?limit=20"}, "limit": 20, "load_balancers": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListLoadBalancers successfully with retries`, func() { @@ -87526,7 +87620,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers?limit=20"}, "limit": 20, "load_balancers": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/123456:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers?limit=20"}, "limit": 20, "load_balancers": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListLoadBalancers successfully`, func() { @@ -87664,9 +87758,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"load_balancers":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727","dns":{"instance":{"crn":"crn:v1:bluemix:public:dns-svcs:global:a/123456:6860c359-b2e2-46fa-a944-b38c28201c6e"},"zone":{"id":"d66662cc-aa23-4fe1-9987-858487a61f45"}},"hostname":"6b88d615-us-south.lb.appdomain.cloud","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"dd754295-e9e0-4c9d-bf6c-58fbc59e5727","instance_groups_supported":false,"is_public":true,"listeners":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004"}],"logging":{"datapath":{"active":true}},"name":"my-load-balancer","operating_status":"offline","pools":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004","name":"my-load-balancer-pool"}],"private_ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"profile":{"family":"network","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed","name":"network-fixed"},"provisioning_status":"active","public_ips":[{"address":"192.168.3.4"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"load_balancer","route_mode":true,"security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"security_groups_supported":false,"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"udp_supported":true}]}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"load_balancers":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727","dns":{"instance":{"crn":"crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e"},"zone":{"id":"d66662cc-aa23-4fe1-9987-858487a61f45"}},"hostname":"6b88d615-us-south.lb.appdomain.cloud","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"dd754295-e9e0-4c9d-bf6c-58fbc59e5727","instance_groups_supported":false,"is_public":true,"listeners":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004"}],"logging":{"datapath":{"active":true}},"name":"my-load-balancer","operating_status":"offline","pools":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004","name":"my-load-balancer-pool"}],"private_ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"profile":{"family":"network","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed","name":"network-fixed"},"provisioning_status":"active","public_ips":[{"address":"192.168.3.4"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"load_balancer","route_mode":true,"security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"security_groups_supported":false,"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"udp_supported":true}]}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"load_balancers":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727","dns":{"instance":{"crn":"crn:v1:bluemix:public:dns-svcs:global:a/123456:6860c359-b2e2-46fa-a944-b38c28201c6e"},"zone":{"id":"d66662cc-aa23-4fe1-9987-858487a61f45"}},"hostname":"6b88d615-us-south.lb.appdomain.cloud","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"dd754295-e9e0-4c9d-bf6c-58fbc59e5727","instance_groups_supported":false,"is_public":true,"listeners":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004"}],"logging":{"datapath":{"active":true}},"name":"my-load-balancer","operating_status":"offline","pools":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004","name":"my-load-balancer-pool"}],"private_ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"profile":{"family":"network","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed","name":"network-fixed"},"provisioning_status":"active","public_ips":[{"address":"192.168.3.4"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"load_balancer","route_mode":true,"security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"security_groups_supported":false,"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"udp_supported":true}]}`) + fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"load_balancers":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727","dns":{"instance":{"crn":"crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e"},"zone":{"id":"d66662cc-aa23-4fe1-9987-858487a61f45"}},"hostname":"6b88d615-us-south.lb.appdomain.cloud","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"dd754295-e9e0-4c9d-bf6c-58fbc59e5727","instance_groups_supported":false,"is_public":true,"listeners":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004"}],"logging":{"datapath":{"active":true}},"name":"my-load-balancer","operating_status":"offline","pools":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004","name":"my-load-balancer-pool"}],"private_ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"profile":{"family":"network","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed","name":"network-fixed"},"provisioning_status":"active","public_ips":[{"address":"192.168.3.4"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"load_balancer","route_mode":true,"security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"security_groups_supported":false,"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"udp_supported":true}]}`) } else { res.WriteHeader(400) } @@ -87751,11 +87845,11 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the DnsInstanceIdentityByCRN model dnsInstanceIdentityModel := new(vpcv1.DnsInstanceIdentityByCRN) - dnsInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:dns-svcs:global:a/123456:6860c359-b2e2-46fa-a944-b38c28201c6e") + dnsInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e") // Construct an instance of the DnsZoneIdentityByID model dnsZoneIdentityModel := new(vpcv1.DnsZoneIdentityByID) @@ -87768,7 +87862,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the CertificateInstanceIdentityByCRN model certificateInstanceIdentityModel := new(vpcv1.CertificateInstanceIdentityByCRN) - certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") // Construct an instance of the LoadBalancerPoolIdentityByName model loadBalancerPoolIdentityByNameModel := new(vpcv1.LoadBalancerPoolIdentityByName) @@ -87816,7 +87910,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID model loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) - loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") // Construct an instance of the LoadBalancerPoolMemberPrototype model loadBalancerPoolMemberPrototypeModel := new(vpcv1.LoadBalancerPoolMemberPrototype) @@ -87919,7 +88013,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/123456:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}`) })) }) It(`Invoke CreateLoadBalancer successfully with retries`, func() { @@ -87934,11 +88028,11 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the DnsInstanceIdentityByCRN model dnsInstanceIdentityModel := new(vpcv1.DnsInstanceIdentityByCRN) - dnsInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:dns-svcs:global:a/123456:6860c359-b2e2-46fa-a944-b38c28201c6e") + dnsInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e") // Construct an instance of the DnsZoneIdentityByID model dnsZoneIdentityModel := new(vpcv1.DnsZoneIdentityByID) @@ -87951,7 +88045,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the CertificateInstanceIdentityByCRN model certificateInstanceIdentityModel := new(vpcv1.CertificateInstanceIdentityByCRN) - certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") // Construct an instance of the LoadBalancerPoolIdentityByName model loadBalancerPoolIdentityByNameModel := new(vpcv1.LoadBalancerPoolIdentityByName) @@ -87999,7 +88093,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID model loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) - loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") // Construct an instance of the LoadBalancerPoolMemberPrototype model loadBalancerPoolMemberPrototypeModel := new(vpcv1.LoadBalancerPoolMemberPrototype) @@ -88104,7 +88198,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/123456:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}`) })) }) It(`Invoke CreateLoadBalancer successfully`, func() { @@ -88124,11 +88218,11 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the DnsInstanceIdentityByCRN model dnsInstanceIdentityModel := new(vpcv1.DnsInstanceIdentityByCRN) - dnsInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:dns-svcs:global:a/123456:6860c359-b2e2-46fa-a944-b38c28201c6e") + dnsInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e") // Construct an instance of the DnsZoneIdentityByID model dnsZoneIdentityModel := new(vpcv1.DnsZoneIdentityByID) @@ -88141,7 +88235,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the CertificateInstanceIdentityByCRN model certificateInstanceIdentityModel := new(vpcv1.CertificateInstanceIdentityByCRN) - certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") // Construct an instance of the LoadBalancerPoolIdentityByName model loadBalancerPoolIdentityByNameModel := new(vpcv1.LoadBalancerPoolIdentityByName) @@ -88189,7 +88283,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID model loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) - loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") // Construct an instance of the LoadBalancerPoolMemberPrototype model loadBalancerPoolMemberPrototypeModel := new(vpcv1.LoadBalancerPoolMemberPrototype) @@ -88257,11 +88351,11 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the DnsInstanceIdentityByCRN model dnsInstanceIdentityModel := new(vpcv1.DnsInstanceIdentityByCRN) - dnsInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:dns-svcs:global:a/123456:6860c359-b2e2-46fa-a944-b38c28201c6e") + dnsInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e") // Construct an instance of the DnsZoneIdentityByID model dnsZoneIdentityModel := new(vpcv1.DnsZoneIdentityByID) @@ -88274,7 +88368,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the CertificateInstanceIdentityByCRN model certificateInstanceIdentityModel := new(vpcv1.CertificateInstanceIdentityByCRN) - certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") // Construct an instance of the LoadBalancerPoolIdentityByName model loadBalancerPoolIdentityByNameModel := new(vpcv1.LoadBalancerPoolIdentityByName) @@ -88322,7 +88416,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID model loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) - loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") // Construct an instance of the LoadBalancerPoolMemberPrototype model loadBalancerPoolMemberPrototypeModel := new(vpcv1.LoadBalancerPoolMemberPrototype) @@ -88411,11 +88505,11 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the DnsInstanceIdentityByCRN model dnsInstanceIdentityModel := new(vpcv1.DnsInstanceIdentityByCRN) - dnsInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:dns-svcs:global:a/123456:6860c359-b2e2-46fa-a944-b38c28201c6e") + dnsInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e") // Construct an instance of the DnsZoneIdentityByID model dnsZoneIdentityModel := new(vpcv1.DnsZoneIdentityByID) @@ -88428,7 +88522,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the CertificateInstanceIdentityByCRN model certificateInstanceIdentityModel := new(vpcv1.CertificateInstanceIdentityByCRN) - certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") // Construct an instance of the LoadBalancerPoolIdentityByName model loadBalancerPoolIdentityByNameModel := new(vpcv1.LoadBalancerPoolIdentityByName) @@ -88476,7 +88570,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID model loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) - loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") // Construct an instance of the LoadBalancerPoolMemberPrototype model loadBalancerPoolMemberPrototypeModel := new(vpcv1.LoadBalancerPoolMemberPrototype) @@ -88685,7 +88779,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/123456:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}`) })) }) It(`Invoke GetLoadBalancer successfully with retries`, func() { @@ -88742,7 +88836,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/123456:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}`) })) }) It(`Invoke GetLoadBalancer successfully`, func() { @@ -88872,7 +88966,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the DnsInstanceIdentityByCRN model dnsInstanceIdentityModel := new(vpcv1.DnsInstanceIdentityByCRN) - dnsInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:dns-svcs:global:a/123456:6860c359-b2e2-46fa-a944-b38c28201c6e") + dnsInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e") // Construct an instance of the DnsZoneIdentityByID model dnsZoneIdentityModel := new(vpcv1.DnsZoneIdentityByID) @@ -88893,7 +88987,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the LoadBalancerPatch model loadBalancerPatchModel := new(vpcv1.LoadBalancerPatch) @@ -88966,7 +89060,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/123456:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}`) })) }) It(`Invoke UpdateLoadBalancer successfully with retries`, func() { @@ -88981,7 +89075,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the DnsInstanceIdentityByCRN model dnsInstanceIdentityModel := new(vpcv1.DnsInstanceIdentityByCRN) - dnsInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:dns-svcs:global:a/123456:6860c359-b2e2-46fa-a944-b38c28201c6e") + dnsInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e") // Construct an instance of the DnsZoneIdentityByID model dnsZoneIdentityModel := new(vpcv1.DnsZoneIdentityByID) @@ -89002,7 +89096,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the LoadBalancerPatch model loadBalancerPatchModel := new(vpcv1.LoadBalancerPatch) @@ -89077,7 +89171,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/123456:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}`) })) }) It(`Invoke UpdateLoadBalancer successfully`, func() { @@ -89097,7 +89191,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the DnsInstanceIdentityByCRN model dnsInstanceIdentityModel := new(vpcv1.DnsInstanceIdentityByCRN) - dnsInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:dns-svcs:global:a/123456:6860c359-b2e2-46fa-a944-b38c28201c6e") + dnsInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e") // Construct an instance of the DnsZoneIdentityByID model dnsZoneIdentityModel := new(vpcv1.DnsZoneIdentityByID) @@ -89118,7 +89212,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the LoadBalancerPatch model loadBalancerPatchModel := new(vpcv1.LoadBalancerPatch) @@ -89154,7 +89248,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the DnsInstanceIdentityByCRN model dnsInstanceIdentityModel := new(vpcv1.DnsInstanceIdentityByCRN) - dnsInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:dns-svcs:global:a/123456:6860c359-b2e2-46fa-a944-b38c28201c6e") + dnsInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e") // Construct an instance of the DnsZoneIdentityByID model dnsZoneIdentityModel := new(vpcv1.DnsZoneIdentityByID) @@ -89175,7 +89269,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the LoadBalancerPatch model loadBalancerPatchModel := new(vpcv1.LoadBalancerPatch) @@ -89232,7 +89326,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the DnsInstanceIdentityByCRN model dnsInstanceIdentityModel := new(vpcv1.DnsInstanceIdentityByCRN) - dnsInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:dns-svcs:global:a/123456:6860c359-b2e2-46fa-a944-b38c28201c6e") + dnsInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e") // Construct an instance of the DnsZoneIdentityByID model dnsZoneIdentityModel := new(vpcv1.DnsZoneIdentityByID) @@ -89253,7 +89347,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") // Construct an instance of the LoadBalancerPatch model loadBalancerPatchModel := new(vpcv1.LoadBalancerPatch) @@ -89578,7 +89672,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"listeners": [{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "https_redirect": {"http_status_code": 301, "listener": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "uri": "/example?doc=get"}, "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "idle_connection_timeout": 100, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}]}`) + fmt.Fprintf(res, "%s", `{"listeners": [{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "https_redirect": {"http_status_code": 301, "listener": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "uri": "/example?doc=get"}, "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "idle_connection_timeout": 100, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}]}`) })) }) It(`Invoke ListLoadBalancerListeners successfully with retries`, func() { @@ -89635,7 +89729,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"listeners": [{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "https_redirect": {"http_status_code": 301, "listener": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "uri": "/example?doc=get"}, "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "idle_connection_timeout": 100, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}]}`) + fmt.Fprintf(res, "%s", `{"listeners": [{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "https_redirect": {"http_status_code": 301, "listener": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "uri": "/example?doc=get"}, "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "idle_connection_timeout": 100, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}]}`) })) }) It(`Invoke ListLoadBalancerListeners successfully`, func() { @@ -89763,7 +89857,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the CertificateInstanceIdentityByCRN model certificateInstanceIdentityModel := new(vpcv1.CertificateInstanceIdentityByCRN) - certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") // Construct an instance of the LoadBalancerPoolIdentityLoadBalancerPoolIdentityByID model loadBalancerPoolIdentityModel := new(vpcv1.LoadBalancerPoolIdentityLoadBalancerPoolIdentityByID) @@ -89867,7 +89961,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "https_redirect": {"http_status_code": 301, "listener": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "uri": "/example?doc=get"}, "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "idle_connection_timeout": 100, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}`) + fmt.Fprintf(res, "%s", `{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "https_redirect": {"http_status_code": 301, "listener": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "uri": "/example?doc=get"}, "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "idle_connection_timeout": 100, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}`) })) }) It(`Invoke CreateLoadBalancerListener successfully with retries`, func() { @@ -89882,7 +89976,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the CertificateInstanceIdentityByCRN model certificateInstanceIdentityModel := new(vpcv1.CertificateInstanceIdentityByCRN) - certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") // Construct an instance of the LoadBalancerPoolIdentityLoadBalancerPoolIdentityByID model loadBalancerPoolIdentityModel := new(vpcv1.LoadBalancerPoolIdentityLoadBalancerPoolIdentityByID) @@ -89988,7 +90082,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "https_redirect": {"http_status_code": 301, "listener": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "uri": "/example?doc=get"}, "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "idle_connection_timeout": 100, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}`) + fmt.Fprintf(res, "%s", `{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "https_redirect": {"http_status_code": 301, "listener": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "uri": "/example?doc=get"}, "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "idle_connection_timeout": 100, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}`) })) }) It(`Invoke CreateLoadBalancerListener successfully`, func() { @@ -90008,7 +90102,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the CertificateInstanceIdentityByCRN model certificateInstanceIdentityModel := new(vpcv1.CertificateInstanceIdentityByCRN) - certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") // Construct an instance of the LoadBalancerPoolIdentityLoadBalancerPoolIdentityByID model loadBalancerPoolIdentityModel := new(vpcv1.LoadBalancerPoolIdentityLoadBalancerPoolIdentityByID) @@ -90077,7 +90171,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the CertificateInstanceIdentityByCRN model certificateInstanceIdentityModel := new(vpcv1.CertificateInstanceIdentityByCRN) - certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") // Construct an instance of the LoadBalancerPoolIdentityLoadBalancerPoolIdentityByID model loadBalancerPoolIdentityModel := new(vpcv1.LoadBalancerPoolIdentityLoadBalancerPoolIdentityByID) @@ -90167,7 +90261,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the CertificateInstanceIdentityByCRN model certificateInstanceIdentityModel := new(vpcv1.CertificateInstanceIdentityByCRN) - certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") // Construct an instance of the LoadBalancerPoolIdentityLoadBalancerPoolIdentityByID model loadBalancerPoolIdentityModel := new(vpcv1.LoadBalancerPoolIdentityLoadBalancerPoolIdentityByID) @@ -90376,7 +90470,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "https_redirect": {"http_status_code": 301, "listener": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "uri": "/example?doc=get"}, "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "idle_connection_timeout": 100, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}`) + fmt.Fprintf(res, "%s", `{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "https_redirect": {"http_status_code": 301, "listener": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "uri": "/example?doc=get"}, "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "idle_connection_timeout": 100, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}`) })) }) It(`Invoke GetLoadBalancerListener successfully with retries`, func() { @@ -90434,7 +90528,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "https_redirect": {"http_status_code": 301, "listener": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "uri": "/example?doc=get"}, "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "idle_connection_timeout": 100, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}`) + fmt.Fprintf(res, "%s", `{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "https_redirect": {"http_status_code": 301, "listener": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "uri": "/example?doc=get"}, "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "idle_connection_timeout": 100, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}`) })) }) It(`Invoke GetLoadBalancerListener successfully`, func() { @@ -90565,7 +90659,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the CertificateInstanceIdentityByCRN model certificateInstanceIdentityModel := new(vpcv1.CertificateInstanceIdentityByCRN) - certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") // Construct an instance of the LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByID model loadBalancerListenerDefaultPoolPatchModel := new(vpcv1.LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByID) @@ -90656,7 +90750,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "https_redirect": {"http_status_code": 301, "listener": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "uri": "/example?doc=get"}, "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "idle_connection_timeout": 100, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}`) + fmt.Fprintf(res, "%s", `{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "https_redirect": {"http_status_code": 301, "listener": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "uri": "/example?doc=get"}, "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "idle_connection_timeout": 100, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}`) })) }) It(`Invoke UpdateLoadBalancerListener successfully with retries`, func() { @@ -90671,7 +90765,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the CertificateInstanceIdentityByCRN model certificateInstanceIdentityModel := new(vpcv1.CertificateInstanceIdentityByCRN) - certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") // Construct an instance of the LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByID model loadBalancerListenerDefaultPoolPatchModel := new(vpcv1.LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByID) @@ -90764,7 +90858,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "https_redirect": {"http_status_code": 301, "listener": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "uri": "/example?doc=get"}, "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "idle_connection_timeout": 100, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}`) + fmt.Fprintf(res, "%s", `{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "https_redirect": {"http_status_code": 301, "listener": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "uri": "/example?doc=get"}, "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "idle_connection_timeout": 100, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}`) })) }) It(`Invoke UpdateLoadBalancerListener successfully`, func() { @@ -90784,7 +90878,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the CertificateInstanceIdentityByCRN model certificateInstanceIdentityModel := new(vpcv1.CertificateInstanceIdentityByCRN) - certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") // Construct an instance of the LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByID model loadBalancerListenerDefaultPoolPatchModel := new(vpcv1.LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByID) @@ -90840,7 +90934,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the CertificateInstanceIdentityByCRN model certificateInstanceIdentityModel := new(vpcv1.CertificateInstanceIdentityByCRN) - certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") // Construct an instance of the LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByID model loadBalancerListenerDefaultPoolPatchModel := new(vpcv1.LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByID) @@ -90917,7 +91011,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the CertificateInstanceIdentityByCRN model certificateInstanceIdentityModel := new(vpcv1.CertificateInstanceIdentityByCRN) - certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") // Construct an instance of the LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByID model loadBalancerListenerDefaultPoolPatchModel := new(vpcv1.LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByID) @@ -93416,7 +93510,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"pools": [{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group"}, "members": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}]}`) + fmt.Fprintf(res, "%s", `{"pools": [{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group"}, "members": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}]}`) })) }) It(`Invoke ListLoadBalancerPools successfully with retries`, func() { @@ -93473,7 +93567,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"pools": [{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group"}, "members": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}]}`) + fmt.Fprintf(res, "%s", `{"pools": [{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group"}, "members": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}]}`) })) }) It(`Invoke ListLoadBalancerPools successfully`, func() { @@ -93610,7 +93704,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID model loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) - loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") // Construct an instance of the LoadBalancerPoolMemberPrototype model loadBalancerPoolMemberPrototypeModel := new(vpcv1.LoadBalancerPoolMemberPrototype) @@ -93688,7 +93782,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group"}, "members": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}`) + fmt.Fprintf(res, "%s", `{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group"}, "members": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}`) })) }) It(`Invoke CreateLoadBalancerPool successfully with retries`, func() { @@ -93712,7 +93806,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID model loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) - loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") // Construct an instance of the LoadBalancerPoolMemberPrototype model loadBalancerPoolMemberPrototypeModel := new(vpcv1.LoadBalancerPoolMemberPrototype) @@ -93792,7 +93886,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group"}, "members": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}`) + fmt.Fprintf(res, "%s", `{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group"}, "members": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}`) })) }) It(`Invoke CreateLoadBalancerPool successfully`, func() { @@ -93821,7 +93915,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID model loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) - loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") // Construct an instance of the LoadBalancerPoolMemberPrototype model loadBalancerPoolMemberPrototypeModel := new(vpcv1.LoadBalancerPoolMemberPrototype) @@ -93873,7 +93967,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID model loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) - loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") // Construct an instance of the LoadBalancerPoolMemberPrototype model loadBalancerPoolMemberPrototypeModel := new(vpcv1.LoadBalancerPoolMemberPrototype) @@ -93946,7 +94040,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID model loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) - loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") // Construct an instance of the LoadBalancerPoolMemberPrototype model loadBalancerPoolMemberPrototypeModel := new(vpcv1.LoadBalancerPoolMemberPrototype) @@ -94129,7 +94223,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group"}, "members": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}`) + fmt.Fprintf(res, "%s", `{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group"}, "members": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}`) })) }) It(`Invoke GetLoadBalancerPool successfully with retries`, func() { @@ -94187,7 +94281,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group"}, "members": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}`) + fmt.Fprintf(res, "%s", `{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group"}, "members": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}`) })) }) It(`Invoke GetLoadBalancerPool successfully`, func() { @@ -94401,7 +94495,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group"}, "members": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}`) + fmt.Fprintf(res, "%s", `{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group"}, "members": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}`) })) }) It(`Invoke UpdateLoadBalancerPool successfully with retries`, func() { @@ -94501,7 +94595,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group"}, "members": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}`) + fmt.Fprintf(res, "%s", `{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group"}, "members": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}`) })) }) It(`Invoke UpdateLoadBalancerPool successfully`, func() { @@ -94751,7 +94845,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"members": [{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "weight": 50}]}`) + fmt.Fprintf(res, "%s", `{"members": [{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "weight": 50}]}`) })) }) It(`Invoke ListLoadBalancerPoolMembers successfully with retries`, func() { @@ -94809,7 +94903,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"members": [{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "weight": 50}]}`) + fmt.Fprintf(res, "%s", `{"members": [{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "weight": 50}]}`) })) }) It(`Invoke ListLoadBalancerPoolMembers successfully`, func() { @@ -94940,7 +95034,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID model loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) - loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") // Construct an instance of the CreateLoadBalancerPoolMemberOptions model createLoadBalancerPoolMemberOptionsModel := new(vpcv1.CreateLoadBalancerPoolMemberOptions) @@ -95004,7 +95098,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "weight": 50}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "weight": 50}`) })) }) It(`Invoke CreateLoadBalancerPoolMember successfully with retries`, func() { @@ -95019,7 +95113,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID model loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) - loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") // Construct an instance of the CreateLoadBalancerPoolMemberOptions model createLoadBalancerPoolMemberOptionsModel := new(vpcv1.CreateLoadBalancerPoolMemberOptions) @@ -95085,7 +95179,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "weight": 50}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "weight": 50}`) })) }) It(`Invoke CreateLoadBalancerPoolMember successfully`, func() { @@ -95105,7 +95199,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID model loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) - loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") // Construct an instance of the CreateLoadBalancerPoolMemberOptions model createLoadBalancerPoolMemberOptionsModel := new(vpcv1.CreateLoadBalancerPoolMemberOptions) @@ -95134,7 +95228,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID model loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) - loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") // Construct an instance of the CreateLoadBalancerPoolMemberOptions model createLoadBalancerPoolMemberOptionsModel := new(vpcv1.CreateLoadBalancerPoolMemberOptions) @@ -95184,7 +95278,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID model loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) - loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") // Construct an instance of the CreateLoadBalancerPoolMemberOptions model createLoadBalancerPoolMemberOptionsModel := new(vpcv1.CreateLoadBalancerPoolMemberOptions) @@ -95237,7 +95331,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID model loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) - loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") // Construct an instance of the LoadBalancerPoolMemberPrototype model loadBalancerPoolMemberPrototypeModel := new(vpcv1.LoadBalancerPoolMemberPrototype) @@ -95305,7 +95399,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(202) - fmt.Fprintf(res, "%s", `{"members": [{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "weight": 50}]}`) + fmt.Fprintf(res, "%s", `{"members": [{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "weight": 50}]}`) })) }) It(`Invoke ReplaceLoadBalancerPoolMembers successfully with retries`, func() { @@ -95320,7 +95414,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID model loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) - loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") // Construct an instance of the LoadBalancerPoolMemberPrototype model loadBalancerPoolMemberPrototypeModel := new(vpcv1.LoadBalancerPoolMemberPrototype) @@ -95390,7 +95484,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(202) - fmt.Fprintf(res, "%s", `{"members": [{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "weight": 50}]}`) + fmt.Fprintf(res, "%s", `{"members": [{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "weight": 50}]}`) })) }) It(`Invoke ReplaceLoadBalancerPoolMembers successfully`, func() { @@ -95410,7 +95504,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID model loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) - loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") // Construct an instance of the LoadBalancerPoolMemberPrototype model loadBalancerPoolMemberPrototypeModel := new(vpcv1.LoadBalancerPoolMemberPrototype) @@ -95443,7 +95537,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID model loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) - loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") // Construct an instance of the LoadBalancerPoolMemberPrototype model loadBalancerPoolMemberPrototypeModel := new(vpcv1.LoadBalancerPoolMemberPrototype) @@ -95497,7 +95591,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID model loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) - loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") // Construct an instance of the LoadBalancerPoolMemberPrototype model loadBalancerPoolMemberPrototypeModel := new(vpcv1.LoadBalancerPoolMemberPrototype) @@ -95673,7 +95767,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "weight": 50}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "weight": 50}`) })) }) It(`Invoke GetLoadBalancerPoolMember successfully with retries`, func() { @@ -95732,7 +95826,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "weight": 50}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "weight": 50}`) })) }) It(`Invoke GetLoadBalancerPoolMember successfully`, func() { @@ -95866,7 +95960,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID model loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) - loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") // Construct an instance of the LoadBalancerPoolMemberPatch model loadBalancerPoolMemberPatchModel := new(vpcv1.LoadBalancerPoolMemberPatch) @@ -95937,7 +96031,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "weight": 50}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "weight": 50}`) })) }) It(`Invoke UpdateLoadBalancerPoolMember successfully with retries`, func() { @@ -95952,7 +96046,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID model loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) - loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") // Construct an instance of the LoadBalancerPoolMemberPatch model loadBalancerPoolMemberPatchModel := new(vpcv1.LoadBalancerPoolMemberPatch) @@ -96025,7 +96119,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "weight": 50}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "weight": 50}`) })) }) It(`Invoke UpdateLoadBalancerPoolMember successfully`, func() { @@ -96045,7 +96139,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID model loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) - loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") // Construct an instance of the LoadBalancerPoolMemberPatch model loadBalancerPoolMemberPatchModel := new(vpcv1.LoadBalancerPoolMemberPatch) @@ -96081,7 +96175,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID model loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) - loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") // Construct an instance of the LoadBalancerPoolMemberPatch model loadBalancerPoolMemberPatchModel := new(vpcv1.LoadBalancerPoolMemberPatch) @@ -96138,7 +96232,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID model loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) - loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") // Construct an instance of the LoadBalancerPoolMemberPatch model loadBalancerPoolMemberPatchModel := new(vpcv1.LoadBalancerPoolMemberPatch) @@ -96187,7 +96281,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["vpc.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) + Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"my-vpc"})) // TODO: Add check for allow_dns_resolution_binding query parameter res.Header().Set("Content-type", "application/json") @@ -96211,7 +96305,7 @@ var _ = Describe(`VpcV1`, func() { listEndpointGatewaysOptionsModel.Limit = core.Int64Ptr(int64(10)) listEndpointGatewaysOptionsModel.ResourceGroupID = core.StringPtr("testString") listEndpointGatewaysOptionsModel.VPCID = core.StringPtr("testString") - listEndpointGatewaysOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listEndpointGatewaysOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listEndpointGatewaysOptionsModel.VPCName = core.StringPtr("my-vpc") listEndpointGatewaysOptionsModel.AllowDnsResolutionBinding = core.BoolPtr(true) listEndpointGatewaysOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -96252,7 +96346,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["vpc.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) + Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"my-vpc"})) // TODO: Add check for allow_dns_resolution_binding query parameter // Sleep a short time to support a timeout test @@ -96261,7 +96355,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"endpoint_gateways": [{"allow_dns_resolution_binding": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_reasons": [{"code": "dns_resolution_binding_pending", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:cloudant:us-south:a/123456:3527280b-9327-4411-8020-591092e60353::", "resource_type": "provider_cloud_service"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways?start=ffd653466e284937896724b2dd044c9c&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"endpoint_gateways": [{"allow_dns_resolution_binding": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_reasons": [{"code": "dns_resolution_binding_pending", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:cloudant:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:3527280b-9327-4411-8020-591092e60353::", "resource_type": "provider_cloud_service"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways?start=ffd653466e284937896724b2dd044c9c&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListEndpointGateways successfully with retries`, func() { @@ -96281,7 +96375,7 @@ var _ = Describe(`VpcV1`, func() { listEndpointGatewaysOptionsModel.Limit = core.Int64Ptr(int64(10)) listEndpointGatewaysOptionsModel.ResourceGroupID = core.StringPtr("testString") listEndpointGatewaysOptionsModel.VPCID = core.StringPtr("testString") - listEndpointGatewaysOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listEndpointGatewaysOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listEndpointGatewaysOptionsModel.VPCName = core.StringPtr("my-vpc") listEndpointGatewaysOptionsModel.AllowDnsResolutionBinding = core.BoolPtr(true) listEndpointGatewaysOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -96327,13 +96421,13 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["vpc.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) + Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"my-vpc"})) // TODO: Add check for allow_dns_resolution_binding query parameter // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"endpoint_gateways": [{"allow_dns_resolution_binding": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_reasons": [{"code": "dns_resolution_binding_pending", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:cloudant:us-south:a/123456:3527280b-9327-4411-8020-591092e60353::", "resource_type": "provider_cloud_service"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways?start=ffd653466e284937896724b2dd044c9c&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"endpoint_gateways": [{"allow_dns_resolution_binding": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_reasons": [{"code": "dns_resolution_binding_pending", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:cloudant:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:3527280b-9327-4411-8020-591092e60353::", "resource_type": "provider_cloud_service"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways?start=ffd653466e284937896724b2dd044c9c&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListEndpointGateways successfully`, func() { @@ -96358,7 +96452,7 @@ var _ = Describe(`VpcV1`, func() { listEndpointGatewaysOptionsModel.Limit = core.Int64Ptr(int64(10)) listEndpointGatewaysOptionsModel.ResourceGroupID = core.StringPtr("testString") listEndpointGatewaysOptionsModel.VPCID = core.StringPtr("testString") - listEndpointGatewaysOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listEndpointGatewaysOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listEndpointGatewaysOptionsModel.VPCName = core.StringPtr("my-vpc") listEndpointGatewaysOptionsModel.AllowDnsResolutionBinding = core.BoolPtr(true) listEndpointGatewaysOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -96386,7 +96480,7 @@ var _ = Describe(`VpcV1`, func() { listEndpointGatewaysOptionsModel.Limit = core.Int64Ptr(int64(10)) listEndpointGatewaysOptionsModel.ResourceGroupID = core.StringPtr("testString") listEndpointGatewaysOptionsModel.VPCID = core.StringPtr("testString") - listEndpointGatewaysOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listEndpointGatewaysOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listEndpointGatewaysOptionsModel.VPCName = core.StringPtr("my-vpc") listEndpointGatewaysOptionsModel.AllowDnsResolutionBinding = core.BoolPtr(true) listEndpointGatewaysOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -96428,7 +96522,7 @@ var _ = Describe(`VpcV1`, func() { listEndpointGatewaysOptionsModel.Limit = core.Int64Ptr(int64(10)) listEndpointGatewaysOptionsModel.ResourceGroupID = core.StringPtr("testString") listEndpointGatewaysOptionsModel.VPCID = core.StringPtr("testString") - listEndpointGatewaysOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listEndpointGatewaysOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listEndpointGatewaysOptionsModel.VPCName = core.StringPtr("my-vpc") listEndpointGatewaysOptionsModel.AllowDnsResolutionBinding = core.BoolPtr(true) listEndpointGatewaysOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -96489,9 +96583,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"endpoint_gateways":[{"allow_dns_resolution_binding":false,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"lifecycle_reasons":[{"code":"dns_resolution_binding_pending","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","name":"my-endpoint-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"endpoint_gateway","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"service_endpoint":"my-cloudant-instance.appdomain.cloud","service_endpoints":["my-cloudant-instance.appdomain.cloud"],"target":{"crn":"crn:v1:bluemix:public:cloudant:us-south:a/123456:3527280b-9327-4411-8020-591092e60353::","resource_type":"provider_cloud_service"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}],"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"endpoint_gateways":[{"allow_dns_resolution_binding":false,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"lifecycle_reasons":[{"code":"dns_resolution_binding_pending","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","name":"my-endpoint-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"endpoint_gateway","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"service_endpoint":"my-cloudant-instance.appdomain.cloud","service_endpoints":["my-cloudant-instance.appdomain.cloud"],"target":{"crn":"crn:v1:bluemix:public:cloudant:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:3527280b-9327-4411-8020-591092e60353::","resource_type":"provider_cloud_service"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}],"total_count":2,"limit":1}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"endpoint_gateways":[{"allow_dns_resolution_binding":false,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"lifecycle_reasons":[{"code":"dns_resolution_binding_pending","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","name":"my-endpoint-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"endpoint_gateway","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"service_endpoint":"my-cloudant-instance.appdomain.cloud","service_endpoints":["my-cloudant-instance.appdomain.cloud"],"target":{"crn":"crn:v1:bluemix:public:cloudant:us-south:a/123456:3527280b-9327-4411-8020-591092e60353::","resource_type":"provider_cloud_service"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}],"total_count":2,"limit":1}`) + fmt.Fprintf(res, "%s", `{"endpoint_gateways":[{"allow_dns_resolution_binding":false,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"lifecycle_reasons":[{"code":"dns_resolution_binding_pending","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","name":"my-endpoint-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"endpoint_gateway","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"service_endpoint":"my-cloudant-instance.appdomain.cloud","service_endpoints":["my-cloudant-instance.appdomain.cloud"],"target":{"crn":"crn:v1:bluemix:public:cloudant:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:3527280b-9327-4411-8020-591092e60353::","resource_type":"provider_cloud_service"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}],"total_count":2,"limit":1}`) } else { res.WriteHeader(400) } @@ -96511,7 +96605,7 @@ var _ = Describe(`VpcV1`, func() { Limit: core.Int64Ptr(int64(10)), ResourceGroupID: core.StringPtr("testString"), VPCID: core.StringPtr("testString"), - VPCCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"), + VPCCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"), VPCName: core.StringPtr("my-vpc"), AllowDnsResolutionBinding: core.BoolPtr(true), } @@ -96543,7 +96637,7 @@ var _ = Describe(`VpcV1`, func() { Limit: core.Int64Ptr(int64(10)), ResourceGroupID: core.StringPtr("testString"), VPCID: core.StringPtr("testString"), - VPCCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"), + VPCCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"), VPCName: core.StringPtr("my-vpc"), AllowDnsResolutionBinding: core.BoolPtr(true), } @@ -96597,7 +96691,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EndpointGatewayReservedIPReservedIPIdentityByID model endpointGatewayReservedIPModel := new(vpcv1.EndpointGatewayReservedIPReservedIPIdentityByID) - endpointGatewayReservedIPModel.ID = core.StringPtr("6d353a0f-aeb1-4ae1-832e-1110d10981bb") + endpointGatewayReservedIPModel.ID = core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) @@ -96605,7 +96699,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SecurityGroupIdentityByID model securityGroupIdentityModel := new(vpcv1.SecurityGroupIdentityByID) - securityGroupIdentityModel.ID = core.StringPtr("be5df5ca-12a0-494b-907e-aa6ec2bfa271") + securityGroupIdentityModel.ID = core.StringPtr("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") // Construct an instance of the CreateEndpointGatewayOptions model createEndpointGatewayOptionsModel := new(vpcv1.CreateEndpointGatewayOptions) @@ -96671,7 +96765,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"allow_dns_resolution_binding": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_reasons": [{"code": "dns_resolution_binding_pending", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:cloudant:us-south:a/123456:3527280b-9327-4411-8020-591092e60353::", "resource_type": "provider_cloud_service"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"allow_dns_resolution_binding": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_reasons": [{"code": "dns_resolution_binding_pending", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:cloudant:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:3527280b-9327-4411-8020-591092e60353::", "resource_type": "provider_cloud_service"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke CreateEndpointGateway successfully with retries`, func() { @@ -96695,7 +96789,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EndpointGatewayReservedIPReservedIPIdentityByID model endpointGatewayReservedIPModel := new(vpcv1.EndpointGatewayReservedIPReservedIPIdentityByID) - endpointGatewayReservedIPModel.ID = core.StringPtr("6d353a0f-aeb1-4ae1-832e-1110d10981bb") + endpointGatewayReservedIPModel.ID = core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) @@ -96703,7 +96797,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SecurityGroupIdentityByID model securityGroupIdentityModel := new(vpcv1.SecurityGroupIdentityByID) - securityGroupIdentityModel.ID = core.StringPtr("be5df5ca-12a0-494b-907e-aa6ec2bfa271") + securityGroupIdentityModel.ID = core.StringPtr("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") // Construct an instance of the CreateEndpointGatewayOptions model createEndpointGatewayOptionsModel := new(vpcv1.CreateEndpointGatewayOptions) @@ -96771,7 +96865,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"allow_dns_resolution_binding": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_reasons": [{"code": "dns_resolution_binding_pending", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:cloudant:us-south:a/123456:3527280b-9327-4411-8020-591092e60353::", "resource_type": "provider_cloud_service"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"allow_dns_resolution_binding": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_reasons": [{"code": "dns_resolution_binding_pending", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:cloudant:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:3527280b-9327-4411-8020-591092e60353::", "resource_type": "provider_cloud_service"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke CreateEndpointGateway successfully`, func() { @@ -96800,7 +96894,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EndpointGatewayReservedIPReservedIPIdentityByID model endpointGatewayReservedIPModel := new(vpcv1.EndpointGatewayReservedIPReservedIPIdentityByID) - endpointGatewayReservedIPModel.ID = core.StringPtr("6d353a0f-aeb1-4ae1-832e-1110d10981bb") + endpointGatewayReservedIPModel.ID = core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) @@ -96808,7 +96902,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SecurityGroupIdentityByID model securityGroupIdentityModel := new(vpcv1.SecurityGroupIdentityByID) - securityGroupIdentityModel.ID = core.StringPtr("be5df5ca-12a0-494b-907e-aa6ec2bfa271") + securityGroupIdentityModel.ID = core.StringPtr("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") // Construct an instance of the CreateEndpointGatewayOptions model createEndpointGatewayOptionsModel := new(vpcv1.CreateEndpointGatewayOptions) @@ -96848,7 +96942,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EndpointGatewayReservedIPReservedIPIdentityByID model endpointGatewayReservedIPModel := new(vpcv1.EndpointGatewayReservedIPReservedIPIdentityByID) - endpointGatewayReservedIPModel.ID = core.StringPtr("6d353a0f-aeb1-4ae1-832e-1110d10981bb") + endpointGatewayReservedIPModel.ID = core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) @@ -96856,7 +96950,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SecurityGroupIdentityByID model securityGroupIdentityModel := new(vpcv1.SecurityGroupIdentityByID) - securityGroupIdentityModel.ID = core.StringPtr("be5df5ca-12a0-494b-907e-aa6ec2bfa271") + securityGroupIdentityModel.ID = core.StringPtr("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") // Construct an instance of the CreateEndpointGatewayOptions model createEndpointGatewayOptionsModel := new(vpcv1.CreateEndpointGatewayOptions) @@ -96917,7 +97011,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EndpointGatewayReservedIPReservedIPIdentityByID model endpointGatewayReservedIPModel := new(vpcv1.EndpointGatewayReservedIPReservedIPIdentityByID) - endpointGatewayReservedIPModel.ID = core.StringPtr("6d353a0f-aeb1-4ae1-832e-1110d10981bb") + endpointGatewayReservedIPModel.ID = core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) @@ -96925,7 +97019,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SecurityGroupIdentityByID model securityGroupIdentityModel := new(vpcv1.SecurityGroupIdentityByID) - securityGroupIdentityModel.ID = core.StringPtr("be5df5ca-12a0-494b-907e-aa6ec2bfa271") + securityGroupIdentityModel.ID = core.StringPtr("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") // Construct an instance of the CreateEndpointGatewayOptions model createEndpointGatewayOptionsModel := new(vpcv1.CreateEndpointGatewayOptions) @@ -97029,7 +97123,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/d7cc5196-9864-48c4-82d8-3f30da41fcc5/ips?limit=20"}, "ips": [{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/d7cc5196-9864-48c4-82d8-3f30da41fcc5/ips?start=90ac13871b604023ab8b827178518328&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/d7cc5196-9864-48c4-82d8-3f30da41fcc5/ips?limit=20"}, "ips": [{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/d7cc5196-9864-48c4-82d8-3f30da41fcc5/ips?start=90ac13871b604023ab8b827178518328&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListEndpointGatewayIps successfully with retries`, func() { @@ -97092,7 +97186,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/d7cc5196-9864-48c4-82d8-3f30da41fcc5/ips?limit=20"}, "ips": [{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/d7cc5196-9864-48c4-82d8-3f30da41fcc5/ips?start=90ac13871b604023ab8b827178518328&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/d7cc5196-9864-48c4-82d8-3f30da41fcc5/ips?limit=20"}, "ips": [{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/d7cc5196-9864-48c4-82d8-3f30da41fcc5/ips?start=90ac13871b604023ab8b827178518328&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListEndpointGatewayIps successfully`, func() { @@ -97243,9 +97337,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"ips":[{"address":"192.168.3.4","auto_delete":false,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","lifecycle_state":"stable","name":"my-reserved-ip","owner":"user","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","name":"my-endpoint-gateway","resource_type":"endpoint_gateway"}}]}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"ips":[{"address":"192.168.3.4","auto_delete":false,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","lifecycle_state":"stable","name":"my-reserved-ip","owner":"user","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","name":"my-endpoint-gateway","resource_type":"endpoint_gateway"}}]}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"ips":[{"address":"192.168.3.4","auto_delete":false,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","lifecycle_state":"stable","name":"my-reserved-ip","owner":"user","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","name":"my-endpoint-gateway","resource_type":"endpoint_gateway"}}]}`) + fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"ips":[{"address":"192.168.3.4","auto_delete":false,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","lifecycle_state":"stable","name":"my-reserved-ip","owner":"user","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","name":"my-endpoint-gateway","resource_type":"endpoint_gateway"}}]}`) } else { res.WriteHeader(400) } @@ -97450,7 +97544,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}`) + fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}`) })) }) It(`Invoke GetEndpointGatewayIP successfully with retries`, func() { @@ -97508,7 +97602,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}`) + fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}`) })) }) It(`Invoke GetEndpointGatewayIP successfully`, func() { @@ -97680,7 +97774,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}`) + fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}`) })) }) It(`Invoke AddEndpointGatewayIP successfully with retries`, func() { @@ -97738,7 +97832,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}`) + fmt.Fprintf(res, "%s", `{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}`) })) }) It(`Invoke AddEndpointGatewayIP successfully`, func() { @@ -97982,7 +98076,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"allow_dns_resolution_binding": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_reasons": [{"code": "dns_resolution_binding_pending", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:cloudant:us-south:a/123456:3527280b-9327-4411-8020-591092e60353::", "resource_type": "provider_cloud_service"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"allow_dns_resolution_binding": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_reasons": [{"code": "dns_resolution_binding_pending", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:cloudant:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:3527280b-9327-4411-8020-591092e60353::", "resource_type": "provider_cloud_service"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke GetEndpointGateway successfully with retries`, func() { @@ -98039,7 +98133,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"allow_dns_resolution_binding": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_reasons": [{"code": "dns_resolution_binding_pending", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:cloudant:us-south:a/123456:3527280b-9327-4411-8020-591092e60353::", "resource_type": "provider_cloud_service"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"allow_dns_resolution_binding": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_reasons": [{"code": "dns_resolution_binding_pending", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:cloudant:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:3527280b-9327-4411-8020-591092e60353::", "resource_type": "provider_cloud_service"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke GetEndpointGateway successfully`, func() { @@ -98231,7 +98325,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"allow_dns_resolution_binding": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_reasons": [{"code": "dns_resolution_binding_pending", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:cloudant:us-south:a/123456:3527280b-9327-4411-8020-591092e60353::", "resource_type": "provider_cloud_service"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"allow_dns_resolution_binding": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_reasons": [{"code": "dns_resolution_binding_pending", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:cloudant:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:3527280b-9327-4411-8020-591092e60353::", "resource_type": "provider_cloud_service"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke UpdateEndpointGateway successfully with retries`, func() { @@ -98312,7 +98406,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"allow_dns_resolution_binding": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_reasons": [{"code": "dns_resolution_binding_pending", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:cloudant:us-south:a/123456:3527280b-9327-4411-8020-591092e60353::", "resource_type": "provider_cloud_service"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"allow_dns_resolution_binding": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_reasons": [{"code": "dns_resolution_binding_pending", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:cloudant:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:3527280b-9327-4411-8020-591092e60353::", "resource_type": "provider_cloud_service"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke UpdateEndpointGateway successfully`, func() { @@ -98453,7 +98547,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["vpc.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) + Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"my-vpc"})) Expect(req.URL.Query()["target.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["target.resource_type"]).To(Equal([]string{"testString"})) @@ -98478,7 +98572,7 @@ var _ = Describe(`VpcV1`, func() { listFlowLogCollectorsOptionsModel.ResourceGroupID = core.StringPtr("testString") listFlowLogCollectorsOptionsModel.Name = core.StringPtr("testString") listFlowLogCollectorsOptionsModel.VPCID = core.StringPtr("testString") - listFlowLogCollectorsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listFlowLogCollectorsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listFlowLogCollectorsOptionsModel.VPCName = core.StringPtr("my-vpc") listFlowLogCollectorsOptionsModel.TargetID = core.StringPtr("testString") listFlowLogCollectorsOptionsModel.TargetResourceType = core.StringPtr("testString") @@ -98520,7 +98614,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["vpc.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) + Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"my-vpc"})) Expect(req.URL.Query()["target.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["target.resource_type"]).To(Equal([]string{"testString"})) @@ -98530,7 +98624,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?limit=20"}, "flow_log_collectors": [{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?limit=20"}, "flow_log_collectors": [{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListFlowLogCollectors successfully with retries`, func() { @@ -98550,7 +98644,7 @@ var _ = Describe(`VpcV1`, func() { listFlowLogCollectorsOptionsModel.ResourceGroupID = core.StringPtr("testString") listFlowLogCollectorsOptionsModel.Name = core.StringPtr("testString") listFlowLogCollectorsOptionsModel.VPCID = core.StringPtr("testString") - listFlowLogCollectorsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listFlowLogCollectorsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listFlowLogCollectorsOptionsModel.VPCName = core.StringPtr("my-vpc") listFlowLogCollectorsOptionsModel.TargetID = core.StringPtr("testString") listFlowLogCollectorsOptionsModel.TargetResourceType = core.StringPtr("testString") @@ -98597,14 +98691,14 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["vpc.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) + Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"})) Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"my-vpc"})) Expect(req.URL.Query()["target.id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["target.resource_type"]).To(Equal([]string{"testString"})) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?limit=20"}, "flow_log_collectors": [{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?limit=20"}, "flow_log_collectors": [{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListFlowLogCollectors successfully`, func() { @@ -98629,7 +98723,7 @@ var _ = Describe(`VpcV1`, func() { listFlowLogCollectorsOptionsModel.ResourceGroupID = core.StringPtr("testString") listFlowLogCollectorsOptionsModel.Name = core.StringPtr("testString") listFlowLogCollectorsOptionsModel.VPCID = core.StringPtr("testString") - listFlowLogCollectorsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listFlowLogCollectorsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listFlowLogCollectorsOptionsModel.VPCName = core.StringPtr("my-vpc") listFlowLogCollectorsOptionsModel.TargetID = core.StringPtr("testString") listFlowLogCollectorsOptionsModel.TargetResourceType = core.StringPtr("testString") @@ -98658,7 +98752,7 @@ var _ = Describe(`VpcV1`, func() { listFlowLogCollectorsOptionsModel.ResourceGroupID = core.StringPtr("testString") listFlowLogCollectorsOptionsModel.Name = core.StringPtr("testString") listFlowLogCollectorsOptionsModel.VPCID = core.StringPtr("testString") - listFlowLogCollectorsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listFlowLogCollectorsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listFlowLogCollectorsOptionsModel.VPCName = core.StringPtr("my-vpc") listFlowLogCollectorsOptionsModel.TargetID = core.StringPtr("testString") listFlowLogCollectorsOptionsModel.TargetResourceType = core.StringPtr("testString") @@ -98701,7 +98795,7 @@ var _ = Describe(`VpcV1`, func() { listFlowLogCollectorsOptionsModel.ResourceGroupID = core.StringPtr("testString") listFlowLogCollectorsOptionsModel.Name = core.StringPtr("testString") listFlowLogCollectorsOptionsModel.VPCID = core.StringPtr("testString") - listFlowLogCollectorsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listFlowLogCollectorsOptionsModel.VPCCRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listFlowLogCollectorsOptionsModel.VPCName = core.StringPtr("my-vpc") listFlowLogCollectorsOptionsModel.TargetID = core.StringPtr("testString") listFlowLogCollectorsOptionsModel.TargetResourceType = core.StringPtr("testString") @@ -98763,9 +98857,9 @@ var _ = Describe(`VpcV1`, func() { res.WriteHeader(200) requestNumber++ if requestNumber == 1 { - fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"flow_log_collectors":[{"active":true,"auto_delete":true,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689","href":"https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","lifecycle_state":"stable","name":"my-flow-log-collector","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"storage_bucket":{"name":"bucket-27200-lwx4cfvcue"},"target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","resource_type":"network_interface"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}]}`) + fmt.Fprintf(res, "%s", `{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"flow_log_collectors":[{"active":true,"auto_delete":true,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689","href":"https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","lifecycle_state":"stable","name":"my-flow-log-collector","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"storage_bucket":{"name":"bucket-27200-lwx4cfvcue"},"target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e","id":"0717-10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","resource_type":"network_interface"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}]}`) } else if requestNumber == 2 { - fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"flow_log_collectors":[{"active":true,"auto_delete":true,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689","href":"https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","lifecycle_state":"stable","name":"my-flow-log-collector","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"storage_bucket":{"name":"bucket-27200-lwx4cfvcue"},"target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","resource_type":"network_interface"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}]}`) + fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"flow_log_collectors":[{"active":true,"auto_delete":true,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689","href":"https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","lifecycle_state":"stable","name":"my-flow-log-collector","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"storage_bucket":{"name":"bucket-27200-lwx4cfvcue"},"target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e","id":"0717-10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","resource_type":"network_interface"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}]}`) } else { res.WriteHeader(400) } @@ -98785,7 +98879,7 @@ var _ = Describe(`VpcV1`, func() { ResourceGroupID: core.StringPtr("testString"), Name: core.StringPtr("testString"), VPCID: core.StringPtr("testString"), - VPCCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"), + VPCCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"), VPCName: core.StringPtr("my-vpc"), TargetID: core.StringPtr("testString"), TargetResourceType: core.StringPtr("testString"), @@ -98818,7 +98912,7 @@ var _ = Describe(`VpcV1`, func() { ResourceGroupID: core.StringPtr("testString"), Name: core.StringPtr("testString"), VPCID: core.StringPtr("testString"), - VPCCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"), + VPCCRN: core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"), VPCName: core.StringPtr("my-vpc"), TargetID: core.StringPtr("testString"), TargetResourceType: core.StringPtr("testString"), @@ -98868,7 +98962,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID model flowLogCollectorTargetPrototypeModel := new(vpcv1.FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID) - flowLogCollectorTargetPrototypeModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") + flowLogCollectorTargetPrototypeModel.ID = core.StringPtr("0717-10c02d81-0ecb-4dc5-897d-28392913b81e") // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) @@ -98936,7 +99030,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke CreateFlowLogCollector successfully with retries`, func() { @@ -98955,7 +99049,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID model flowLogCollectorTargetPrototypeModel := new(vpcv1.FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID) - flowLogCollectorTargetPrototypeModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") + flowLogCollectorTargetPrototypeModel.ID = core.StringPtr("0717-10c02d81-0ecb-4dc5-897d-28392913b81e") // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) @@ -99025,7 +99119,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke CreateFlowLogCollector successfully`, func() { @@ -99049,7 +99143,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID model flowLogCollectorTargetPrototypeModel := new(vpcv1.FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID) - flowLogCollectorTargetPrototypeModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") + flowLogCollectorTargetPrototypeModel.ID = core.StringPtr("0717-10c02d81-0ecb-4dc5-897d-28392913b81e") // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) @@ -99086,7 +99180,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID model flowLogCollectorTargetPrototypeModel := new(vpcv1.FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID) - flowLogCollectorTargetPrototypeModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") + flowLogCollectorTargetPrototypeModel.ID = core.StringPtr("0717-10c02d81-0ecb-4dc5-897d-28392913b81e") // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) @@ -99144,7 +99238,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID model flowLogCollectorTargetPrototypeModel := new(vpcv1.FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID) - flowLogCollectorTargetPrototypeModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") + flowLogCollectorTargetPrototypeModel.ID = core.StringPtr("0717-10c02d81-0ecb-4dc5-897d-28392913b81e") // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) @@ -99314,7 +99408,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke GetFlowLogCollector successfully with retries`, func() { @@ -99371,7 +99465,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke GetFlowLogCollector successfully`, func() { @@ -99563,7 +99657,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke UpdateFlowLogCollector successfully with retries`, func() { @@ -99644,7 +99738,7 @@ var _ = Describe(`VpcV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) + fmt.Fprintf(res, "%s", `{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}`) })) }) It(`Invoke UpdateFlowLogCollector successfully`, func() { @@ -99856,43 +99950,37 @@ var _ = Describe(`VpcV1`, func() { Expect(addVirtualNetworkInterfaceIPOptionsModel.ID).To(Equal(core.StringPtr("testString"))) Expect(addVirtualNetworkInterfaceIPOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) - It(`Invoke NewAddVPNGatewayConnectionLocalCIDROptions successfully`, func() { - // Construct an instance of the AddVPNGatewayConnectionLocalCIDROptions model + It(`Invoke NewAddVPNGatewayConnectionsLocalCIDROptions successfully`, func() { + // Construct an instance of the AddVPNGatewayConnectionsLocalCIDROptions model vpnGatewayID := "testString" id := "testString" - cidrPrefix := "testString" - prefixLength := "testString" - addVPNGatewayConnectionLocalCIDROptionsModel := vpcService.NewAddVPNGatewayConnectionLocalCIDROptions(vpnGatewayID, id, cidrPrefix, prefixLength) - addVPNGatewayConnectionLocalCIDROptionsModel.SetVPNGatewayID("testString") - addVPNGatewayConnectionLocalCIDROptionsModel.SetID("testString") - addVPNGatewayConnectionLocalCIDROptionsModel.SetCIDRPrefix("testString") - addVPNGatewayConnectionLocalCIDROptionsModel.SetPrefixLength("testString") - addVPNGatewayConnectionLocalCIDROptionsModel.SetHeaders(map[string]string{"foo": "bar"}) - Expect(addVPNGatewayConnectionLocalCIDROptionsModel).ToNot(BeNil()) - Expect(addVPNGatewayConnectionLocalCIDROptionsModel.VPNGatewayID).To(Equal(core.StringPtr("testString"))) - Expect(addVPNGatewayConnectionLocalCIDROptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(addVPNGatewayConnectionLocalCIDROptionsModel.CIDRPrefix).To(Equal(core.StringPtr("testString"))) - Expect(addVPNGatewayConnectionLocalCIDROptionsModel.PrefixLength).To(Equal(core.StringPtr("testString"))) - Expect(addVPNGatewayConnectionLocalCIDROptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) - }) - It(`Invoke NewAddVPNGatewayConnectionPeerCIDROptions successfully`, func() { - // Construct an instance of the AddVPNGatewayConnectionPeerCIDROptions model + cidr := "192.168.1.0/24" + addVPNGatewayConnectionsLocalCIDROptionsModel := vpcService.NewAddVPNGatewayConnectionsLocalCIDROptions(vpnGatewayID, id, cidr) + addVPNGatewayConnectionsLocalCIDROptionsModel.SetVPNGatewayID("testString") + addVPNGatewayConnectionsLocalCIDROptionsModel.SetID("testString") + addVPNGatewayConnectionsLocalCIDROptionsModel.SetCIDR("192.168.1.0/24") + addVPNGatewayConnectionsLocalCIDROptionsModel.SetHeaders(map[string]string{"foo": "bar"}) + Expect(addVPNGatewayConnectionsLocalCIDROptionsModel).ToNot(BeNil()) + Expect(addVPNGatewayConnectionsLocalCIDROptionsModel.VPNGatewayID).To(Equal(core.StringPtr("testString"))) + Expect(addVPNGatewayConnectionsLocalCIDROptionsModel.ID).To(Equal(core.StringPtr("testString"))) + Expect(addVPNGatewayConnectionsLocalCIDROptionsModel.CIDR).To(Equal(core.StringPtr("192.168.1.0/24"))) + Expect(addVPNGatewayConnectionsLocalCIDROptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) + }) + It(`Invoke NewAddVPNGatewayConnectionsPeerCIDROptions successfully`, func() { + // Construct an instance of the AddVPNGatewayConnectionsPeerCIDROptions model vpnGatewayID := "testString" id := "testString" - cidrPrefix := "testString" - prefixLength := "testString" - addVPNGatewayConnectionPeerCIDROptionsModel := vpcService.NewAddVPNGatewayConnectionPeerCIDROptions(vpnGatewayID, id, cidrPrefix, prefixLength) - addVPNGatewayConnectionPeerCIDROptionsModel.SetVPNGatewayID("testString") - addVPNGatewayConnectionPeerCIDROptionsModel.SetID("testString") - addVPNGatewayConnectionPeerCIDROptionsModel.SetCIDRPrefix("testString") - addVPNGatewayConnectionPeerCIDROptionsModel.SetPrefixLength("testString") - addVPNGatewayConnectionPeerCIDROptionsModel.SetHeaders(map[string]string{"foo": "bar"}) - Expect(addVPNGatewayConnectionPeerCIDROptionsModel).ToNot(BeNil()) - Expect(addVPNGatewayConnectionPeerCIDROptionsModel.VPNGatewayID).To(Equal(core.StringPtr("testString"))) - Expect(addVPNGatewayConnectionPeerCIDROptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(addVPNGatewayConnectionPeerCIDROptionsModel.CIDRPrefix).To(Equal(core.StringPtr("testString"))) - Expect(addVPNGatewayConnectionPeerCIDROptionsModel.PrefixLength).To(Equal(core.StringPtr("testString"))) - Expect(addVPNGatewayConnectionPeerCIDROptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) + cidr := "192.168.1.0/24" + addVPNGatewayConnectionsPeerCIDROptionsModel := vpcService.NewAddVPNGatewayConnectionsPeerCIDROptions(vpnGatewayID, id, cidr) + addVPNGatewayConnectionsPeerCIDROptionsModel.SetVPNGatewayID("testString") + addVPNGatewayConnectionsPeerCIDROptionsModel.SetID("testString") + addVPNGatewayConnectionsPeerCIDROptionsModel.SetCIDR("192.168.1.0/24") + addVPNGatewayConnectionsPeerCIDROptionsModel.SetHeaders(map[string]string{"foo": "bar"}) + Expect(addVPNGatewayConnectionsPeerCIDROptionsModel).ToNot(BeNil()) + Expect(addVPNGatewayConnectionsPeerCIDROptionsModel.VPNGatewayID).To(Equal(core.StringPtr("testString"))) + Expect(addVPNGatewayConnectionsPeerCIDROptionsModel.ID).To(Equal(core.StringPtr("testString"))) + Expect(addVPNGatewayConnectionsPeerCIDROptionsModel.CIDR).To(Equal(core.StringPtr("192.168.1.0/24"))) + Expect(addVPNGatewayConnectionsPeerCIDROptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewBackupPolicyPlanClonePolicyPrototype successfully`, func() { zones := []vpcv1.ZoneIdentityIntf{} @@ -99922,43 +100010,37 @@ var _ = Describe(`VpcV1`, func() { _, err := vpcService.NewBareMetalServerPrimaryNetworkInterfacePrototype(subnet) Expect(err).ToNot(BeNil()) }) - It(`Invoke NewCheckVPNGatewayConnectionLocalCIDROptions successfully`, func() { - // Construct an instance of the CheckVPNGatewayConnectionLocalCIDROptions model + It(`Invoke NewCheckVPNGatewayConnectionsLocalCIDROptions successfully`, func() { + // Construct an instance of the CheckVPNGatewayConnectionsLocalCIDROptions model vpnGatewayID := "testString" id := "testString" - cidrPrefix := "testString" - prefixLength := "testString" - checkVPNGatewayConnectionLocalCIDROptionsModel := vpcService.NewCheckVPNGatewayConnectionLocalCIDROptions(vpnGatewayID, id, cidrPrefix, prefixLength) - checkVPNGatewayConnectionLocalCIDROptionsModel.SetVPNGatewayID("testString") - checkVPNGatewayConnectionLocalCIDROptionsModel.SetID("testString") - checkVPNGatewayConnectionLocalCIDROptionsModel.SetCIDRPrefix("testString") - checkVPNGatewayConnectionLocalCIDROptionsModel.SetPrefixLength("testString") - checkVPNGatewayConnectionLocalCIDROptionsModel.SetHeaders(map[string]string{"foo": "bar"}) - Expect(checkVPNGatewayConnectionLocalCIDROptionsModel).ToNot(BeNil()) - Expect(checkVPNGatewayConnectionLocalCIDROptionsModel.VPNGatewayID).To(Equal(core.StringPtr("testString"))) - Expect(checkVPNGatewayConnectionLocalCIDROptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(checkVPNGatewayConnectionLocalCIDROptionsModel.CIDRPrefix).To(Equal(core.StringPtr("testString"))) - Expect(checkVPNGatewayConnectionLocalCIDROptionsModel.PrefixLength).To(Equal(core.StringPtr("testString"))) - Expect(checkVPNGatewayConnectionLocalCIDROptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) - }) - It(`Invoke NewCheckVPNGatewayConnectionPeerCIDROptions successfully`, func() { - // Construct an instance of the CheckVPNGatewayConnectionPeerCIDROptions model + cidr := "192.168.1.0/24" + checkVPNGatewayConnectionsLocalCIDROptionsModel := vpcService.NewCheckVPNGatewayConnectionsLocalCIDROptions(vpnGatewayID, id, cidr) + checkVPNGatewayConnectionsLocalCIDROptionsModel.SetVPNGatewayID("testString") + checkVPNGatewayConnectionsLocalCIDROptionsModel.SetID("testString") + checkVPNGatewayConnectionsLocalCIDROptionsModel.SetCIDR("192.168.1.0/24") + checkVPNGatewayConnectionsLocalCIDROptionsModel.SetHeaders(map[string]string{"foo": "bar"}) + Expect(checkVPNGatewayConnectionsLocalCIDROptionsModel).ToNot(BeNil()) + Expect(checkVPNGatewayConnectionsLocalCIDROptionsModel.VPNGatewayID).To(Equal(core.StringPtr("testString"))) + Expect(checkVPNGatewayConnectionsLocalCIDROptionsModel.ID).To(Equal(core.StringPtr("testString"))) + Expect(checkVPNGatewayConnectionsLocalCIDROptionsModel.CIDR).To(Equal(core.StringPtr("192.168.1.0/24"))) + Expect(checkVPNGatewayConnectionsLocalCIDROptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) + }) + It(`Invoke NewCheckVPNGatewayConnectionsPeerCIDROptions successfully`, func() { + // Construct an instance of the CheckVPNGatewayConnectionsPeerCIDROptions model vpnGatewayID := "testString" id := "testString" - cidrPrefix := "testString" - prefixLength := "testString" - checkVPNGatewayConnectionPeerCIDROptionsModel := vpcService.NewCheckVPNGatewayConnectionPeerCIDROptions(vpnGatewayID, id, cidrPrefix, prefixLength) - checkVPNGatewayConnectionPeerCIDROptionsModel.SetVPNGatewayID("testString") - checkVPNGatewayConnectionPeerCIDROptionsModel.SetID("testString") - checkVPNGatewayConnectionPeerCIDROptionsModel.SetCIDRPrefix("testString") - checkVPNGatewayConnectionPeerCIDROptionsModel.SetPrefixLength("testString") - checkVPNGatewayConnectionPeerCIDROptionsModel.SetHeaders(map[string]string{"foo": "bar"}) - Expect(checkVPNGatewayConnectionPeerCIDROptionsModel).ToNot(BeNil()) - Expect(checkVPNGatewayConnectionPeerCIDROptionsModel.VPNGatewayID).To(Equal(core.StringPtr("testString"))) - Expect(checkVPNGatewayConnectionPeerCIDROptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(checkVPNGatewayConnectionPeerCIDROptionsModel.CIDRPrefix).To(Equal(core.StringPtr("testString"))) - Expect(checkVPNGatewayConnectionPeerCIDROptionsModel.PrefixLength).To(Equal(core.StringPtr("testString"))) - Expect(checkVPNGatewayConnectionPeerCIDROptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) + cidr := "192.168.1.0/24" + checkVPNGatewayConnectionsPeerCIDROptionsModel := vpcService.NewCheckVPNGatewayConnectionsPeerCIDROptions(vpnGatewayID, id, cidr) + checkVPNGatewayConnectionsPeerCIDROptionsModel.SetVPNGatewayID("testString") + checkVPNGatewayConnectionsPeerCIDROptionsModel.SetID("testString") + checkVPNGatewayConnectionsPeerCIDROptionsModel.SetCIDR("192.168.1.0/24") + checkVPNGatewayConnectionsPeerCIDROptionsModel.SetHeaders(map[string]string{"foo": "bar"}) + Expect(checkVPNGatewayConnectionsPeerCIDROptionsModel).ToNot(BeNil()) + Expect(checkVPNGatewayConnectionsPeerCIDROptionsModel.VPNGatewayID).To(Equal(core.StringPtr("testString"))) + Expect(checkVPNGatewayConnectionsPeerCIDROptionsModel.ID).To(Equal(core.StringPtr("testString"))) + Expect(checkVPNGatewayConnectionsPeerCIDROptionsModel.CIDR).To(Equal(core.StringPtr("192.168.1.0/24"))) + Expect(checkVPNGatewayConnectionsPeerCIDROptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewCreateBackupPolicyOptions successfully`, func() { // Construct an instance of the ZoneIdentityByName model @@ -99986,8 +100068,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) Expect(encryptionKeyIdentityModel).ToNot(BeNil()) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") - Expect(encryptionKeyIdentityModel.CRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"))) + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + Expect(encryptionKeyIdentityModel.CRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"))) // Construct an instance of the RegionIdentityByName model regionIdentityModel := new(vpcv1.RegionIdentityByName) @@ -100034,8 +100116,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN model backupPolicyScopePrototypeModel := new(vpcv1.BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN) Expect(backupPolicyScopePrototypeModel).ToNot(BeNil()) - backupPolicyScopePrototypeModel.CRN = core.StringPtr("crn:v1:bluemix:public:enterprise::a/123456::enterprise:ebc2b430240943458b9e91e1432cfcce") - Expect(backupPolicyScopePrototypeModel.CRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:enterprise::a/123456::enterprise:ebc2b430240943458b9e91e1432cfcce"))) + backupPolicyScopePrototypeModel.CRN = core.StringPtr("crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce") + Expect(backupPolicyScopePrototypeModel.CRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce"))) // Construct an instance of the BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype model backupPolicyPrototypeModel := new(vpcv1.BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype) @@ -100088,8 +100170,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) Expect(encryptionKeyIdentityModel).ToNot(BeNil()) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") - Expect(encryptionKeyIdentityModel.CRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"))) + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + Expect(encryptionKeyIdentityModel.CRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"))) // Construct an instance of the RegionIdentityByName model regionIdentityModel := new(vpcv1.RegionIdentityByName) @@ -100290,8 +100372,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the ImageIdentityByID model imageIdentityModel := new(vpcv1.ImageIdentityByID) Expect(imageIdentityModel).ToNot(BeNil()) - imageIdentityModel.ID = core.StringPtr("72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") - Expect(imageIdentityModel.ID).To(Equal(core.StringPtr("72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"))) + imageIdentityModel.ID = core.StringPtr("r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") + Expect(imageIdentityModel.ID).To(Equal(core.StringPtr("r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"))) // Construct an instance of the KeyIdentityByID model keyIdentityModel := new(vpcv1.KeyIdentityByID) @@ -100330,8 +100412,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VPCIdentityByID model vpcIdentityModel := new(vpcv1.VPCIdentityByID) Expect(vpcIdentityModel).ToNot(BeNil()) - vpcIdentityModel.ID = core.StringPtr("4727d842-f94f-4a2d-824a-9bc9b02c523b") - Expect(vpcIdentityModel.ID).To(Equal(core.StringPtr("4727d842-f94f-4a2d-824a-9bc9b02c523b"))) + vpcIdentityModel.ID = core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + Expect(vpcIdentityModel.ID).To(Equal(core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"))) // Construct an instance of the ZoneIdentityByName model zoneIdentityModel := new(vpcv1.ZoneIdentityByName) @@ -100542,8 +100624,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EndpointGatewayReservedIPReservedIPIdentityByID model endpointGatewayReservedIPModel := new(vpcv1.EndpointGatewayReservedIPReservedIPIdentityByID) Expect(endpointGatewayReservedIPModel).ToNot(BeNil()) - endpointGatewayReservedIPModel.ID = core.StringPtr("6d353a0f-aeb1-4ae1-832e-1110d10981bb") - Expect(endpointGatewayReservedIPModel.ID).To(Equal(core.StringPtr("6d353a0f-aeb1-4ae1-832e-1110d10981bb"))) + endpointGatewayReservedIPModel.ID = core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + Expect(endpointGatewayReservedIPModel.ID).To(Equal(core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"))) // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) @@ -100554,8 +100636,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SecurityGroupIdentityByID model securityGroupIdentityModel := new(vpcv1.SecurityGroupIdentityByID) Expect(securityGroupIdentityModel).ToNot(BeNil()) - securityGroupIdentityModel.ID = core.StringPtr("be5df5ca-12a0-494b-907e-aa6ec2bfa271") - Expect(securityGroupIdentityModel.ID).To(Equal(core.StringPtr("be5df5ca-12a0-494b-907e-aa6ec2bfa271"))) + securityGroupIdentityModel.ID = core.StringPtr("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + Expect(securityGroupIdentityModel.ID).To(Equal(core.StringPtr("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"))) // Construct an instance of the CreateEndpointGatewayOptions model var createEndpointGatewayOptionsTarget vpcv1.EndpointGatewayTargetPrototypeIntf = nil @@ -100621,8 +100703,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID model flowLogCollectorTargetPrototypeModel := new(vpcv1.FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID) Expect(flowLogCollectorTargetPrototypeModel).ToNot(BeNil()) - flowLogCollectorTargetPrototypeModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") - Expect(flowLogCollectorTargetPrototypeModel.ID).To(Equal(core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e"))) + flowLogCollectorTargetPrototypeModel.ID = core.StringPtr("0717-10c02d81-0ecb-4dc5-897d-28392913b81e") + Expect(flowLogCollectorTargetPrototypeModel.ID).To(Equal(core.StringPtr("0717-10c02d81-0ecb-4dc5-897d-28392913b81e"))) // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) @@ -100712,8 +100794,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) Expect(encryptionKeyIdentityModel).ToNot(BeNil()) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") - Expect(encryptionKeyIdentityModel.CRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"))) + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + Expect(encryptionKeyIdentityModel.CRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"))) // Construct an instance of the ImageFilePrototype model imageFilePrototypeModel := new(vpcv1.ImageFilePrototype) @@ -100887,8 +100969,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) Expect(subnetIdentityModel).ToNot(BeNil()) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") - Expect(subnetIdentityModel.ID).To(Equal(core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e"))) + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + Expect(subnetIdentityModel.ID).To(Equal(core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"))) // Construct an instance of the LoadBalancerIdentityByID model loadBalancerIdentityModel := new(vpcv1.LoadBalancerIdentityByID) @@ -101090,8 +101172,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID model instancePlacementTargetPrototypeModel := new(vpcv1.InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID) Expect(instancePlacementTargetPrototypeModel).ToNot(BeNil()) - instancePlacementTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") - Expect(instancePlacementTargetPrototypeModel.ID).To(Equal(core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a"))) + instancePlacementTargetPrototypeModel.ID = core.StringPtr("0717-1e09281b-f177-46fb-baf1-bc152b2e391a") + Expect(instancePlacementTargetPrototypeModel.ID).To(Equal(core.StringPtr("0717-1e09281b-f177-46fb-baf1-bc152b2e391a"))) // Construct an instance of the InstanceProfileIdentityByName model instanceProfileIdentityModel := new(vpcv1.InstanceProfileIdentityByName) @@ -101122,8 +101204,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID model volumeAttachmentPrototypeVolumeModel := new(vpcv1.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID) Expect(volumeAttachmentPrototypeVolumeModel).ToNot(BeNil()) - volumeAttachmentPrototypeVolumeModel.ID = core.StringPtr("1a6b7274-678d-4dfb-8981-c71dd9d4daa5") - Expect(volumeAttachmentPrototypeVolumeModel.ID).To(Equal(core.StringPtr("1a6b7274-678d-4dfb-8981-c71dd9d4daa5"))) + volumeAttachmentPrototypeVolumeModel.ID = core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + Expect(volumeAttachmentPrototypeVolumeModel.ID).To(Equal(core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"))) // Construct an instance of the VolumeAttachmentPrototype model volumeAttachmentPrototypeModel := new(vpcv1.VolumeAttachmentPrototype) @@ -101144,8 +101226,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) Expect(encryptionKeyIdentityModel).ToNot(BeNil()) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") - Expect(encryptionKeyIdentityModel.CRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"))) + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + Expect(encryptionKeyIdentityModel.CRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"))) // Construct an instance of the VolumeProfileIdentityByName model volumeProfileIdentityModel := new(vpcv1.VolumeProfileIdentityByName) @@ -101344,8 +101426,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID model instancePlacementTargetPrototypeModel := new(vpcv1.InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID) Expect(instancePlacementTargetPrototypeModel).ToNot(BeNil()) - instancePlacementTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") - Expect(instancePlacementTargetPrototypeModel.ID).To(Equal(core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a"))) + instancePlacementTargetPrototypeModel.ID = core.StringPtr("0717-1e09281b-f177-46fb-baf1-bc152b2e391a") + Expect(instancePlacementTargetPrototypeModel.ID).To(Equal(core.StringPtr("0717-1e09281b-f177-46fb-baf1-bc152b2e391a"))) // Construct an instance of the InstanceProfileIdentityByName model instanceProfileIdentityModel := new(vpcv1.InstanceProfileIdentityByName) @@ -101376,8 +101458,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID model volumeAttachmentPrototypeVolumeModel := new(vpcv1.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID) Expect(volumeAttachmentPrototypeVolumeModel).ToNot(BeNil()) - volumeAttachmentPrototypeVolumeModel.ID = core.StringPtr("1a6b7274-678d-4dfb-8981-c71dd9d4daa5") - Expect(volumeAttachmentPrototypeVolumeModel.ID).To(Equal(core.StringPtr("1a6b7274-678d-4dfb-8981-c71dd9d4daa5"))) + volumeAttachmentPrototypeVolumeModel.ID = core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + Expect(volumeAttachmentPrototypeVolumeModel.ID).To(Equal(core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"))) // Construct an instance of the VolumeAttachmentPrototype model volumeAttachmentPrototypeModel := new(vpcv1.VolumeAttachmentPrototype) @@ -101398,8 +101480,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) Expect(encryptionKeyIdentityModel).ToNot(BeNil()) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") - Expect(encryptionKeyIdentityModel.CRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"))) + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + Expect(encryptionKeyIdentityModel.CRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"))) // Construct an instance of the VolumeProfileIdentityByName model volumeProfileIdentityModel := new(vpcv1.VolumeProfileIdentityByName) @@ -101562,8 +101644,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID model volumeAttachmentPrototypeVolumeModel := new(vpcv1.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID) Expect(volumeAttachmentPrototypeVolumeModel).ToNot(BeNil()) - volumeAttachmentPrototypeVolumeModel.ID = core.StringPtr("1a6b7274-678d-4dfb-8981-c71dd9d4daa5") - Expect(volumeAttachmentPrototypeVolumeModel.ID).To(Equal(core.StringPtr("1a6b7274-678d-4dfb-8981-c71dd9d4daa5"))) + volumeAttachmentPrototypeVolumeModel.ID = core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + Expect(volumeAttachmentPrototypeVolumeModel.ID).To(Equal(core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"))) // Construct an instance of the CreateInstanceVolumeAttachmentOptions model instanceID := "testString" @@ -101635,8 +101717,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the CertificateInstanceIdentityByCRN model certificateInstanceIdentityModel := new(vpcv1.CertificateInstanceIdentityByCRN) Expect(certificateInstanceIdentityModel).ToNot(BeNil()) - certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") - Expect(certificateInstanceIdentityModel.CRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"))) + certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + Expect(certificateInstanceIdentityModel.CRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"))) // Construct an instance of the LoadBalancerPoolIdentityLoadBalancerPoolIdentityByID model loadBalancerPoolIdentityModel := new(vpcv1.LoadBalancerPoolIdentityLoadBalancerPoolIdentityByID) @@ -101798,14 +101880,14 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) Expect(subnetIdentityModel).ToNot(BeNil()) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") - Expect(subnetIdentityModel.ID).To(Equal(core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e"))) + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + Expect(subnetIdentityModel.ID).To(Equal(core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"))) // Construct an instance of the DnsInstanceIdentityByCRN model dnsInstanceIdentityModel := new(vpcv1.DnsInstanceIdentityByCRN) Expect(dnsInstanceIdentityModel).ToNot(BeNil()) - dnsInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:dns-svcs:global:a/123456:6860c359-b2e2-46fa-a944-b38c28201c6e") - Expect(dnsInstanceIdentityModel.CRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:dns-svcs:global:a/123456:6860c359-b2e2-46fa-a944-b38c28201c6e"))) + dnsInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e") + Expect(dnsInstanceIdentityModel.CRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e"))) // Construct an instance of the DnsZoneIdentityByID model dnsZoneIdentityModel := new(vpcv1.DnsZoneIdentityByID) @@ -101824,8 +101906,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the CertificateInstanceIdentityByCRN model certificateInstanceIdentityModel := new(vpcv1.CertificateInstanceIdentityByCRN) Expect(certificateInstanceIdentityModel).ToNot(BeNil()) - certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") - Expect(certificateInstanceIdentityModel.CRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"))) + certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + Expect(certificateInstanceIdentityModel.CRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"))) // Construct an instance of the LoadBalancerPoolIdentityByName model loadBalancerPoolIdentityByNameModel := new(vpcv1.LoadBalancerPoolIdentityByName) @@ -101904,8 +101986,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID model loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) Expect(loadBalancerPoolMemberTargetPrototypeModel).ToNot(BeNil()) - loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") - Expect(loadBalancerPoolMemberTargetPrototypeModel.ID).To(Equal(core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a"))) + loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") + Expect(loadBalancerPoolMemberTargetPrototypeModel.ID).To(Equal(core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a"))) // Construct an instance of the LoadBalancerPoolMemberPrototype model loadBalancerPoolMemberPrototypeModel := new(vpcv1.LoadBalancerPoolMemberPrototype) @@ -101995,8 +102077,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID model loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) Expect(loadBalancerPoolMemberTargetPrototypeModel).ToNot(BeNil()) - loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") - Expect(loadBalancerPoolMemberTargetPrototypeModel.ID).To(Equal(core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a"))) + loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") + Expect(loadBalancerPoolMemberTargetPrototypeModel.ID).To(Equal(core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a"))) // Construct an instance of the CreateLoadBalancerPoolMemberOptions model loadBalancerID := "testString" @@ -102038,8 +102120,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID model loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) Expect(loadBalancerPoolMemberTargetPrototypeModel).ToNot(BeNil()) - loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") - Expect(loadBalancerPoolMemberTargetPrototypeModel.ID).To(Equal(core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a"))) + loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") + Expect(loadBalancerPoolMemberTargetPrototypeModel.ID).To(Equal(core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a"))) // Construct an instance of the LoadBalancerPoolMemberPrototype model loadBalancerPoolMemberPrototypeModel := new(vpcv1.LoadBalancerPoolMemberPrototype) @@ -102216,8 +102298,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VPCIdentityByID model vpcIdentityModel := new(vpcv1.VPCIdentityByID) Expect(vpcIdentityModel).ToNot(BeNil()) - vpcIdentityModel.ID = core.StringPtr("4727d842-f94f-4a2d-824a-9bc9b02c523b") - Expect(vpcIdentityModel.ID).To(Equal(core.StringPtr("4727d842-f94f-4a2d-824a-9bc9b02c523b"))) + vpcIdentityModel.ID = core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + Expect(vpcIdentityModel.ID).To(Equal(core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"))) // Construct an instance of the ZoneIdentityByName model zoneIdentityModel := new(vpcv1.ZoneIdentityByName) @@ -102609,8 +102691,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) Expect(encryptionKeyIdentityModel).ToNot(BeNil()) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") - Expect(encryptionKeyIdentityModel.CRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"))) + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + Expect(encryptionKeyIdentityModel.CRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"))) // Construct an instance of the ShareInitialOwner model shareInitialOwnerModel := new(vpcv1.ShareInitialOwner) @@ -102680,8 +102762,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeIdentityByID model volumeIdentityModel := new(vpcv1.VolumeIdentityByID) Expect(volumeIdentityModel).ToNot(BeNil()) - volumeIdentityModel.ID = core.StringPtr("1a6b7274-678d-4dfb-8981-c71dd9d4daa5") - Expect(volumeIdentityModel.ID).To(Equal(core.StringPtr("1a6b7274-678d-4dfb-8981-c71dd9d4daa5"))) + volumeIdentityModel.ID = core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + Expect(volumeIdentityModel.ID).To(Equal(core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"))) // Construct an instance of the SnapshotPrototypeSnapshotConsistencyGroupContext model snapshotPrototypeSnapshotConsistencyGroupContextModel := new(vpcv1.SnapshotPrototypeSnapshotConsistencyGroupContext) @@ -102736,8 +102818,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeIdentityByID model volumeIdentityModel := new(vpcv1.VolumeIdentityByID) Expect(volumeIdentityModel).ToNot(BeNil()) - volumeIdentityModel.ID = core.StringPtr("1a6b7274-678d-4dfb-8981-c71dd9d4daa5") - Expect(volumeIdentityModel.ID).To(Equal(core.StringPtr("1a6b7274-678d-4dfb-8981-c71dd9d4daa5"))) + volumeIdentityModel.ID = core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + Expect(volumeIdentityModel.ID).To(Equal(core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"))) // Construct an instance of the SnapshotPrototypeSnapshotBySourceVolume model snapshotPrototypeModel := new(vpcv1.SnapshotPrototypeSnapshotBySourceVolume) @@ -102858,14 +102940,14 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByID model virtualNetworkInterfaceIPPrototypeModel := new(vpcv1.VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByID) Expect(virtualNetworkInterfaceIPPrototypeModel).ToNot(BeNil()) - virtualNetworkInterfaceIPPrototypeModel.ID = core.StringPtr("6d353a0f-aeb1-4ae1-832e-1110d10981bb") - Expect(virtualNetworkInterfaceIPPrototypeModel.ID).To(Equal(core.StringPtr("6d353a0f-aeb1-4ae1-832e-1110d10981bb"))) + virtualNetworkInterfaceIPPrototypeModel.ID = core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + Expect(virtualNetworkInterfaceIPPrototypeModel.ID).To(Equal(core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"))) // Construct an instance of the VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID model virtualNetworkInterfacePrimaryIPPrototypeModel := new(vpcv1.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID) Expect(virtualNetworkInterfacePrimaryIPPrototypeModel).ToNot(BeNil()) - virtualNetworkInterfacePrimaryIPPrototypeModel.ID = core.StringPtr("6d353a0f-aeb1-4ae1-832e-1110d10981bb") - Expect(virtualNetworkInterfacePrimaryIPPrototypeModel.ID).To(Equal(core.StringPtr("6d353a0f-aeb1-4ae1-832e-1110d10981bb"))) + virtualNetworkInterfacePrimaryIPPrototypeModel.ID = core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + Expect(virtualNetworkInterfacePrimaryIPPrototypeModel.ID).To(Equal(core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"))) // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) @@ -102876,8 +102958,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SecurityGroupIdentityByID model securityGroupIdentityModel := new(vpcv1.SecurityGroupIdentityByID) Expect(securityGroupIdentityModel).ToNot(BeNil()) - securityGroupIdentityModel.ID = core.StringPtr("be5df5ca-12a0-494b-907e-aa6ec2bfa271") - Expect(securityGroupIdentityModel.ID).To(Equal(core.StringPtr("be5df5ca-12a0-494b-907e-aa6ec2bfa271"))) + securityGroupIdentityModel.ID = core.StringPtr("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + Expect(securityGroupIdentityModel.ID).To(Equal(core.StringPtr("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"))) // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) @@ -102931,8 +103013,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the EncryptionKeyIdentityByCRN model encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) Expect(encryptionKeyIdentityModel).ToNot(BeNil()) - encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") - Expect(encryptionKeyIdentityModel.CRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"))) + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + Expect(encryptionKeyIdentityModel.CRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"))) // Construct an instance of the VolumePrototypeVolumeByCapacity model volumePrototypeModel := new(vpcv1.VolumePrototypeVolumeByCapacity) @@ -102993,8 +103075,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VPCIdentityByID model vpcIdentityModel := new(vpcv1.VPCIdentityByID) Expect(vpcIdentityModel).ToNot(BeNil()) - vpcIdentityModel.ID = core.StringPtr("4727d842-f94f-4a2d-824a-9bc9b02c523b") - Expect(vpcIdentityModel.ID).To(Equal(core.StringPtr("4727d842-f94f-4a2d-824a-9bc9b02c523b"))) + vpcIdentityModel.ID = core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + Expect(vpcIdentityModel.ID).To(Equal(core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"))) // Construct an instance of the CreateVPCDnsResolutionBindingOptions model vpcID := "testString" @@ -103227,24 +103309,50 @@ var _ = Describe(`VpcV1`, func() { vpnGatewayConnectionIPsecPolicyPrototypeModel.ID = core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b") Expect(vpnGatewayConnectionIPsecPolicyPrototypeModel.ID).To(Equal(core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b"))) + // Construct an instance of the VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn model + vpnGatewayConnectionIkeIdentityPrototypeModel := new(vpcv1.VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn) + Expect(vpnGatewayConnectionIkeIdentityPrototypeModel).ToNot(BeNil()) + vpnGatewayConnectionIkeIdentityPrototypeModel.Type = core.StringPtr("fqdn") + vpnGatewayConnectionIkeIdentityPrototypeModel.Value = core.StringPtr("my-service.example.com") + Expect(vpnGatewayConnectionIkeIdentityPrototypeModel.Type).To(Equal(core.StringPtr("fqdn"))) + Expect(vpnGatewayConnectionIkeIdentityPrototypeModel.Value).To(Equal(core.StringPtr("my-service.example.com"))) + + // Construct an instance of the VPNGatewayConnectionStaticRouteModeLocalPrototype model + vpnGatewayConnectionStaticRouteModeLocalPrototypeModel := new(vpcv1.VPNGatewayConnectionStaticRouteModeLocalPrototype) + Expect(vpnGatewayConnectionStaticRouteModeLocalPrototypeModel).ToNot(BeNil()) + vpnGatewayConnectionStaticRouteModeLocalPrototypeModel.IkeIdentities = []vpcv1.VPNGatewayConnectionIkeIdentityPrototypeIntf{vpnGatewayConnectionIkeIdentityPrototypeModel} + Expect(vpnGatewayConnectionStaticRouteModeLocalPrototypeModel.IkeIdentities).To(Equal([]vpcv1.VPNGatewayConnectionIkeIdentityPrototypeIntf{vpnGatewayConnectionIkeIdentityPrototypeModel})) + + // Construct an instance of the VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress model + vpnGatewayConnectionStaticRouteModePeerPrototypeModel := new(vpcv1.VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress) + Expect(vpnGatewayConnectionStaticRouteModePeerPrototypeModel).ToNot(BeNil()) + vpnGatewayConnectionStaticRouteModePeerPrototypeModel.IkeIdentity = vpnGatewayConnectionIkeIdentityPrototypeModel + vpnGatewayConnectionStaticRouteModePeerPrototypeModel.Address = core.StringPtr("169.21.50.5") + Expect(vpnGatewayConnectionStaticRouteModePeerPrototypeModel.IkeIdentity).To(Equal(vpnGatewayConnectionIkeIdentityPrototypeModel)) + Expect(vpnGatewayConnectionStaticRouteModePeerPrototypeModel.Address).To(Equal(core.StringPtr("169.21.50.5"))) + // Construct an instance of the VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype model vpnGatewayConnectionPrototypeModel := new(vpcv1.VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype) Expect(vpnGatewayConnectionPrototypeModel).ToNot(BeNil()) vpnGatewayConnectionPrototypeModel.AdminStateUp = core.BoolPtr(true) vpnGatewayConnectionPrototypeModel.DeadPeerDetection = vpnGatewayConnectionDpdPrototypeModel + vpnGatewayConnectionPrototypeModel.EstablishMode = core.StringPtr("bidirectional") vpnGatewayConnectionPrototypeModel.IkePolicy = vpnGatewayConnectionIkePolicyPrototypeModel vpnGatewayConnectionPrototypeModel.IpsecPolicy = vpnGatewayConnectionIPsecPolicyPrototypeModel vpnGatewayConnectionPrototypeModel.Name = core.StringPtr("my-vpn-connection") - vpnGatewayConnectionPrototypeModel.PeerAddress = core.StringPtr("169.21.50.5") vpnGatewayConnectionPrototypeModel.Psk = core.StringPtr("lkj14b1oi0alcniejkso") + vpnGatewayConnectionPrototypeModel.Local = vpnGatewayConnectionStaticRouteModeLocalPrototypeModel + vpnGatewayConnectionPrototypeModel.Peer = vpnGatewayConnectionStaticRouteModePeerPrototypeModel vpnGatewayConnectionPrototypeModel.RoutingProtocol = core.StringPtr("none") Expect(vpnGatewayConnectionPrototypeModel.AdminStateUp).To(Equal(core.BoolPtr(true))) Expect(vpnGatewayConnectionPrototypeModel.DeadPeerDetection).To(Equal(vpnGatewayConnectionDpdPrototypeModel)) + Expect(vpnGatewayConnectionPrototypeModel.EstablishMode).To(Equal(core.StringPtr("bidirectional"))) Expect(vpnGatewayConnectionPrototypeModel.IkePolicy).To(Equal(vpnGatewayConnectionIkePolicyPrototypeModel)) Expect(vpnGatewayConnectionPrototypeModel.IpsecPolicy).To(Equal(vpnGatewayConnectionIPsecPolicyPrototypeModel)) Expect(vpnGatewayConnectionPrototypeModel.Name).To(Equal(core.StringPtr("my-vpn-connection"))) - Expect(vpnGatewayConnectionPrototypeModel.PeerAddress).To(Equal(core.StringPtr("169.21.50.5"))) Expect(vpnGatewayConnectionPrototypeModel.Psk).To(Equal(core.StringPtr("lkj14b1oi0alcniejkso"))) + Expect(vpnGatewayConnectionPrototypeModel.Local).To(Equal(vpnGatewayConnectionStaticRouteModeLocalPrototypeModel)) + Expect(vpnGatewayConnectionPrototypeModel.Peer).To(Equal(vpnGatewayConnectionStaticRouteModePeerPrototypeModel)) Expect(vpnGatewayConnectionPrototypeModel.RoutingProtocol).To(Equal(core.StringPtr("none"))) // Construct an instance of the CreateVPNGatewayConnectionOptions model @@ -103269,8 +103377,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) Expect(subnetIdentityModel).ToNot(BeNil()) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") - Expect(subnetIdentityModel.ID).To(Equal(core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e"))) + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + Expect(subnetIdentityModel.ID).To(Equal(core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"))) // Construct an instance of the VPNGatewayPrototypeVPNGatewayRouteModePrototype model vpnGatewayPrototypeModel := new(vpcv1.VPNGatewayPrototypeVPNGatewayRouteModePrototype) @@ -103297,8 +103405,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the CertificateInstanceIdentityByCRN model certificateInstanceIdentityModel := new(vpcv1.CertificateInstanceIdentityByCRN) Expect(certificateInstanceIdentityModel).ToNot(BeNil()) - certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") - Expect(certificateInstanceIdentityModel.CRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"))) + certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + Expect(certificateInstanceIdentityModel.CRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"))) // Construct an instance of the VPNServerAuthenticationByUsernameIDProviderByIam model vpnServerAuthenticationByUsernameIDProviderModel := new(vpcv1.VPNServerAuthenticationByUsernameIDProviderByIam) @@ -103317,8 +103425,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the SubnetIdentityByID model subnetIdentityModel := new(vpcv1.SubnetIdentityByID) Expect(subnetIdentityModel).ToNot(BeNil()) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") - Expect(subnetIdentityModel.ID).To(Equal(core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e"))) + subnetIdentityModel.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + Expect(subnetIdentityModel.ID).To(Equal(core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"))) // Construct an instance of the IP model ipModel := new(vpcv1.IP) @@ -105309,7 +105417,7 @@ var _ = Describe(`VpcV1`, func() { listBackupPolicyJobsOptionsModel.SetSort("name") listBackupPolicyJobsOptionsModel.SetSourceID("testString") listBackupPolicyJobsOptionsModel.SetTargetSnapshotsID("testString") - listBackupPolicyJobsOptionsModel.SetTargetSnapshotsCRN("crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263") + listBackupPolicyJobsOptionsModel.SetTargetSnapshotsCRN("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263") listBackupPolicyJobsOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(listBackupPolicyJobsOptionsModel).ToNot(BeNil()) Expect(listBackupPolicyJobsOptionsModel.BackupPolicyID).To(Equal(core.StringPtr("testString"))) @@ -105320,7 +105428,7 @@ var _ = Describe(`VpcV1`, func() { Expect(listBackupPolicyJobsOptionsModel.Sort).To(Equal(core.StringPtr("name"))) Expect(listBackupPolicyJobsOptionsModel.SourceID).To(Equal(core.StringPtr("testString"))) Expect(listBackupPolicyJobsOptionsModel.TargetSnapshotsID).To(Equal(core.StringPtr("testString"))) - Expect(listBackupPolicyJobsOptionsModel.TargetSnapshotsCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263"))) + Expect(listBackupPolicyJobsOptionsModel.TargetSnapshotsCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263"))) Expect(listBackupPolicyJobsOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewListBackupPolicyPlansOptions successfully`, func() { @@ -105418,7 +105526,7 @@ var _ = Describe(`VpcV1`, func() { listBareMetalServersOptionsModel.SetResourceGroupID("testString") listBareMetalServersOptionsModel.SetName("testString") listBareMetalServersOptionsModel.SetVPCID("testString") - listBareMetalServersOptionsModel.SetVPCCRN("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listBareMetalServersOptionsModel.SetVPCCRN("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listBareMetalServersOptionsModel.SetVPCName("my-vpc") listBareMetalServersOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(listBareMetalServersOptionsModel).ToNot(BeNil()) @@ -105427,7 +105535,7 @@ var _ = Describe(`VpcV1`, func() { Expect(listBareMetalServersOptionsModel.ResourceGroupID).To(Equal(core.StringPtr("testString"))) Expect(listBareMetalServersOptionsModel.Name).To(Equal(core.StringPtr("testString"))) Expect(listBareMetalServersOptionsModel.VPCID).To(Equal(core.StringPtr("testString"))) - Expect(listBareMetalServersOptionsModel.VPCCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"))) + Expect(listBareMetalServersOptionsModel.VPCCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"))) Expect(listBareMetalServersOptionsModel.VPCName).To(Equal(core.StringPtr("my-vpc"))) Expect(listBareMetalServersOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) @@ -105512,7 +105620,7 @@ var _ = Describe(`VpcV1`, func() { listEndpointGatewaysOptionsModel.SetLimit(int64(10)) listEndpointGatewaysOptionsModel.SetResourceGroupID("testString") listEndpointGatewaysOptionsModel.SetVPCID("testString") - listEndpointGatewaysOptionsModel.SetVPCCRN("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listEndpointGatewaysOptionsModel.SetVPCCRN("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listEndpointGatewaysOptionsModel.SetVPCName("my-vpc") listEndpointGatewaysOptionsModel.SetAllowDnsResolutionBinding(true) listEndpointGatewaysOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) @@ -105522,7 +105630,7 @@ var _ = Describe(`VpcV1`, func() { Expect(listEndpointGatewaysOptionsModel.Limit).To(Equal(core.Int64Ptr(int64(10)))) Expect(listEndpointGatewaysOptionsModel.ResourceGroupID).To(Equal(core.StringPtr("testString"))) Expect(listEndpointGatewaysOptionsModel.VPCID).To(Equal(core.StringPtr("testString"))) - Expect(listEndpointGatewaysOptionsModel.VPCCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"))) + Expect(listEndpointGatewaysOptionsModel.VPCCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"))) Expect(listEndpointGatewaysOptionsModel.VPCName).To(Equal(core.StringPtr("my-vpc"))) Expect(listEndpointGatewaysOptionsModel.AllowDnsResolutionBinding).To(Equal(core.BoolPtr(true))) Expect(listEndpointGatewaysOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) @@ -105535,7 +105643,7 @@ var _ = Describe(`VpcV1`, func() { listFloatingIpsOptionsModel.SetResourceGroupID("testString") listFloatingIpsOptionsModel.SetSort("name") listFloatingIpsOptionsModel.SetTargetID("testString") - listFloatingIpsOptionsModel.SetTargetCRN("crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727") + listFloatingIpsOptionsModel.SetTargetCRN("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727") listFloatingIpsOptionsModel.SetTargetName("my-resource") listFloatingIpsOptionsModel.SetTargetResourceType("testString") listFloatingIpsOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) @@ -105545,7 +105653,7 @@ var _ = Describe(`VpcV1`, func() { Expect(listFloatingIpsOptionsModel.ResourceGroupID).To(Equal(core.StringPtr("testString"))) Expect(listFloatingIpsOptionsModel.Sort).To(Equal(core.StringPtr("name"))) Expect(listFloatingIpsOptionsModel.TargetID).To(Equal(core.StringPtr("testString"))) - Expect(listFloatingIpsOptionsModel.TargetCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727"))) + Expect(listFloatingIpsOptionsModel.TargetCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727"))) Expect(listFloatingIpsOptionsModel.TargetName).To(Equal(core.StringPtr("my-resource"))) Expect(listFloatingIpsOptionsModel.TargetResourceType).To(Equal(core.StringPtr("testString"))) Expect(listFloatingIpsOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) @@ -105558,7 +105666,7 @@ var _ = Describe(`VpcV1`, func() { listFlowLogCollectorsOptionsModel.SetResourceGroupID("testString") listFlowLogCollectorsOptionsModel.SetName("testString") listFlowLogCollectorsOptionsModel.SetVPCID("testString") - listFlowLogCollectorsOptionsModel.SetVPCCRN("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listFlowLogCollectorsOptionsModel.SetVPCCRN("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listFlowLogCollectorsOptionsModel.SetVPCName("my-vpc") listFlowLogCollectorsOptionsModel.SetTargetID("testString") listFlowLogCollectorsOptionsModel.SetTargetResourceType("testString") @@ -105569,7 +105677,7 @@ var _ = Describe(`VpcV1`, func() { Expect(listFlowLogCollectorsOptionsModel.ResourceGroupID).To(Equal(core.StringPtr("testString"))) Expect(listFlowLogCollectorsOptionsModel.Name).To(Equal(core.StringPtr("testString"))) Expect(listFlowLogCollectorsOptionsModel.VPCID).To(Equal(core.StringPtr("testString"))) - Expect(listFlowLogCollectorsOptionsModel.VPCCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"))) + Expect(listFlowLogCollectorsOptionsModel.VPCCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"))) Expect(listFlowLogCollectorsOptionsModel.VPCName).To(Equal(core.StringPtr("my-vpc"))) Expect(listFlowLogCollectorsOptionsModel.TargetID).To(Equal(core.StringPtr("testString"))) Expect(listFlowLogCollectorsOptionsModel.TargetResourceType).To(Equal(core.StringPtr("testString"))) @@ -105791,36 +105899,36 @@ var _ = Describe(`VpcV1`, func() { listInstancesOptionsModel.SetLimit(int64(10)) listInstancesOptionsModel.SetResourceGroupID("testString") listInstancesOptionsModel.SetName("testString") - listInstancesOptionsModel.SetVPCID("testString") - listInstancesOptionsModel.SetVPCCRN("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") - listInstancesOptionsModel.SetVPCName("my-vpc") listInstancesOptionsModel.SetDedicatedHostID("testString") - listInstancesOptionsModel.SetDedicatedHostCRN("crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a") + listInstancesOptionsModel.SetDedicatedHostCRN("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a") listInstancesOptionsModel.SetDedicatedHostName("my-dedicated-host") listInstancesOptionsModel.SetPlacementGroupID("testString") - listInstancesOptionsModel.SetPlacementGroupCRN("crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871") + listInstancesOptionsModel.SetPlacementGroupCRN("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871") listInstancesOptionsModel.SetPlacementGroupName("my-placement-group") listInstancesOptionsModel.SetReservationID("testString") - listInstancesOptionsModel.SetReservationCRN("crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63") + listInstancesOptionsModel.SetReservationCRN("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63") listInstancesOptionsModel.SetReservationName("my-reservation") + listInstancesOptionsModel.SetVPCID("testString") + listInstancesOptionsModel.SetVPCCRN("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listInstancesOptionsModel.SetVPCName("my-vpc") listInstancesOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(listInstancesOptionsModel).ToNot(BeNil()) Expect(listInstancesOptionsModel.Start).To(Equal(core.StringPtr("testString"))) Expect(listInstancesOptionsModel.Limit).To(Equal(core.Int64Ptr(int64(10)))) Expect(listInstancesOptionsModel.ResourceGroupID).To(Equal(core.StringPtr("testString"))) Expect(listInstancesOptionsModel.Name).To(Equal(core.StringPtr("testString"))) - Expect(listInstancesOptionsModel.VPCID).To(Equal(core.StringPtr("testString"))) - Expect(listInstancesOptionsModel.VPCCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"))) - Expect(listInstancesOptionsModel.VPCName).To(Equal(core.StringPtr("my-vpc"))) Expect(listInstancesOptionsModel.DedicatedHostID).To(Equal(core.StringPtr("testString"))) - Expect(listInstancesOptionsModel.DedicatedHostCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a"))) + Expect(listInstancesOptionsModel.DedicatedHostCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a"))) Expect(listInstancesOptionsModel.DedicatedHostName).To(Equal(core.StringPtr("my-dedicated-host"))) Expect(listInstancesOptionsModel.PlacementGroupID).To(Equal(core.StringPtr("testString"))) - Expect(listInstancesOptionsModel.PlacementGroupCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871"))) + Expect(listInstancesOptionsModel.PlacementGroupCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871"))) Expect(listInstancesOptionsModel.PlacementGroupName).To(Equal(core.StringPtr("my-placement-group"))) Expect(listInstancesOptionsModel.ReservationID).To(Equal(core.StringPtr("testString"))) - Expect(listInstancesOptionsModel.ReservationCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63"))) + Expect(listInstancesOptionsModel.ReservationCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63"))) Expect(listInstancesOptionsModel.ReservationName).To(Equal(core.StringPtr("my-reservation"))) + Expect(listInstancesOptionsModel.VPCID).To(Equal(core.StringPtr("testString"))) + Expect(listInstancesOptionsModel.VPCCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"))) + Expect(listInstancesOptionsModel.VPCName).To(Equal(core.StringPtr("my-vpc"))) Expect(listInstancesOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewListIpsecPoliciesOptions successfully`, func() { @@ -106084,7 +106192,7 @@ var _ = Describe(`VpcV1`, func() { listSecurityGroupsOptionsModel.SetLimit(int64(10)) listSecurityGroupsOptionsModel.SetResourceGroupID("testString") listSecurityGroupsOptionsModel.SetVPCID("testString") - listSecurityGroupsOptionsModel.SetVPCCRN("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listSecurityGroupsOptionsModel.SetVPCCRN("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listSecurityGroupsOptionsModel.SetVPCName("my-vpc") listSecurityGroupsOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(listSecurityGroupsOptionsModel).ToNot(BeNil()) @@ -106092,7 +106200,7 @@ var _ = Describe(`VpcV1`, func() { Expect(listSecurityGroupsOptionsModel.Limit).To(Equal(core.Int64Ptr(int64(10)))) Expect(listSecurityGroupsOptionsModel.ResourceGroupID).To(Equal(core.StringPtr("testString"))) Expect(listSecurityGroupsOptionsModel.VPCID).To(Equal(core.StringPtr("testString"))) - Expect(listSecurityGroupsOptionsModel.VPCCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"))) + Expect(listSecurityGroupsOptionsModel.VPCCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"))) Expect(listSecurityGroupsOptionsModel.VPCName).To(Equal(core.StringPtr("my-vpc"))) Expect(listSecurityGroupsOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) @@ -106182,9 +106290,9 @@ var _ = Describe(`VpcV1`, func() { listSnapshotsOptionsModel.SetResourceGroupID("testString") listSnapshotsOptionsModel.SetName("testString") listSnapshotsOptionsModel.SetSourceVolumeID("testString") - listSnapshotsOptionsModel.SetSourceVolumeCRN("crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + listSnapshotsOptionsModel.SetSourceVolumeCRN("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5") listSnapshotsOptionsModel.SetSourceImageID("testString") - listSnapshotsOptionsModel.SetSourceImageCRN("crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") + listSnapshotsOptionsModel.SetSourceImageCRN("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") listSnapshotsOptionsModel.SetSort("name") listSnapshotsOptionsModel.SetBackupPolicyPlanID("testString") listSnapshotsOptionsModel.SetCopiesID("testString") @@ -106197,7 +106305,7 @@ var _ = Describe(`VpcV1`, func() { listSnapshotsOptionsModel.SetSourceImageRemoteRegionName("us-south") listSnapshotsOptionsModel.SetClonesZoneName("us-south-1") listSnapshotsOptionsModel.SetSnapshotConsistencyGroupID("testString") - listSnapshotsOptionsModel.SetSnapshotConsistencyGroupCRN("crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263") + listSnapshotsOptionsModel.SetSnapshotConsistencyGroupCRN("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263") listSnapshotsOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(listSnapshotsOptionsModel).ToNot(BeNil()) Expect(listSnapshotsOptionsModel.Start).To(Equal(core.StringPtr("testString"))) @@ -106206,9 +106314,9 @@ var _ = Describe(`VpcV1`, func() { Expect(listSnapshotsOptionsModel.ResourceGroupID).To(Equal(core.StringPtr("testString"))) Expect(listSnapshotsOptionsModel.Name).To(Equal(core.StringPtr("testString"))) Expect(listSnapshotsOptionsModel.SourceVolumeID).To(Equal(core.StringPtr("testString"))) - Expect(listSnapshotsOptionsModel.SourceVolumeCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5"))) + Expect(listSnapshotsOptionsModel.SourceVolumeCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5"))) Expect(listSnapshotsOptionsModel.SourceImageID).To(Equal(core.StringPtr("testString"))) - Expect(listSnapshotsOptionsModel.SourceImageCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"))) + Expect(listSnapshotsOptionsModel.SourceImageCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"))) Expect(listSnapshotsOptionsModel.Sort).To(Equal(core.StringPtr("name"))) Expect(listSnapshotsOptionsModel.BackupPolicyPlanID).To(Equal(core.StringPtr("testString"))) Expect(listSnapshotsOptionsModel.CopiesID).To(Equal(core.StringPtr("testString"))) @@ -106221,7 +106329,7 @@ var _ = Describe(`VpcV1`, func() { Expect(listSnapshotsOptionsModel.SourceImageRemoteRegionName).To(Equal(core.StringPtr("us-south"))) Expect(listSnapshotsOptionsModel.ClonesZoneName).To(Equal(core.StringPtr("us-south-1"))) Expect(listSnapshotsOptionsModel.SnapshotConsistencyGroupID).To(Equal(core.StringPtr("testString"))) - Expect(listSnapshotsOptionsModel.SnapshotConsistencyGroupCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263"))) + Expect(listSnapshotsOptionsModel.SnapshotConsistencyGroupCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263"))) Expect(listSnapshotsOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewListSubnetReservedIpsOptions successfully`, func() { @@ -106233,7 +106341,7 @@ var _ = Describe(`VpcV1`, func() { listSubnetReservedIpsOptionsModel.SetLimit(int64(10)) listSubnetReservedIpsOptionsModel.SetSort("name") listSubnetReservedIpsOptionsModel.SetTargetID("testString") - listSubnetReservedIpsOptionsModel.SetTargetCRN("crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727") + listSubnetReservedIpsOptionsModel.SetTargetCRN("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727") listSubnetReservedIpsOptionsModel.SetTargetName("my-resource") listSubnetReservedIpsOptionsModel.SetTargetResourceType("testString") listSubnetReservedIpsOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) @@ -106243,7 +106351,7 @@ var _ = Describe(`VpcV1`, func() { Expect(listSubnetReservedIpsOptionsModel.Limit).To(Equal(core.Int64Ptr(int64(10)))) Expect(listSubnetReservedIpsOptionsModel.Sort).To(Equal(core.StringPtr("name"))) Expect(listSubnetReservedIpsOptionsModel.TargetID).To(Equal(core.StringPtr("testString"))) - Expect(listSubnetReservedIpsOptionsModel.TargetCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727"))) + Expect(listSubnetReservedIpsOptionsModel.TargetCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727"))) Expect(listSubnetReservedIpsOptionsModel.TargetName).To(Equal(core.StringPtr("my-resource"))) Expect(listSubnetReservedIpsOptionsModel.TargetResourceType).To(Equal(core.StringPtr("testString"))) Expect(listSubnetReservedIpsOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) @@ -106256,7 +106364,7 @@ var _ = Describe(`VpcV1`, func() { listSubnetsOptionsModel.SetResourceGroupID("testString") listSubnetsOptionsModel.SetZoneName("us-south-1") listSubnetsOptionsModel.SetVPCID("testString") - listSubnetsOptionsModel.SetVPCCRN("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listSubnetsOptionsModel.SetVPCCRN("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listSubnetsOptionsModel.SetVPCName("my-vpc") listSubnetsOptionsModel.SetRoutingTableID("testString") listSubnetsOptionsModel.SetRoutingTableName("my-routing-table") @@ -106267,7 +106375,7 @@ var _ = Describe(`VpcV1`, func() { Expect(listSubnetsOptionsModel.ResourceGroupID).To(Equal(core.StringPtr("testString"))) Expect(listSubnetsOptionsModel.ZoneName).To(Equal(core.StringPtr("us-south-1"))) Expect(listSubnetsOptionsModel.VPCID).To(Equal(core.StringPtr("testString"))) - Expect(listSubnetsOptionsModel.VPCCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"))) + Expect(listSubnetsOptionsModel.VPCCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"))) Expect(listSubnetsOptionsModel.VPCName).To(Equal(core.StringPtr("my-vpc"))) Expect(listSubnetsOptionsModel.RoutingTableID).To(Equal(core.StringPtr("testString"))) Expect(listSubnetsOptionsModel.RoutingTableName).To(Equal(core.StringPtr("my-routing-table"))) @@ -106361,9 +106469,9 @@ var _ = Describe(`VpcV1`, func() { listVPCDnsResolutionBindingsOptionsModel.SetStart("testString") listVPCDnsResolutionBindingsOptionsModel.SetLimit(int64(10)) listVPCDnsResolutionBindingsOptionsModel.SetName("testString") - listVPCDnsResolutionBindingsOptionsModel.SetVPCCRN("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") + listVPCDnsResolutionBindingsOptionsModel.SetVPCCRN("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b") listVPCDnsResolutionBindingsOptionsModel.SetVPCName("my-vpc") - listVPCDnsResolutionBindingsOptionsModel.SetAccountID("aa2432b1fa4d4ace891e9b80fc104e34") + listVPCDnsResolutionBindingsOptionsModel.SetAccountID("bb1b52262f7441a586f49068482f1e60") listVPCDnsResolutionBindingsOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(listVPCDnsResolutionBindingsOptionsModel).ToNot(BeNil()) Expect(listVPCDnsResolutionBindingsOptionsModel.VPCID).To(Equal(core.StringPtr("testString"))) @@ -106371,9 +106479,9 @@ var _ = Describe(`VpcV1`, func() { Expect(listVPCDnsResolutionBindingsOptionsModel.Start).To(Equal(core.StringPtr("testString"))) Expect(listVPCDnsResolutionBindingsOptionsModel.Limit).To(Equal(core.Int64Ptr(int64(10)))) Expect(listVPCDnsResolutionBindingsOptionsModel.Name).To(Equal(core.StringPtr("testString"))) - Expect(listVPCDnsResolutionBindingsOptionsModel.VPCCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"))) + Expect(listVPCDnsResolutionBindingsOptionsModel.VPCCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b"))) Expect(listVPCDnsResolutionBindingsOptionsModel.VPCName).To(Equal(core.StringPtr("my-vpc"))) - Expect(listVPCDnsResolutionBindingsOptionsModel.AccountID).To(Equal(core.StringPtr("aa2432b1fa4d4ace891e9b80fc104e34"))) + Expect(listVPCDnsResolutionBindingsOptionsModel.AccountID).To(Equal(core.StringPtr("bb1b52262f7441a586f49068482f1e60"))) Expect(listVPCDnsResolutionBindingsOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewListVPCRoutesOptions successfully`, func() { @@ -106440,31 +106548,18 @@ var _ = Describe(`VpcV1`, func() { Expect(listVpcsOptionsModel.ClassicAccess).To(Equal(core.BoolPtr(true))) Expect(listVpcsOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) - It(`Invoke NewListVPNGatewayConnectionLocalCIDRsOptions successfully`, func() { - // Construct an instance of the ListVPNGatewayConnectionLocalCIDRsOptions model + It(`Invoke NewListVPNGatewayConnectionsLocalCIDRsOptions successfully`, func() { + // Construct an instance of the ListVPNGatewayConnectionsLocalCIDRsOptions model vpnGatewayID := "testString" id := "testString" - listVPNGatewayConnectionLocalCIDRsOptionsModel := vpcService.NewListVPNGatewayConnectionLocalCIDRsOptions(vpnGatewayID, id) - listVPNGatewayConnectionLocalCIDRsOptionsModel.SetVPNGatewayID("testString") - listVPNGatewayConnectionLocalCIDRsOptionsModel.SetID("testString") - listVPNGatewayConnectionLocalCIDRsOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) - Expect(listVPNGatewayConnectionLocalCIDRsOptionsModel).ToNot(BeNil()) - Expect(listVPNGatewayConnectionLocalCIDRsOptionsModel.VPNGatewayID).To(Equal(core.StringPtr("testString"))) - Expect(listVPNGatewayConnectionLocalCIDRsOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(listVPNGatewayConnectionLocalCIDRsOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) - }) - It(`Invoke NewListVPNGatewayConnectionPeerCIDRsOptions successfully`, func() { - // Construct an instance of the ListVPNGatewayConnectionPeerCIDRsOptions model - vpnGatewayID := "testString" - id := "testString" - listVPNGatewayConnectionPeerCIDRsOptionsModel := vpcService.NewListVPNGatewayConnectionPeerCIDRsOptions(vpnGatewayID, id) - listVPNGatewayConnectionPeerCIDRsOptionsModel.SetVPNGatewayID("testString") - listVPNGatewayConnectionPeerCIDRsOptionsModel.SetID("testString") - listVPNGatewayConnectionPeerCIDRsOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) - Expect(listVPNGatewayConnectionPeerCIDRsOptionsModel).ToNot(BeNil()) - Expect(listVPNGatewayConnectionPeerCIDRsOptionsModel.VPNGatewayID).To(Equal(core.StringPtr("testString"))) - Expect(listVPNGatewayConnectionPeerCIDRsOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(listVPNGatewayConnectionPeerCIDRsOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) + listVPNGatewayConnectionsLocalCIDRsOptionsModel := vpcService.NewListVPNGatewayConnectionsLocalCIDRsOptions(vpnGatewayID, id) + listVPNGatewayConnectionsLocalCIDRsOptionsModel.SetVPNGatewayID("testString") + listVPNGatewayConnectionsLocalCIDRsOptionsModel.SetID("testString") + listVPNGatewayConnectionsLocalCIDRsOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) + Expect(listVPNGatewayConnectionsLocalCIDRsOptionsModel).ToNot(BeNil()) + Expect(listVPNGatewayConnectionsLocalCIDRsOptionsModel.VPNGatewayID).To(Equal(core.StringPtr("testString"))) + Expect(listVPNGatewayConnectionsLocalCIDRsOptionsModel.ID).To(Equal(core.StringPtr("testString"))) + Expect(listVPNGatewayConnectionsLocalCIDRsOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewListVPNGatewayConnectionsOptions successfully`, func() { // Construct an instance of the ListVPNGatewayConnectionsOptions model @@ -106478,6 +106573,19 @@ var _ = Describe(`VpcV1`, func() { Expect(listVPNGatewayConnectionsOptionsModel.Status).To(Equal(core.StringPtr("down"))) Expect(listVPNGatewayConnectionsOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) + It(`Invoke NewListVPNGatewayConnectionsPeerCIDRsOptions successfully`, func() { + // Construct an instance of the ListVPNGatewayConnectionsPeerCIDRsOptions model + vpnGatewayID := "testString" + id := "testString" + listVPNGatewayConnectionsPeerCIDRsOptionsModel := vpcService.NewListVPNGatewayConnectionsPeerCIDRsOptions(vpnGatewayID, id) + listVPNGatewayConnectionsPeerCIDRsOptionsModel.SetVPNGatewayID("testString") + listVPNGatewayConnectionsPeerCIDRsOptionsModel.SetID("testString") + listVPNGatewayConnectionsPeerCIDRsOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) + Expect(listVPNGatewayConnectionsPeerCIDRsOptionsModel).ToNot(BeNil()) + Expect(listVPNGatewayConnectionsPeerCIDRsOptionsModel.VPNGatewayID).To(Equal(core.StringPtr("testString"))) + Expect(listVPNGatewayConnectionsPeerCIDRsOptionsModel.ID).To(Equal(core.StringPtr("testString"))) + Expect(listVPNGatewayConnectionsPeerCIDRsOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) + }) It(`Invoke NewListVPNGatewaysOptions successfully`, func() { // Construct an instance of the ListVPNGatewaysOptions model listVPNGatewaysOptionsModel := vpcService.NewListVPNGatewaysOptions() @@ -106706,50 +106814,44 @@ var _ = Describe(`VpcV1`, func() { Expect(removeVirtualNetworkInterfaceIPOptionsModel.ID).To(Equal(core.StringPtr("testString"))) Expect(removeVirtualNetworkInterfaceIPOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) - It(`Invoke NewRemoveVPNGatewayConnectionLocalCIDROptions successfully`, func() { - // Construct an instance of the RemoveVPNGatewayConnectionLocalCIDROptions model + It(`Invoke NewRemoveVPNGatewayConnectionsLocalCIDROptions successfully`, func() { + // Construct an instance of the RemoveVPNGatewayConnectionsLocalCIDROptions model vpnGatewayID := "testString" id := "testString" - cidrPrefix := "testString" - prefixLength := "testString" - removeVPNGatewayConnectionLocalCIDROptionsModel := vpcService.NewRemoveVPNGatewayConnectionLocalCIDROptions(vpnGatewayID, id, cidrPrefix, prefixLength) - removeVPNGatewayConnectionLocalCIDROptionsModel.SetVPNGatewayID("testString") - removeVPNGatewayConnectionLocalCIDROptionsModel.SetID("testString") - removeVPNGatewayConnectionLocalCIDROptionsModel.SetCIDRPrefix("testString") - removeVPNGatewayConnectionLocalCIDROptionsModel.SetPrefixLength("testString") - removeVPNGatewayConnectionLocalCIDROptionsModel.SetHeaders(map[string]string{"foo": "bar"}) - Expect(removeVPNGatewayConnectionLocalCIDROptionsModel).ToNot(BeNil()) - Expect(removeVPNGatewayConnectionLocalCIDROptionsModel.VPNGatewayID).To(Equal(core.StringPtr("testString"))) - Expect(removeVPNGatewayConnectionLocalCIDROptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(removeVPNGatewayConnectionLocalCIDROptionsModel.CIDRPrefix).To(Equal(core.StringPtr("testString"))) - Expect(removeVPNGatewayConnectionLocalCIDROptionsModel.PrefixLength).To(Equal(core.StringPtr("testString"))) - Expect(removeVPNGatewayConnectionLocalCIDROptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) - }) - It(`Invoke NewRemoveVPNGatewayConnectionPeerCIDROptions successfully`, func() { - // Construct an instance of the RemoveVPNGatewayConnectionPeerCIDROptions model + cidr := "192.168.1.0/24" + removeVPNGatewayConnectionsLocalCIDROptionsModel := vpcService.NewRemoveVPNGatewayConnectionsLocalCIDROptions(vpnGatewayID, id, cidr) + removeVPNGatewayConnectionsLocalCIDROptionsModel.SetVPNGatewayID("testString") + removeVPNGatewayConnectionsLocalCIDROptionsModel.SetID("testString") + removeVPNGatewayConnectionsLocalCIDROptionsModel.SetCIDR("192.168.1.0/24") + removeVPNGatewayConnectionsLocalCIDROptionsModel.SetHeaders(map[string]string{"foo": "bar"}) + Expect(removeVPNGatewayConnectionsLocalCIDROptionsModel).ToNot(BeNil()) + Expect(removeVPNGatewayConnectionsLocalCIDROptionsModel.VPNGatewayID).To(Equal(core.StringPtr("testString"))) + Expect(removeVPNGatewayConnectionsLocalCIDROptionsModel.ID).To(Equal(core.StringPtr("testString"))) + Expect(removeVPNGatewayConnectionsLocalCIDROptionsModel.CIDR).To(Equal(core.StringPtr("192.168.1.0/24"))) + Expect(removeVPNGatewayConnectionsLocalCIDROptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) + }) + It(`Invoke NewRemoveVPNGatewayConnectionsPeerCIDROptions successfully`, func() { + // Construct an instance of the RemoveVPNGatewayConnectionsPeerCIDROptions model vpnGatewayID := "testString" id := "testString" - cidrPrefix := "testString" - prefixLength := "testString" - removeVPNGatewayConnectionPeerCIDROptionsModel := vpcService.NewRemoveVPNGatewayConnectionPeerCIDROptions(vpnGatewayID, id, cidrPrefix, prefixLength) - removeVPNGatewayConnectionPeerCIDROptionsModel.SetVPNGatewayID("testString") - removeVPNGatewayConnectionPeerCIDROptionsModel.SetID("testString") - removeVPNGatewayConnectionPeerCIDROptionsModel.SetCIDRPrefix("testString") - removeVPNGatewayConnectionPeerCIDROptionsModel.SetPrefixLength("testString") - removeVPNGatewayConnectionPeerCIDROptionsModel.SetHeaders(map[string]string{"foo": "bar"}) - Expect(removeVPNGatewayConnectionPeerCIDROptionsModel).ToNot(BeNil()) - Expect(removeVPNGatewayConnectionPeerCIDROptionsModel.VPNGatewayID).To(Equal(core.StringPtr("testString"))) - Expect(removeVPNGatewayConnectionPeerCIDROptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(removeVPNGatewayConnectionPeerCIDROptionsModel.CIDRPrefix).To(Equal(core.StringPtr("testString"))) - Expect(removeVPNGatewayConnectionPeerCIDROptionsModel.PrefixLength).To(Equal(core.StringPtr("testString"))) - Expect(removeVPNGatewayConnectionPeerCIDROptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) + cidr := "192.168.1.0/24" + removeVPNGatewayConnectionsPeerCIDROptionsModel := vpcService.NewRemoveVPNGatewayConnectionsPeerCIDROptions(vpnGatewayID, id, cidr) + removeVPNGatewayConnectionsPeerCIDROptionsModel.SetVPNGatewayID("testString") + removeVPNGatewayConnectionsPeerCIDROptionsModel.SetID("testString") + removeVPNGatewayConnectionsPeerCIDROptionsModel.SetCIDR("192.168.1.0/24") + removeVPNGatewayConnectionsPeerCIDROptionsModel.SetHeaders(map[string]string{"foo": "bar"}) + Expect(removeVPNGatewayConnectionsPeerCIDROptionsModel).ToNot(BeNil()) + Expect(removeVPNGatewayConnectionsPeerCIDROptionsModel.VPNGatewayID).To(Equal(core.StringPtr("testString"))) + Expect(removeVPNGatewayConnectionsPeerCIDROptionsModel.ID).To(Equal(core.StringPtr("testString"))) + Expect(removeVPNGatewayConnectionsPeerCIDROptionsModel.CIDR).To(Equal(core.StringPtr("192.168.1.0/24"))) + Expect(removeVPNGatewayConnectionsPeerCIDROptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewReplaceLoadBalancerPoolMembersOptions successfully`, func() { // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID model loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) Expect(loadBalancerPoolMemberTargetPrototypeModel).ToNot(BeNil()) - loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") - Expect(loadBalancerPoolMemberTargetPrototypeModel.ID).To(Equal(core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a"))) + loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") + Expect(loadBalancerPoolMemberTargetPrototypeModel.ID).To(Equal(core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a"))) // Construct an instance of the LoadBalancerPoolMemberPrototype model loadBalancerPoolMemberPrototypeModel := new(vpcv1.LoadBalancerPoolMemberPrototype) @@ -107818,6 +107920,12 @@ var _ = Describe(`VpcV1`, func() { Expect(updateVPNServerRouteOptionsModel.VPNServerRoutePatch).To(Equal(map[string]interface{}{"anyKey": "anyValue"})) Expect(updateVPNServerRouteOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) + It(`Invoke NewVPNGatewayConnectionPolicyModeLocalPrototype successfully`, func() { + cidrs := []string{"192.168.1.0/24"} + _model, err := vpcService.NewVPNGatewayConnectionPolicyModeLocalPrototype(cidrs) + Expect(_model).ToNot(BeNil()) + Expect(err).To(BeNil()) + }) It(`Invoke NewVolumeAttachmentPrototype successfully`, func() { var volume vpcv1.VolumeAttachmentPrototypeVolumeIntf = nil _, err := vpcService.NewVolumeAttachmentPrototype(volume) @@ -107929,25 +108037,25 @@ var _ = Describe(`VpcV1`, func() { Expect(err).ToNot(BeNil()) }) It(`Invoke NewCatalogOfferingIdentityCatalogOfferingByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442" + crn := "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442" _model, err := vpcService.NewCatalogOfferingIdentityCatalogOfferingByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewCatalogOfferingVersionIdentityCatalogOfferingVersionByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d" + crn := "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d" _model, err := vpcService.NewCatalogOfferingVersionIdentityCatalogOfferingVersionByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewCertificateInstanceIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5" + crn := "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5" _model, err := vpcService.NewCertificateInstanceIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewCloudObjectStorageBucketIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:cloud-object-storage:global:a/123456:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket" + crn := "crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket" _model, err := vpcService.NewCloudObjectStorageBucketIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -107959,7 +108067,7 @@ var _ = Describe(`VpcV1`, func() { Expect(err).To(BeNil()) }) It(`Invoke NewDnsInstanceIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:dns-svcs:global:a/123456:6860c359-b2e2-46fa-a944-b38c28201c6e" + crn := "crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e" _model, err := vpcService.NewDnsInstanceIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -107971,7 +108079,7 @@ var _ = Describe(`VpcV1`, func() { Expect(err).To(BeNil()) }) It(`Invoke NewDedicatedHostGroupIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0" + crn := "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0" _model, err := vpcService.NewDedicatedHostGroupIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -108013,7 +108121,7 @@ var _ = Describe(`VpcV1`, func() { Expect(err).ToNot(BeNil()) }) It(`Invoke NewEncryptionKeyIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:kms:us-south:a/123456:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179" + crn := "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179" _model, err := vpcService.NewEncryptionKeyIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -108034,19 +108142,19 @@ var _ = Describe(`VpcV1`, func() { Expect(err).ToNot(BeNil()) }) It(`Invoke NewImageIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8" + crn := "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8" _model, err := vpcService.NewImageIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewImageIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8" + href := "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8" _model, err := vpcService.NewImageIdentityByHref(href) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewImageIdentityByID successfully`, func() { - id := "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8" + id := "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8" _model, err := vpcService.NewImageIdentityByID(id) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -108123,7 +108231,7 @@ var _ = Describe(`VpcV1`, func() { Expect(err).ToNot(BeNil()) }) It(`Invoke NewInstanceTemplateIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a" + crn := "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a" _model, err := vpcService.NewInstanceTemplateIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -108146,7 +108254,7 @@ var _ = Describe(`VpcV1`, func() { Expect(err).ToNot(BeNil()) }) It(`Invoke NewKeyIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803" + crn := "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:a6b1a881-2ce8-41a3-80fc-36316a73f803" _model, err := vpcService.NewKeyIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -108176,7 +108284,7 @@ var _ = Describe(`VpcV1`, func() { Expect(err).To(BeNil()) }) It(`Invoke NewLoadBalancerIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727" + crn := "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727" _model, err := vpcService.NewLoadBalancerIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -108261,19 +108369,19 @@ var _ = Describe(`VpcV1`, func() { Expect(err).To(BeNil()) }) It(`Invoke NewNetworkACLIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf" + crn := "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf" _model, err := vpcService.NewNetworkACLIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewNetworkACLIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf" + href := "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf" _model, err := vpcService.NewNetworkACLIdentityByHref(href) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewNetworkACLIdentityByID successfully`, func() { - id := "a4e28308-8ee7-46ab-8108-9f881f22bdbf" + id := "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf" _model, err := vpcService.NewNetworkACLIdentityByID(id) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -108386,7 +108494,7 @@ var _ = Describe(`VpcV1`, func() { Expect(err).To(BeNil()) }) It(`Invoke NewPublicGatewayIdentityPublicGatewayIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south-1:a/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241" + crn := "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241" _model, err := vpcService.NewPublicGatewayIdentityPublicGatewayIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -108416,7 +108524,7 @@ var _ = Describe(`VpcV1`, func() { Expect(err).To(BeNil()) }) It(`Invoke NewReservationIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south:a/123456::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63" + crn := "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63" _model, err := vpcService.NewReservationIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -108440,31 +108548,31 @@ var _ = Describe(`VpcV1`, func() { Expect(err).To(BeNil()) }) It(`Invoke NewRoutingTableIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840" + href := "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840" _model, err := vpcService.NewRoutingTableIdentityByHref(href) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewRoutingTableIdentityByID successfully`, func() { - id := "1a15dca5-7e33-45e1-b7c5-bc690e569531" + id := "r006-6885e83f-03b2-4603-8a86-db2a0f55c840" _model, err := vpcService.NewRoutingTableIdentityByID(id) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewSecurityGroupIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271" + crn := "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271" _model, err := vpcService.NewSecurityGroupIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewSecurityGroupIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271" + href := "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271" _model, err := vpcService.NewSecurityGroupIdentityByHref(href) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewSecurityGroupIdentityByID successfully`, func() { - id := "be5df5ca-12a0-494b-907e-aa6ec2bfa271" + id := "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271" _model, err := vpcService.NewSecurityGroupIdentityByID(id) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -108539,7 +108647,7 @@ var _ = Describe(`VpcV1`, func() { Expect(err).To(BeNil()) }) It(`Invoke NewShareIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south-1:a/123456::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58" + crn := "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58" _model, err := vpcService.NewShareIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -108600,7 +108708,7 @@ var _ = Describe(`VpcV1`, func() { Expect(err).To(BeNil()) }) It(`Invoke NewSnapshotIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263" + crn := "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263" _model, err := vpcService.NewSnapshotIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -108628,19 +108736,19 @@ var _ = Describe(`VpcV1`, func() { Expect(err).ToNot(BeNil()) }) It(`Invoke NewSubnetIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e" + crn := "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e" _model, err := vpcService.NewSubnetIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewSubnetIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e" + href := "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e" _model, err := vpcService.NewSubnetIdentityByHref(href) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewSubnetIdentityByID successfully`, func() { - id := "7ec86020-1c6e-4889-b3f0-a15f2e50f87e" + id := "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e" _model, err := vpcService.NewSubnetIdentityByID(id) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -108659,7 +108767,7 @@ var _ = Describe(`VpcV1`, func() { Expect(err).ToNot(BeNil()) }) It(`Invoke NewSubnetPublicGatewayPatchPublicGatewayIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south-1:a/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241" + crn := "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241" _model, err := vpcService.NewSubnetPublicGatewayPatchPublicGatewayIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -108677,7 +108785,7 @@ var _ = Describe(`VpcV1`, func() { Expect(err).To(BeNil()) }) It(`Invoke NewTrustedProfileIdentityTrustedProfileByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:iam-identity::a/123456::profile:Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5" + crn := "crn:v1:bluemix:public:iam-identity::a/aa2432b1fa4d4ace891e9b80fc104e34::profile:Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5" _model, err := vpcService.NewTrustedProfileIdentityTrustedProfileByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -108696,41 +108804,68 @@ var _ = Describe(`VpcV1`, func() { Expect(err).To(BeNil()) }) It(`Invoke NewVpcdnsResolverVPCPatchVPCIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b" + crn := "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b" _model, err := vpcService.NewVpcdnsResolverVPCPatchVPCIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewVpcdnsResolverVPCPatchVPCIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b" + href := "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b" _model, err := vpcService.NewVpcdnsResolverVPCPatchVPCIdentityByHref(href) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewVpcdnsResolverVPCPatchVPCIdentityByID successfully`, func() { - id := "4727d842-f94f-4a2d-824a-9bc9b02c523b" + id := "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b" _model, err := vpcService.NewVpcdnsResolverVPCPatchVPCIdentityByID(id) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewVPCIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b" + crn := "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b" _model, err := vpcService.NewVPCIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewVPCIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b" + href := "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b" _model, err := vpcService.NewVPCIdentityByHref(href) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewVPCIdentityByID successfully`, func() { - id := "4727d842-f94f-4a2d-824a-9bc9b02c523b" + id := "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b" _model, err := vpcService.NewVPCIdentityByID(id) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) + It(`Invoke NewVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn successfully`, func() { + typeVar := "fqdn" + value := "my-service.example.com" + _model, err := vpcService.NewVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn(typeVar, value) + Expect(_model).ToNot(BeNil()) + Expect(err).To(BeNil()) + }) + It(`Invoke NewVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityHostname successfully`, func() { + typeVar := "fqdn" + value := "my-hostname" + _model, err := vpcService.NewVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityHostname(typeVar, value) + Expect(_model).ToNot(BeNil()) + Expect(err).To(BeNil()) + }) + It(`Invoke NewVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityIPv4 successfully`, func() { + typeVar := "fqdn" + value := "192.168.3.4" + _model, err := vpcService.NewVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityIPv4(typeVar, value) + Expect(_model).ToNot(BeNil()) + Expect(err).To(BeNil()) + }) + It(`Invoke NewVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityKeyID successfully`, func() { + typeVar := "fqdn" + _model, err := vpcService.NewVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityKeyID(typeVar, "qQ+/YEApnl1ZtEgIrfprzb065307thTkzlnLqL5ICpesdbBN03dyCQ==") + Expect(_model).ToNot(BeNil()) + Expect(err).To(BeNil()) + }) It(`Invoke NewVPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref successfully`, func() { href := "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b" _model, err := vpcService.NewVPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref(href) @@ -108779,19 +108914,42 @@ var _ = Describe(`VpcV1`, func() { Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) - It(`Invoke NewVPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype successfully`, func() { - peerAddress := "169.21.50.5" - psk := "lkj14b1oi0alcniejkso" - localCIDRs := []string{"192.168.1.0/24"} - peerCIDRs := []string{"10.45.1.0/24"} - _model, err := vpcService.NewVPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype(peerAddress, psk, localCIDRs, peerCIDRs) + It(`Invoke NewVPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress successfully`, func() { + cidrs := []string{"10.45.1.0/24"} + address := "169.21.50.5" + _model, err := vpcService.NewVPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress(cidrs, address) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) + It(`Invoke NewVPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFqdn successfully`, func() { + cidrs := []string{"10.45.1.0/24"} + fqdn := "my-service.example.com" + _model, err := vpcService.NewVPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFqdn(cidrs, fqdn) + Expect(_model).ToNot(BeNil()) + Expect(err).To(BeNil()) + }) + It(`Invoke NewVPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype successfully`, func() { + psk := "lkj14b1oi0alcniejkso" + var local *vpcv1.VPNGatewayConnectionPolicyModeLocalPrototype = nil + var peer vpcv1.VPNGatewayConnectionPolicyModePeerPrototypeIntf = nil + _, err := vpcService.NewVPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype(psk, local, peer) + Expect(err).ToNot(BeNil()) + }) It(`Invoke NewVPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype successfully`, func() { - peerAddress := "169.21.50.5" psk := "lkj14b1oi0alcniejkso" - _model, err := vpcService.NewVPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype(peerAddress, psk) + var peer vpcv1.VPNGatewayConnectionStaticRouteModePeerPrototypeIntf = nil + _, err := vpcService.NewVPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype(psk, peer) + Expect(err).ToNot(BeNil()) + }) + It(`Invoke NewVPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress successfully`, func() { + address := "169.21.50.5" + _model, err := vpcService.NewVPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress(address) + Expect(_model).ToNot(BeNil()) + Expect(err).To(BeNil()) + }) + It(`Invoke NewVPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn successfully`, func() { + fqdn := "my-service.example.com" + _model, err := vpcService.NewVPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn(fqdn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) @@ -108824,19 +108982,19 @@ var _ = Describe(`VpcV1`, func() { Expect(err).ToNot(BeNil()) }) It(`Invoke NewVolumeIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5" + crn := "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5" _model, err := vpcService.NewVolumeIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewVolumeIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5" + href := "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5" _model, err := vpcService.NewVolumeIdentityByHref(href) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewVolumeIdentityByID successfully`, func() { - id := "1a6b7274-678d-4dfb-8981-c71dd9d4daa5" + id := "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5" _model, err := vpcService.NewVolumeIdentityByID(id) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -108880,13 +109038,13 @@ var _ = Describe(`VpcV1`, func() { Expect(err).To(BeNil()) }) It(`Invoke NewBackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:enterprise::a/123456::enterprise:ebc2b430240943458b9e91e1432cfcce" + crn := "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce" _model, err := vpcService.NewBackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewBareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9" + crn := "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9" _model, err := vpcService.NewBareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -108904,20 +109062,20 @@ var _ = Describe(`VpcV1`, func() { Expect(err).To(BeNil()) }) It(`Invoke NewEndpointGatewayReservedIPReservedIPIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb" + href := "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb" _model, err := vpcService.NewEndpointGatewayReservedIPReservedIPIdentityByHref(href) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewEndpointGatewayReservedIPReservedIPIdentityByID successfully`, func() { - id := "6d353a0f-aeb1-4ae1-832e-1110d10981bb" + id := "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb" _model, err := vpcService.NewEndpointGatewayReservedIPReservedIPIdentityByID(id) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewEndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN successfully`, func() { resourceType := "provider_cloud_service" - crn := "crn:v1:bluemix:public:cloudant:us-south:a/123456:3527280b-9327-4411-8020-591092e60353::" + crn := "crn:v1:bluemix:public:cloudant:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:3527280b-9327-4411-8020-591092e60353::" _model, err := vpcService.NewEndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN(resourceType, crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -108942,19 +109100,19 @@ var _ = Describe(`VpcV1`, func() { Expect(err).To(BeNil()) }) It(`Invoke NewFloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e" + href := "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e" _model, err := vpcService.NewFloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(href) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewFloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByID successfully`, func() { - id := "10c02d81-0ecb-4dc5-897d-28392913b81e" + id := "0717-10c02d81-0ecb-4dc5-897d-28392913b81e" _model, err := vpcService.NewFloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByID(id) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewFloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9" + crn := "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9" _model, err := vpcService.NewFloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -108984,19 +109142,19 @@ var _ = Describe(`VpcV1`, func() { Expect(err).To(BeNil()) }) It(`Invoke NewFloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e" + href := "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e" _model, err := vpcService.NewFloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(href) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewFloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID successfully`, func() { - id := "10c02d81-0ecb-4dc5-897d-28392913b81e" + id := "0717-10c02d81-0ecb-4dc5-897d-28392913b81e" _model, err := vpcService.NewFloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID(id) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewFloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9" + crn := "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9" _model, err := vpcService.NewFloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -109014,85 +109172,85 @@ var _ = Describe(`VpcV1`, func() { Expect(err).To(BeNil()) }) It(`Invoke NewFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a" + crn := "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a" _model, err := vpcService.NewFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a" + href := "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a" _model, err := vpcService.NewFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref(href) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID successfully`, func() { - id := "1e09281b-f177-46fb-baf1-bc152b2e391a" + id := "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a" _model, err := vpcService.NewFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID(id) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewFlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0767-d54eb633-98ea-459d-aa00-6a8e780175a7" + href := "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7" _model, err := vpcService.NewFlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref(href) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewFlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByID successfully`, func() { - id := "0767-d54eb633-98ea-459d-aa00-6a8e780175a7" + id := "0717-d54eb633-98ea-459d-aa00-6a8e780175a7" _model, err := vpcService.NewFlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByID(id) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e" + href := "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e" _model, err := vpcService.NewFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(href) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID successfully`, func() { - id := "10c02d81-0ecb-4dc5-897d-28392913b81e" + id := "0717-10c02d81-0ecb-4dc5-897d-28392913b81e" _model, err := vpcService.NewFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID(id) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e" + crn := "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e" _model, err := vpcService.NewFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e" + href := "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e" _model, err := vpcService.NewFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref(href) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID successfully`, func() { - id := "7ec86020-1c6e-4889-b3f0-a15f2e50f87e" + id := "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e" _model, err := vpcService.NewFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID(id) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b" + crn := "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b" _model, err := vpcService.NewFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b" + href := "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b" _model, err := vpcService.NewFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref(href) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID successfully`, func() { - id := "4727d842-f94f-4a2d-824a-9bc9b02c523b" + id := "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b" _model, err := vpcService.NewFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID(id) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewFlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9" + crn := "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9" _model, err := vpcService.NewFlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -109122,7 +109280,7 @@ var _ = Describe(`VpcV1`, func() { Expect(err).To(BeNil()) }) It(`Invoke NewInstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9" + crn := "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9" _model, err := vpcService.NewInstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -109140,7 +109298,7 @@ var _ = Describe(`VpcV1`, func() { Expect(err).To(BeNil()) }) It(`Invoke NewInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0" + crn := "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0" _model, err := vpcService.NewInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -109158,25 +109316,25 @@ var _ = Describe(`VpcV1`, func() { Expect(err).To(BeNil()) }) It(`Invoke NewInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a" + crn := "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a" _model, err := vpcService.NewInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a" + href := "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a" _model, err := vpcService.NewInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref(href) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID successfully`, func() { - id := "1e09281b-f177-46fb-baf1-bc152b2e391a" + id := "0717-1e09281b-f177-46fb-baf1-bc152b2e391a" _model, err := vpcService.NewInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID(id) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0" + crn := "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0" _model, err := vpcService.NewInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -109194,25 +109352,25 @@ var _ = Describe(`VpcV1`, func() { Expect(err).To(BeNil()) }) It(`Invoke NewInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a" + crn := "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a" _model, err := vpcService.NewInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a" + href := "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a" _model, err := vpcService.NewInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref(href) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID successfully`, func() { - id := "1e09281b-f177-46fb-baf1-bc152b2e391a" + id := "0717-1e09281b-f177-46fb-baf1-bc152b2e391a" _model, err := vpcService.NewInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID(id) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871" + crn := "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871" _model, err := vpcService.NewInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -109352,31 +109510,31 @@ var _ = Describe(`VpcV1`, func() { Expect(err).To(BeNil()) }) It(`Invoke NewLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a" + crn := "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a" _model, err := vpcService.NewLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a" + href := "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a" _model, err := vpcService.NewLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref(href) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID successfully`, func() { - id := "1e09281b-f177-46fb-baf1-bc152b2e391a" + id := "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a" _model, err := vpcService.NewLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID(id) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewNetworkInterfaceIPPrototypeReservedIPIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb" + href := "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb" _model, err := vpcService.NewNetworkInterfaceIPPrototypeReservedIPIdentityByHref(href) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewNetworkInterfaceIPPrototypeReservedIPIdentityByID successfully`, func() { - id := "6d353a0f-aeb1-4ae1-832e-1110d10981bb" + id := "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb" _model, err := vpcService.NewNetworkInterfaceIPPrototypeReservedIPIdentityByID(id) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -109388,7 +109546,7 @@ var _ = Describe(`VpcV1`, func() { Expect(err).To(BeNil()) }) It(`Invoke NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689" + crn := "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689" _model, err := vpcService.NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -109406,7 +109564,7 @@ var _ = Describe(`VpcV1`, func() { Expect(err).To(BeNil()) }) It(`Invoke NewReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5" + crn := "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5" _model, err := vpcService.NewReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -109424,7 +109582,7 @@ var _ = Describe(`VpcV1`, func() { Expect(err).To(BeNil()) }) It(`Invoke NewReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9" + crn := "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9" _model, err := vpcService.NewReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -109490,43 +109648,43 @@ var _ = Describe(`VpcV1`, func() { Expect(err).To(BeNil()) }) It(`Invoke NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271" + crn := "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271" _model, err := vpcService.NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271" + href := "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271" _model, err := vpcService.NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref(href) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID successfully`, func() { - id := "be5df5ca-12a0-494b-907e-aa6ec2bfa271" + id := "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271" _model, err := vpcService.NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID(id) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271" + crn := "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271" _model, err := vpcService.NewSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271" + href := "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271" _model, err := vpcService.NewSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref(href) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID successfully`, func() { - id := "be5df5ca-12a0-494b-907e-aa6ec2bfa271" + id := "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271" _model, err := vpcService.NewSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID(id) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south-1:a/123456::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9" + crn := "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9" _model, err := vpcService.NewShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -109544,43 +109702,43 @@ var _ = Describe(`VpcV1`, func() { Expect(err).To(BeNil()) }) It(`Invoke NewVirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb" + href := "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb" _model, err := vpcService.NewVirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref(href) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewVirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByID successfully`, func() { - id := "6d353a0f-aeb1-4ae1-832e-1110d10981bb" + id := "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb" _model, err := vpcService.NewVirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByID(id) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewVirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb" + href := "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb" _model, err := vpcService.NewVirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref(href) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewVirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID successfully`, func() { - id := "6d353a0f-aeb1-4ae1-832e-1110d10981bb" + id := "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb" _model, err := vpcService.NewVirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID(id) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5" + crn := "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5" _model, err := vpcService.NewVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN(crn) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5" + href := "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5" _model, err := vpcService.NewVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref(href) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID successfully`, func() { - id := "1a6b7274-678d-4dfb-8981-c71dd9d4daa5" + id := "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5" _model, err := vpcService.NewVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID(id) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) @@ -109619,6 +109777,12206 @@ var _ = Describe(`VpcV1`, func() { }) }) }) + Describe(`Model unmarshaling tests`, func() { + It(`Invoke UnmarshalAddressPrefixPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.AddressPrefixPatch) + model.IsDefault = core.BoolPtr(false) + model.Name = core.StringPtr("my-address-prefix-1") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.AddressPrefixPatch + err = vpcv1.UnmarshalAddressPrefixPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBackupPolicyPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BackupPolicyPatch) + model.IncludedContent = []string{"data_volumes"} + model.MatchUserTags = []string{"my-daily-backup-policy"} + model.Name = core.StringPtr("my-backup-policy") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BackupPolicyPatch + err = vpcv1.UnmarshalBackupPolicyPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBackupPolicyPlanClonePolicyPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BackupPolicyPlanClonePolicyPatch) + model.MaxSnapshots = core.Int64Ptr(int64(1)) + model.Zones = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BackupPolicyPlanClonePolicyPatch + err = vpcv1.UnmarshalBackupPolicyPlanClonePolicyPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBackupPolicyPlanClonePolicyPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BackupPolicyPlanClonePolicyPrototype) + model.MaxSnapshots = core.Int64Ptr(int64(5)) + model.Zones = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BackupPolicyPlanClonePolicyPrototype + err = vpcv1.UnmarshalBackupPolicyPlanClonePolicyPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBackupPolicyPlanDeletionTriggerPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BackupPolicyPlanDeletionTriggerPatch) + model.DeleteAfter = core.Int64Ptr(int64(20)) + model.DeleteOverCount = core.Int64Ptr(int64(1)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BackupPolicyPlanDeletionTriggerPatch + err = vpcv1.UnmarshalBackupPolicyPlanDeletionTriggerPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBackupPolicyPlanDeletionTriggerPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BackupPolicyPlanDeletionTriggerPrototype) + model.DeleteAfter = core.Int64Ptr(int64(20)) + model.DeleteOverCount = core.Int64Ptr(int64(20)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BackupPolicyPlanDeletionTriggerPrototype + err = vpcv1.UnmarshalBackupPolicyPlanDeletionTriggerPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBackupPolicyPlanPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BackupPolicyPlanPatch) + model.Active = core.BoolPtr(true) + model.AttachUserTags = []string{"my-daily-backup-plan"} + model.ClonePolicy = nil + model.CopyUserTags = core.BoolPtr(true) + model.CronSpec = core.StringPtr("30 */2 * * 1-5") + model.DeletionTrigger = nil + model.Name = core.StringPtr("my-policy-plan") + model.RemoteRegionPolicies = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BackupPolicyPlanPatch + err = vpcv1.UnmarshalBackupPolicyPlanPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBackupPolicyPlanPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BackupPolicyPlanPrototype) + model.Active = core.BoolPtr(true) + model.AttachUserTags = []string{"my-daily-backup-plan"} + model.ClonePolicy = nil + model.CopyUserTags = core.BoolPtr(true) + model.CronSpec = core.StringPtr("30 */2 * * 1-5") + model.DeletionTrigger = nil + model.Name = core.StringPtr("my-policy-plan") + model.RemoteRegionPolicies = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BackupPolicyPlanPrototype + err = vpcv1.UnmarshalBackupPolicyPlanPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBackupPolicyPlanRemoteRegionPolicyPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BackupPolicyPlanRemoteRegionPolicyPrototype) + model.DeleteOverCount = core.Int64Ptr(int64(5)) + model.EncryptionKey = nil + model.Region = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BackupPolicyPlanRemoteRegionPolicyPrototype + err = vpcv1.UnmarshalBackupPolicyPlanRemoteRegionPolicyPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBackupPolicyPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BackupPolicyPrototype) + model.MatchResourceType = core.StringPtr("instance") + model.MatchUserTags = []string{"my-daily-backup-policy"} + model.Name = core.StringPtr("my-backup-policy") + model.Plans = nil + model.ResourceGroup = nil + model.Scope = nil + model.IncludedContent = []string{"boot_volume", "data_volumes"} + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BackupPolicyPrototype + err = vpcv1.UnmarshalBackupPolicyPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBackupPolicyScopePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BackupPolicyScopePrototype) + model.CRN = core.StringPtr("crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BackupPolicyScopePrototype + err = vpcv1.UnmarshalBackupPolicyScopePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBareMetalServerDiskPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BareMetalServerDiskPatch) + model.Name = core.StringPtr("my-bare-metal-server-disk-updated") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BareMetalServerDiskPatch + err = vpcv1.UnmarshalBareMetalServerDiskPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBareMetalServerInitializationPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BareMetalServerInitializationPrototype) + model.Image = nil + model.Keys = nil + model.UserData = core.StringPtr("testString") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BareMetalServerInitializationPrototype + err = vpcv1.UnmarshalBareMetalServerInitializationPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBareMetalServerNetworkAttachmentPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BareMetalServerNetworkAttachmentPatch) + model.AllowedVlans = []int64{int64(4)} + model.Name = core.StringPtr("my-bare-metal-server-network-attachment-updated") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BareMetalServerNetworkAttachmentPatch + err = vpcv1.UnmarshalBareMetalServerNetworkAttachmentPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBareMetalServerNetworkAttachmentPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BareMetalServerNetworkAttachmentPrototype) + model.InterfaceType = core.StringPtr("pci") + model.Name = core.StringPtr("my-bare-metal-server-network-attachment") + model.VirtualNetworkInterface = nil + model.AllowedVlans = nil + model.AllowToFloat = core.BoolPtr(false) + model.Vlan = core.Int64Ptr(int64(4)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BareMetalServerNetworkAttachmentPrototype + err = vpcv1.UnmarshalBareMetalServerNetworkAttachmentPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface) + model.AllowIPSpoofing = core.BoolPtr(true) + model.AutoDelete = core.BoolPtr(false) + model.EnableInfrastructureNat = core.BoolPtr(true) + model.Ips = nil + model.Name = core.StringPtr("my-virtual-network-interface") + model.PrimaryIP = nil + model.ResourceGroup = nil + model.SecurityGroups = nil + model.Subnet = nil + model.ID = core.StringPtr("0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface + err = vpcv1.UnmarshalBareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBareMetalServerNetworkInterfacePatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BareMetalServerNetworkInterfacePatch) + model.AllowIPSpoofing = core.BoolPtr(true) + model.AllowedVlans = []int64{int64(4)} + model.EnableInfrastructureNat = core.BoolPtr(true) + model.Name = core.StringPtr("my-bare-metal-server-network-interface") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BareMetalServerNetworkInterfacePatch + err = vpcv1.UnmarshalBareMetalServerNetworkInterfacePatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBareMetalServerNetworkInterfacePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BareMetalServerNetworkInterfacePrototype) + model.AllowIPSpoofing = core.BoolPtr(true) + model.EnableInfrastructureNat = core.BoolPtr(true) + model.InterfaceType = core.StringPtr("hipersocket") + model.Name = core.StringPtr("my-bare-metal-server-network-interface") + model.PrimaryIP = nil + model.SecurityGroups = nil + model.Subnet = nil + model.AllowedVlans = nil + model.AllowInterfaceToFloat = core.BoolPtr(false) + model.Vlan = core.Int64Ptr(int64(4)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result interface{} + err = vpcv1.UnmarshalBareMetalServerNetworkInterfacePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + }) + It(`Invoke UnmarshalBareMetalServerPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BareMetalServerPatch) + model.EnableSecureBoot = core.BoolPtr(false) + model.Name = core.StringPtr("my-bare-metal-server") + model.TrustedPlatformModule = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BareMetalServerPatch + err = vpcv1.UnmarshalBareMetalServerPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBareMetalServerPrimaryNetworkAttachmentPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BareMetalServerPrimaryNetworkAttachmentPrototype) + model.InterfaceType = core.StringPtr("pci") + model.Name = core.StringPtr("my-bare-metal-server-network-attachment") + model.VirtualNetworkInterface = nil + model.AllowedVlans = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BareMetalServerPrimaryNetworkAttachmentPrototype + err = vpcv1.UnmarshalBareMetalServerPrimaryNetworkAttachmentPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBareMetalServerPrimaryNetworkInterfacePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BareMetalServerPrimaryNetworkInterfacePrototype) + model.AllowIPSpoofing = core.BoolPtr(true) + model.AllowedVlans = []int64{int64(4)} + model.EnableInfrastructureNat = core.BoolPtr(true) + model.InterfaceType = core.StringPtr("pci") + model.Name = core.StringPtr("my-bare-metal-server-network-interface") + model.PrimaryIP = nil + model.SecurityGroups = nil + model.Subnet = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BareMetalServerPrimaryNetworkInterfacePrototype + err = vpcv1.UnmarshalBareMetalServerPrimaryNetworkInterfacePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBareMetalServerProfileIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BareMetalServerProfileIdentity) + model.Name = core.StringPtr("bx2-metal-192x768") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BareMetalServerProfileIdentity + err = vpcv1.UnmarshalBareMetalServerProfileIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBareMetalServerPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BareMetalServerPrototype) + model.EnableSecureBoot = core.BoolPtr(false) + model.Initialization = nil + model.Name = core.StringPtr("my-bare-metal-server") + model.Profile = nil + model.ResourceGroup = nil + model.TrustedPlatformModule = nil + model.VPC = nil + model.Zone = nil + model.NetworkAttachments = nil + model.PrimaryNetworkAttachment = nil + model.NetworkInterfaces = nil + model.PrimaryNetworkInterface = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BareMetalServerPrototype + err = vpcv1.UnmarshalBareMetalServerPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBareMetalServerTrustedPlatformModulePatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BareMetalServerTrustedPlatformModulePatch) + model.Mode = core.StringPtr("disabled") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BareMetalServerTrustedPlatformModulePatch + err = vpcv1.UnmarshalBareMetalServerTrustedPlatformModulePatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBareMetalServerTrustedPlatformModulePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BareMetalServerTrustedPlatformModulePrototype) + model.Mode = core.StringPtr("disabled") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BareMetalServerTrustedPlatformModulePrototype + err = vpcv1.UnmarshalBareMetalServerTrustedPlatformModulePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalCatalogOfferingIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.CatalogOfferingIdentity) + model.CRN = core.StringPtr("crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.CatalogOfferingIdentity + err = vpcv1.UnmarshalCatalogOfferingIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalCatalogOfferingVersionIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.CatalogOfferingVersionIdentity) + model.CRN = core.StringPtr("crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.CatalogOfferingVersionIdentity + err = vpcv1.UnmarshalCatalogOfferingVersionIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalCertificateInstanceIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.CertificateInstanceIdentity) + model.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.CertificateInstanceIdentity + err = vpcv1.UnmarshalCertificateInstanceIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalCloudObjectStorageBucketIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.CloudObjectStorageBucketIdentity) + model.Name = core.StringPtr("bucket-27200-lwx4cfvcue") + model.CRN = core.StringPtr("crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.CloudObjectStorageBucketIdentity + err = vpcv1.UnmarshalCloudObjectStorageBucketIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalDnsInstanceIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.DnsInstanceIdentity) + model.CRN = core.StringPtr("crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.DnsInstanceIdentity + err = vpcv1.UnmarshalDnsInstanceIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalDnsServerPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.DnsServerPrototype) + model.Address = core.StringPtr("192.168.3.4") + model.ZoneAffinity = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.DnsServerPrototype + err = vpcv1.UnmarshalDnsServerPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalDnsZoneIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.DnsZoneIdentity) + model.ID = core.StringPtr("d66662cc-aa23-4fe1-9987-858487a61f45") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.DnsZoneIdentity + err = vpcv1.UnmarshalDnsZoneIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalDedicatedHostDiskPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.DedicatedHostDiskPatch) + model.Name = core.StringPtr("my-disk-updated") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.DedicatedHostDiskPatch + err = vpcv1.UnmarshalDedicatedHostDiskPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalDedicatedHostGroupIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.DedicatedHostGroupIdentity) + model.ID = core.StringPtr("bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.DedicatedHostGroupIdentity + err = vpcv1.UnmarshalDedicatedHostGroupIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalDedicatedHostGroupPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.DedicatedHostGroupPatch) + model.Name = core.StringPtr("my-host-group") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.DedicatedHostGroupPatch + err = vpcv1.UnmarshalDedicatedHostGroupPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalDedicatedHostGroupPrototypeDedicatedHostByZoneContext successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.DedicatedHostGroupPrototypeDedicatedHostByZoneContext) + model.Name = core.StringPtr("my-host-group") + model.ResourceGroup = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.DedicatedHostGroupPrototypeDedicatedHostByZoneContext + err = vpcv1.UnmarshalDedicatedHostGroupPrototypeDedicatedHostByZoneContext(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalDedicatedHostPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.DedicatedHostPatch) + model.InstancePlacementEnabled = core.BoolPtr(true) + model.Name = core.StringPtr("my-host") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.DedicatedHostPatch + err = vpcv1.UnmarshalDedicatedHostPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalDedicatedHostProfileIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.DedicatedHostProfileIdentity) + model.Name = core.StringPtr("mx2-host-152x1216") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles/mx2-host-152x1216") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.DedicatedHostProfileIdentity + err = vpcv1.UnmarshalDedicatedHostProfileIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalDedicatedHostPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.DedicatedHostPrototype) + model.InstancePlacementEnabled = core.BoolPtr(true) + model.Name = core.StringPtr("my-host") + model.Profile = nil + model.ResourceGroup = nil + model.Group = nil + model.Zone = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.DedicatedHostPrototype + err = vpcv1.UnmarshalDedicatedHostPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalEncryptionKeyIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.EncryptionKeyIdentity) + model.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.EncryptionKeyIdentity + err = vpcv1.UnmarshalEncryptionKeyIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalEndpointGatewayPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.EndpointGatewayPatch) + model.AllowDnsResolutionBinding = core.BoolPtr(true) + model.Name = core.StringPtr("my-endpoint-gateway") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.EndpointGatewayPatch + err = vpcv1.UnmarshalEndpointGatewayPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalEndpointGatewayReservedIP successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.EndpointGatewayReservedIP) + model.ID = core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + model.Address = core.StringPtr("192.168.3.4") + model.AutoDelete = core.BoolPtr(false) + model.Name = core.StringPtr("my-reserved-ip") + model.Subnet = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.EndpointGatewayReservedIP + err = vpcv1.UnmarshalEndpointGatewayReservedIP(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalEndpointGatewayTargetPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.EndpointGatewayTargetPrototype) + model.ResourceType = core.StringPtr("provider_cloud_service") + model.CRN = core.StringPtr("crn:v1:bluemix:public:cloudant:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:3527280b-9327-4411-8020-591092e60353::") + model.Name = core.StringPtr("ibm-ntp-server") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result interface{} + err = vpcv1.UnmarshalEndpointGatewayTargetPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + }) + It(`Invoke UnmarshalFloatingIPPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FloatingIPPatch) + model.Name = core.StringPtr("my-floating-ip") + model.Target = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FloatingIPPatch + err = vpcv1.UnmarshalFloatingIPPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFloatingIPPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FloatingIPPrototype) + model.Name = core.StringPtr("my-floating-ip") + model.ResourceGroup = nil + model.Zone = nil + model.Target = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FloatingIPPrototype + err = vpcv1.UnmarshalFloatingIPPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFloatingIPTargetPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FloatingIPTargetPatch) + model.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FloatingIPTargetPatch + err = vpcv1.UnmarshalFloatingIPTargetPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFloatingIPTargetPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FloatingIPTargetPrototype) + model.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FloatingIPTargetPrototype + err = vpcv1.UnmarshalFloatingIPTargetPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFlowLogCollectorPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FlowLogCollectorPatch) + model.Active = core.BoolPtr(true) + model.Name = core.StringPtr("my-flow-log-collector") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FlowLogCollectorPatch + err = vpcv1.UnmarshalFlowLogCollectorPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFlowLogCollectorTargetPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FlowLogCollectorTargetPrototype) + model.ID = core.StringPtr("0717-10c02d81-0ecb-4dc5-897d-28392913b81e") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FlowLogCollectorTargetPrototype + err = vpcv1.UnmarshalFlowLogCollectorTargetPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalIkePolicyPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.IkePolicyPatch) + model.AuthenticationAlgorithm = core.StringPtr("sha256") + model.DhGroup = core.Int64Ptr(int64(14)) + model.EncryptionAlgorithm = core.StringPtr("aes128") + model.IkeVersion = core.Int64Ptr(int64(1)) + model.KeyLifetime = core.Int64Ptr(int64(28800)) + model.Name = core.StringPtr("my-ike-policy") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.IkePolicyPatch + err = vpcv1.UnmarshalIkePolicyPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalIP successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.IP) + model.Address = core.StringPtr("192.168.3.4") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.IP + err = vpcv1.UnmarshalIP(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalIPsecPolicyPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.IPsecPolicyPatch) + model.AuthenticationAlgorithm = core.StringPtr("disabled") + model.EncryptionAlgorithm = core.StringPtr("aes128") + model.KeyLifetime = core.Int64Ptr(int64(3600)) + model.Name = core.StringPtr("my-ipsec-policy") + model.Pfs = core.StringPtr("disabled") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.IPsecPolicyPatch + err = vpcv1.UnmarshalIPsecPolicyPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalImageExportJobPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ImageExportJobPatch) + model.Name = core.StringPtr("my-image-export") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ImageExportJobPatch + err = vpcv1.UnmarshalImageExportJobPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalImageFilePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ImageFilePrototype) + model.Href = core.StringPtr("cos://us-south/custom-image-vpc-bucket/customImage-0.vhd") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ImageFilePrototype + err = vpcv1.UnmarshalImageFilePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalImageIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ImageIdentity) + model.ID = core.StringPtr("r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ImageIdentity + err = vpcv1.UnmarshalImageIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalImagePatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ImagePatch) + model.DeprecationAt = CreateMockDateTime("2019-01-01T12:00:00.000Z") + model.Name = core.StringPtr("my-image") + model.ObsolescenceAt = CreateMockDateTime("2019-01-01T12:00:00.000Z") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ImagePatch + err = vpcv1.UnmarshalImagePatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalImagePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ImagePrototype) + model.DeprecationAt = CreateMockDateTime("2019-01-01T12:00:00.000Z") + model.Name = core.StringPtr("my-image") + model.ObsolescenceAt = CreateMockDateTime("2019-01-01T12:00:00.000Z") + model.ResourceGroup = nil + model.EncryptedDataKey = core.StringPtr("testString") + model.EncryptionKey = nil + model.File = nil + model.OperatingSystem = nil + model.SourceVolume = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ImagePrototype + err = vpcv1.UnmarshalImagePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceAvailabilityPolicyPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceAvailabilityPolicyPatch) + model.HostFailure = core.StringPtr("restart") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceAvailabilityPolicyPatch + err = vpcv1.UnmarshalInstanceAvailabilityPolicyPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceAvailabilityPolicyPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceAvailabilityPolicyPrototype) + model.HostFailure = core.StringPtr("restart") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceAvailabilityPolicyPrototype + err = vpcv1.UnmarshalInstanceAvailabilityPolicyPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceCatalogOfferingPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceCatalogOfferingPrototype) + model.Offering = nil + model.Version = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceCatalogOfferingPrototype + err = vpcv1.UnmarshalInstanceCatalogOfferingPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceDefaultTrustedProfilePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceDefaultTrustedProfilePrototype) + model.AutoLink = core.BoolPtr(false) + model.Target = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceDefaultTrustedProfilePrototype + err = vpcv1.UnmarshalInstanceDefaultTrustedProfilePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceDiskPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceDiskPatch) + model.Name = core.StringPtr("my-instance-disk-updated") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceDiskPatch + err = vpcv1.UnmarshalInstanceDiskPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceGroupManagerActionGroupPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceGroupManagerActionGroupPatch) + model.MembershipCount = core.Int64Ptr(int64(10)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceGroupManagerActionGroupPatch + err = vpcv1.UnmarshalInstanceGroupManagerActionGroupPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceGroupManagerActionManagerPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceGroupManagerActionManagerPatch) + model.MaxMembershipCount = core.Int64Ptr(int64(10)) + model.MinMembershipCount = core.Int64Ptr(int64(10)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceGroupManagerActionManagerPatch + err = vpcv1.UnmarshalInstanceGroupManagerActionManagerPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceGroupManagerActionPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceGroupManagerActionPatch) + model.CronSpec = core.StringPtr("30 */2 * * 1-5") + model.Group = nil + model.Manager = nil + model.Name = core.StringPtr("my-instance-group-manager-action") + model.RunAt = CreateMockDateTime("2019-01-01T12:00:00.000Z") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceGroupManagerActionPatch + err = vpcv1.UnmarshalInstanceGroupManagerActionPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceGroupManagerActionPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceGroupManagerActionPrototype) + model.Name = core.StringPtr("my-instance-group-manager-action") + model.RunAt = CreateMockDateTime("2019-01-01T12:00:00.000Z") + model.Group = nil + model.Manager = nil + model.CronSpec = core.StringPtr("30 */2 * * 1-5") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceGroupManagerActionPrototype + err = vpcv1.UnmarshalInstanceGroupManagerActionPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceGroupManagerPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceGroupManagerPatch) + model.AggregationWindow = core.Int64Ptr(int64(120)) + model.Cooldown = core.Int64Ptr(int64(210)) + model.ManagementEnabled = core.BoolPtr(true) + model.MaxMembershipCount = core.Int64Ptr(int64(10)) + model.MinMembershipCount = core.Int64Ptr(int64(10)) + model.Name = core.StringPtr("my-instance-group-manager") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceGroupManagerPatch + err = vpcv1.UnmarshalInstanceGroupManagerPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceGroupManagerPolicyPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceGroupManagerPolicyPatch) + model.MetricType = core.StringPtr("cpu") + model.MetricValue = core.Int64Ptr(int64(38)) + model.Name = core.StringPtr("my-instance-group-manager-policy") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceGroupManagerPolicyPatch + err = vpcv1.UnmarshalInstanceGroupManagerPolicyPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceGroupManagerPolicyPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceGroupManagerPolicyPrototype) + model.Name = core.StringPtr("my-instance-group-manager-policy") + model.MetricType = core.StringPtr("cpu") + model.MetricValue = core.Int64Ptr(int64(38)) + model.PolicyType = core.StringPtr("target") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceGroupManagerPolicyPrototype + err = vpcv1.UnmarshalInstanceGroupManagerPolicyPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceGroupManagerPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceGroupManagerPrototype) + model.ManagementEnabled = core.BoolPtr(true) + model.Name = core.StringPtr("my-instance-group-manager") + model.AggregationWindow = core.Int64Ptr(int64(120)) + model.Cooldown = core.Int64Ptr(int64(210)) + model.ManagerType = core.StringPtr("autoscale") + model.MaxMembershipCount = core.Int64Ptr(int64(10)) + model.MinMembershipCount = core.Int64Ptr(int64(10)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceGroupManagerPrototype + err = vpcv1.UnmarshalInstanceGroupManagerPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceGroupManagerScheduledActionGroupPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceGroupManagerScheduledActionGroupPrototype) + model.MembershipCount = core.Int64Ptr(int64(10)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceGroupManagerScheduledActionGroupPrototype + err = vpcv1.UnmarshalInstanceGroupManagerScheduledActionGroupPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceGroupManagerScheduledActionManagerPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceGroupManagerScheduledActionManagerPrototype) + model.MaxMembershipCount = core.Int64Ptr(int64(10)) + model.MinMembershipCount = core.Int64Ptr(int64(10)) + model.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceGroupManagerScheduledActionManagerPrototype + err = vpcv1.UnmarshalInstanceGroupManagerScheduledActionManagerPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceGroupMembershipPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceGroupMembershipPatch) + model.Name = core.StringPtr("my-instance-group-membership") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceGroupMembershipPatch + err = vpcv1.UnmarshalInstanceGroupMembershipPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceGroupPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceGroupPatch) + model.ApplicationPort = core.Int64Ptr(int64(22)) + model.InstanceTemplate = nil + model.LoadBalancer = nil + model.LoadBalancerPool = nil + model.MembershipCount = core.Int64Ptr(int64(10)) + model.Name = core.StringPtr("my-instance-group") + model.Subnets = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceGroupPatch + err = vpcv1.UnmarshalInstanceGroupPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceMetadataServicePatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceMetadataServicePatch) + model.Enabled = core.BoolPtr(true) + model.Protocol = core.StringPtr("http") + model.ResponseHopLimit = core.Int64Ptr(int64(1)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceMetadataServicePatch + err = vpcv1.UnmarshalInstanceMetadataServicePatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceMetadataServicePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceMetadataServicePrototype) + model.Enabled = core.BoolPtr(false) + model.Protocol = core.StringPtr("https") + model.ResponseHopLimit = core.Int64Ptr(int64(2)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceMetadataServicePrototype + err = vpcv1.UnmarshalInstanceMetadataServicePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceNetworkAttachmentPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceNetworkAttachmentPatch) + model.Name = core.StringPtr("my-instance-network-attachment-updated") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceNetworkAttachmentPatch + err = vpcv1.UnmarshalInstanceNetworkAttachmentPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceNetworkAttachmentPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceNetworkAttachmentPrototype) + model.Name = core.StringPtr("my-instance-network-attachment") + model.VirtualNetworkInterface = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceNetworkAttachmentPrototype + err = vpcv1.UnmarshalInstanceNetworkAttachmentPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceNetworkAttachmentPrototypeVirtualNetworkInterface successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceNetworkAttachmentPrototypeVirtualNetworkInterface) + model.AllowIPSpoofing = core.BoolPtr(true) + model.AutoDelete = core.BoolPtr(false) + model.EnableInfrastructureNat = core.BoolPtr(true) + model.Ips = nil + model.Name = core.StringPtr("my-virtual-network-interface") + model.PrimaryIP = nil + model.ResourceGroup = nil + model.SecurityGroups = nil + model.Subnet = nil + model.ID = core.StringPtr("0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceNetworkAttachmentPrototypeVirtualNetworkInterface + err = vpcv1.UnmarshalInstanceNetworkAttachmentPrototypeVirtualNetworkInterface(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePatch) + model.AvailabilityPolicy = nil + model.MetadataService = nil + model.Name = core.StringPtr("my-instance") + model.PlacementTarget = nil + model.Profile = nil + model.ReservationAffinity = nil + model.TotalVolumeBandwidth = core.Int64Ptr(int64(500)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePatch + err = vpcv1.UnmarshalInstancePatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePatchProfile successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePatchProfile) + model.Name = core.StringPtr("bx2-4x16") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePatchProfile + err = vpcv1.UnmarshalInstancePatchProfile(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePlacementTargetPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePlacementTargetPatch) + model.ID = core.StringPtr("0717-1e09281b-f177-46fb-baf1-bc152b2e391a") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePlacementTargetPatch + err = vpcv1.UnmarshalInstancePlacementTargetPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePlacementTargetPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePlacementTargetPrototype) + model.ID = core.StringPtr("0717-1e09281b-f177-46fb-baf1-bc152b2e391a") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePlacementTargetPrototype + err = vpcv1.UnmarshalInstancePlacementTargetPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceProfileIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceProfileIdentity) + model.Name = core.StringPtr("bx2-4x16") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceProfileIdentity + err = vpcv1.UnmarshalInstanceProfileIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePrototype) + model.AvailabilityPolicy = nil + model.DefaultTrustedProfile = nil + model.Keys = nil + model.MetadataService = nil + model.Name = core.StringPtr("my-instance") + model.PlacementTarget = nil + model.Profile = nil + model.ReservationAffinity = nil + model.ResourceGroup = nil + model.TotalVolumeBandwidth = core.Int64Ptr(int64(500)) + model.UserData = core.StringPtr("testString") + model.VolumeAttachments = nil + model.VPC = nil + model.BootVolumeAttachment = nil + model.Image = nil + model.Zone = nil + model.NetworkAttachments = nil + model.PrimaryNetworkAttachment = nil + model.NetworkInterfaces = nil + model.PrimaryNetworkInterface = nil + model.CatalogOffering = nil + model.SourceTemplate = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePrototype + err = vpcv1.UnmarshalInstancePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceReservationAffinityPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceReservationAffinityPatch) + model.Policy = core.StringPtr("disabled") + model.Pool = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceReservationAffinityPatch + err = vpcv1.UnmarshalInstanceReservationAffinityPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceReservationAffinityPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceReservationAffinityPrototype) + model.Policy = core.StringPtr("disabled") + model.Pool = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceReservationAffinityPrototype + err = vpcv1.UnmarshalInstanceReservationAffinityPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceTemplateIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceTemplateIdentity) + model.ID = core.StringPtr("a6b1a881-2ce8-41a3-80fc-36316a73f803") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceTemplateIdentity + err = vpcv1.UnmarshalInstanceTemplateIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceTemplatePatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceTemplatePatch) + model.Name = core.StringPtr("my-instance-template") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceTemplatePatch + err = vpcv1.UnmarshalInstanceTemplatePatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceTemplatePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceTemplatePrototype) + model.AvailabilityPolicy = nil + model.DefaultTrustedProfile = nil + model.Keys = nil + model.MetadataService = nil + model.Name = core.StringPtr("my-instance") + model.PlacementTarget = nil + model.Profile = nil + model.ReservationAffinity = nil + model.ResourceGroup = nil + model.TotalVolumeBandwidth = core.Int64Ptr(int64(500)) + model.UserData = core.StringPtr("testString") + model.VolumeAttachments = nil + model.VPC = nil + model.BootVolumeAttachment = nil + model.Image = nil + model.Zone = nil + model.NetworkAttachments = nil + model.PrimaryNetworkAttachment = nil + model.NetworkInterfaces = nil + model.PrimaryNetworkInterface = nil + model.CatalogOffering = nil + model.SourceTemplate = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceTemplatePrototype + err = vpcv1.UnmarshalInstanceTemplatePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalKeyIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.KeyIdentity) + model.ID = core.StringPtr("a6b1a881-2ce8-41a3-80fc-36316a73f803") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:a6b1a881-2ce8-41a3-80fc-36316a73f803") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803") + model.Fingerprint = core.StringPtr("SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.KeyIdentity + err = vpcv1.UnmarshalKeyIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalKeyPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.KeyPatch) + model.Name = core.StringPtr("my-key") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.KeyPatch + err = vpcv1.UnmarshalKeyPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLegacyCloudObjectStorageBucketIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LegacyCloudObjectStorageBucketIdentity) + model.Name = core.StringPtr("bucket-27200-lwx4cfvcue") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LegacyCloudObjectStorageBucketIdentity + err = vpcv1.UnmarshalLegacyCloudObjectStorageBucketIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerDnsPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerDnsPatch) + model.Instance = nil + model.Zone = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerDnsPatch + err = vpcv1.UnmarshalLoadBalancerDnsPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerDnsPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerDnsPrototype) + model.Instance = nil + model.Zone = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerDnsPrototype + err = vpcv1.UnmarshalLoadBalancerDnsPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerIdentity) + model.ID = core.StringPtr("dd754295-e9e0-4c9d-bf6c-58fbc59e5727") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerIdentity + err = vpcv1.UnmarshalLoadBalancerIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerListenerDefaultPoolPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerListenerDefaultPoolPatch) + model.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerListenerDefaultPoolPatch + err = vpcv1.UnmarshalLoadBalancerListenerDefaultPoolPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerListenerHTTPSRedirectPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerListenerHTTPSRedirectPatch) + model.HTTPStatusCode = core.Int64Ptr(int64(301)) + model.Listener = nil + model.URI = core.StringPtr("/example?doc=get") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerListenerHTTPSRedirectPatch + err = vpcv1.UnmarshalLoadBalancerListenerHTTPSRedirectPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerListenerHTTPSRedirectPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerListenerHTTPSRedirectPrototype) + model.HTTPStatusCode = core.Int64Ptr(int64(301)) + model.Listener = nil + model.URI = core.StringPtr("/example?doc=get") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerListenerHTTPSRedirectPrototype + err = vpcv1.UnmarshalLoadBalancerListenerHTTPSRedirectPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerListenerIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerListenerIdentity) + model.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerListenerIdentity + err = vpcv1.UnmarshalLoadBalancerListenerIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerListenerPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerListenerPatch) + model.AcceptProxyProtocol = core.BoolPtr(true) + model.CertificateInstance = nil + model.ConnectionLimit = core.Int64Ptr(int64(2000)) + model.DefaultPool = nil + model.HTTPSRedirect = nil + model.IdleConnectionTimeout = core.Int64Ptr(int64(100)) + model.Port = core.Int64Ptr(int64(443)) + model.PortMax = core.Int64Ptr(int64(499)) + model.PortMin = core.Int64Ptr(int64(443)) + model.Protocol = core.StringPtr("http") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerListenerPatch + err = vpcv1.UnmarshalLoadBalancerListenerPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerListenerPolicyPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerListenerPolicyPatch) + model.Name = core.StringPtr("my-policy") + model.Priority = core.Int64Ptr(int64(5)) + model.Target = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerListenerPolicyPatch + err = vpcv1.UnmarshalLoadBalancerListenerPolicyPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerListenerPolicyPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerListenerPolicyPrototype) + model.Action = core.StringPtr("forward") + model.Name = core.StringPtr("my-policy") + model.Priority = core.Int64Ptr(int64(5)) + model.Rules = nil + model.Target = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerListenerPolicyPrototype + err = vpcv1.UnmarshalLoadBalancerListenerPolicyPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerListenerPolicyRulePatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerListenerPolicyRulePatch) + model.Condition = core.StringPtr("contains") + model.Field = core.StringPtr("MY-APP-HEADER") + model.Type = core.StringPtr("body") + model.Value = core.StringPtr("testString") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerListenerPolicyRulePatch + err = vpcv1.UnmarshalLoadBalancerListenerPolicyRulePatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerListenerPolicyRulePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerListenerPolicyRulePrototype) + model.Condition = core.StringPtr("contains") + model.Field = core.StringPtr("MY-APP-HEADER") + model.Type = core.StringPtr("body") + model.Value = core.StringPtr("testString") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerListenerPolicyRulePrototype + err = vpcv1.UnmarshalLoadBalancerListenerPolicyRulePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerListenerPolicyTargetPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerListenerPolicyTargetPatch) + model.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004") + model.HTTPStatusCode = core.Int64Ptr(int64(301)) + model.Listener = nil + model.URI = core.StringPtr("/example?doc=get") + model.URL = core.StringPtr("https://www.example.com") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerListenerPolicyTargetPatch + err = vpcv1.UnmarshalLoadBalancerListenerPolicyTargetPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerListenerPolicyTargetPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerListenerPolicyTargetPrototype) + model.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004") + model.HTTPStatusCode = core.Int64Ptr(int64(301)) + model.Listener = nil + model.URI = core.StringPtr("/example?doc=get") + model.URL = core.StringPtr("https://www.example.com") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerListenerPolicyTargetPrototype + err = vpcv1.UnmarshalLoadBalancerListenerPolicyTargetPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerListenerPrototypeLoadBalancerContext successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerListenerPrototypeLoadBalancerContext) + model.AcceptProxyProtocol = core.BoolPtr(true) + model.CertificateInstance = nil + model.ConnectionLimit = core.Int64Ptr(int64(2000)) + model.DefaultPool = nil + model.HTTPSRedirect = nil + model.IdleConnectionTimeout = core.Int64Ptr(int64(100)) + model.Port = core.Int64Ptr(int64(443)) + model.PortMax = core.Int64Ptr(int64(499)) + model.PortMin = core.Int64Ptr(int64(443)) + model.Protocol = core.StringPtr("http") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerListenerPrototypeLoadBalancerContext + err = vpcv1.UnmarshalLoadBalancerListenerPrototypeLoadBalancerContext(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerLoggingDatapathPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerLoggingDatapathPatch) + model.Active = core.BoolPtr(true) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerLoggingDatapathPatch + err = vpcv1.UnmarshalLoadBalancerLoggingDatapathPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerLoggingDatapathPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerLoggingDatapathPrototype) + model.Active = core.BoolPtr(true) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerLoggingDatapathPrototype + err = vpcv1.UnmarshalLoadBalancerLoggingDatapathPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerLoggingPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerLoggingPatch) + model.Datapath = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerLoggingPatch + err = vpcv1.UnmarshalLoadBalancerLoggingPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerLoggingPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerLoggingPrototype) + model.Datapath = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerLoggingPrototype + err = vpcv1.UnmarshalLoadBalancerLoggingPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerPatch) + model.Dns = nil + model.Logging = nil + model.Name = core.StringPtr("my-load-balancer") + model.Subnets = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerPatch + err = vpcv1.UnmarshalLoadBalancerPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerPoolHealthMonitorPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerPoolHealthMonitorPatch) + model.Delay = core.Int64Ptr(int64(5)) + model.MaxRetries = core.Int64Ptr(int64(2)) + model.Port = core.Int64Ptr(int64(22)) + model.Timeout = core.Int64Ptr(int64(2)) + model.Type = core.StringPtr("http") + model.URLPath = core.StringPtr("/") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerPoolHealthMonitorPatch + err = vpcv1.UnmarshalLoadBalancerPoolHealthMonitorPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerPoolHealthMonitorPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerPoolHealthMonitorPrototype) + model.Delay = core.Int64Ptr(int64(5)) + model.MaxRetries = core.Int64Ptr(int64(2)) + model.Port = core.Int64Ptr(int64(22)) + model.Timeout = core.Int64Ptr(int64(2)) + model.Type = core.StringPtr("http") + model.URLPath = core.StringPtr("/") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerPoolHealthMonitorPrototype + err = vpcv1.UnmarshalLoadBalancerPoolHealthMonitorPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerPoolIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerPoolIdentity) + model.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerPoolIdentity + err = vpcv1.UnmarshalLoadBalancerPoolIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerPoolIdentityByName successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerPoolIdentityByName) + model.Name = core.StringPtr("my-load-balancer-pool") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerPoolIdentityByName + err = vpcv1.UnmarshalLoadBalancerPoolIdentityByName(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerPoolMemberPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerPoolMemberPatch) + model.Port = core.Int64Ptr(int64(80)) + model.Target = nil + model.Weight = core.Int64Ptr(int64(50)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerPoolMemberPatch + err = vpcv1.UnmarshalLoadBalancerPoolMemberPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerPoolMemberPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerPoolMemberPrototype) + model.Port = core.Int64Ptr(int64(80)) + model.Target = nil + model.Weight = core.Int64Ptr(int64(50)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerPoolMemberPrototype + err = vpcv1.UnmarshalLoadBalancerPoolMemberPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerPoolMemberTargetPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerPoolMemberTargetPrototype) + model.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a") + model.Address = core.StringPtr("192.168.3.4") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerPoolMemberTargetPrototype + err = vpcv1.UnmarshalLoadBalancerPoolMemberTargetPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerPoolPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerPoolPatch) + model.Algorithm = core.StringPtr("least_connections") + model.HealthMonitor = nil + model.Name = core.StringPtr("my-load-balancer-pool") + model.Protocol = core.StringPtr("http") + model.ProxyProtocol = core.StringPtr("disabled") + model.SessionPersistence = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerPoolPatch + err = vpcv1.UnmarshalLoadBalancerPoolPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerPoolPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerPoolPrototype) + model.Algorithm = core.StringPtr("least_connections") + model.HealthMonitor = nil + model.Members = nil + model.Name = core.StringPtr("my-load-balancer-pool") + model.Protocol = core.StringPtr("http") + model.ProxyProtocol = core.StringPtr("disabled") + model.SessionPersistence = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerPoolPrototype + err = vpcv1.UnmarshalLoadBalancerPoolPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerPoolSessionPersistencePatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerPoolSessionPersistencePatch) + model.CookieName = core.StringPtr("my-cookie-name") + model.Type = core.StringPtr("app_cookie") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerPoolSessionPersistencePatch + err = vpcv1.UnmarshalLoadBalancerPoolSessionPersistencePatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerPoolSessionPersistencePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerPoolSessionPersistencePrototype) + model.CookieName = core.StringPtr("my-cookie-name") + model.Type = core.StringPtr("app_cookie") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerPoolSessionPersistencePrototype + err = vpcv1.UnmarshalLoadBalancerPoolSessionPersistencePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerProfileIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerProfileIdentity) + model.Name = core.StringPtr("network-fixed") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerProfileIdentity + err = vpcv1.UnmarshalLoadBalancerProfileIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalNetworkACLIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.NetworkACLIdentity) + model.ID = core.StringPtr("r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.NetworkACLIdentity + err = vpcv1.UnmarshalNetworkACLIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalNetworkACLPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.NetworkACLPatch) + model.Name = core.StringPtr("my-network-acl") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.NetworkACLPatch + err = vpcv1.UnmarshalNetworkACLPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalNetworkACLPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.NetworkACLPrototype) + model.Name = core.StringPtr("my-network-acl") + model.ResourceGroup = nil + model.VPC = nil + model.Rules = nil + model.SourceNetworkACL = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.NetworkACLPrototype + err = vpcv1.UnmarshalNetworkACLPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalNetworkACLRuleBeforePatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.NetworkACLRuleBeforePatch) + model.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.NetworkACLRuleBeforePatch + err = vpcv1.UnmarshalNetworkACLRuleBeforePatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalNetworkACLRuleBeforePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.NetworkACLRuleBeforePrototype) + model.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.NetworkACLRuleBeforePrototype + err = vpcv1.UnmarshalNetworkACLRuleBeforePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalNetworkACLRulePatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.NetworkACLRulePatch) + model.Action = core.StringPtr("allow") + model.Before = nil + model.Code = core.Int64Ptr(int64(0)) + model.Destination = core.StringPtr("192.168.3.2/32") + model.DestinationPortMax = core.Int64Ptr(int64(22)) + model.DestinationPortMin = core.Int64Ptr(int64(22)) + model.Direction = core.StringPtr("inbound") + model.Name = core.StringPtr("my-rule-1") + model.Protocol = core.StringPtr("tcp") + model.Source = core.StringPtr("192.168.3.2/32") + model.SourcePortMax = core.Int64Ptr(int64(65535)) + model.SourcePortMin = core.Int64Ptr(int64(49152)) + model.Type = core.Int64Ptr(int64(8)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.NetworkACLRulePatch + err = vpcv1.UnmarshalNetworkACLRulePatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalNetworkACLRulePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.NetworkACLRulePrototype) + model.Action = core.StringPtr("allow") + model.Before = nil + model.Destination = core.StringPtr("192.168.3.2/32") + model.Direction = core.StringPtr("inbound") + model.IPVersion = core.StringPtr("ipv4") + model.Name = core.StringPtr("my-rule-2") + model.Protocol = core.StringPtr("tcp") + model.Source = core.StringPtr("192.168.3.2/32") + model.DestinationPortMax = core.Int64Ptr(int64(22)) + model.DestinationPortMin = core.Int64Ptr(int64(22)) + model.SourcePortMax = core.Int64Ptr(int64(65535)) + model.SourcePortMin = core.Int64Ptr(int64(49152)) + model.Code = core.Int64Ptr(int64(0)) + model.Type = core.Int64Ptr(int64(8)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result interface{} + err = vpcv1.UnmarshalNetworkACLRulePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + }) + It(`Invoke UnmarshalNetworkACLRulePrototypeNetworkACLContext successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.NetworkACLRulePrototypeNetworkACLContext) + model.Action = core.StringPtr("allow") + model.Destination = core.StringPtr("192.168.3.2/32") + model.Direction = core.StringPtr("inbound") + model.IPVersion = core.StringPtr("ipv4") + model.Name = core.StringPtr("my-rule-2") + model.Protocol = core.StringPtr("tcp") + model.Source = core.StringPtr("192.168.3.2/32") + model.DestinationPortMax = core.Int64Ptr(int64(22)) + model.DestinationPortMin = core.Int64Ptr(int64(22)) + model.SourcePortMax = core.Int64Ptr(int64(65535)) + model.SourcePortMin = core.Int64Ptr(int64(49152)) + model.Code = core.Int64Ptr(int64(0)) + model.Type = core.Int64Ptr(int64(8)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result interface{} + err = vpcv1.UnmarshalNetworkACLRulePrototypeNetworkACLContext(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + }) + It(`Invoke UnmarshalNetworkInterfaceIPPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.NetworkInterfaceIPPrototype) + model.ID = core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + model.Address = core.StringPtr("192.168.3.4") + model.AutoDelete = core.BoolPtr(false) + model.Name = core.StringPtr("my-reserved-ip") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.NetworkInterfaceIPPrototype + err = vpcv1.UnmarshalNetworkInterfaceIPPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalNetworkInterfacePatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.NetworkInterfacePatch) + model.AllowIPSpoofing = core.BoolPtr(true) + model.Name = core.StringPtr("my-instance-network-interface") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.NetworkInterfacePatch + err = vpcv1.UnmarshalNetworkInterfacePatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalNetworkInterfacePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.NetworkInterfacePrototype) + model.AllowIPSpoofing = core.BoolPtr(true) + model.Name = core.StringPtr("my-instance-network-interface") + model.PrimaryIP = nil + model.SecurityGroups = nil + model.Subnet = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.NetworkInterfacePrototype + err = vpcv1.UnmarshalNetworkInterfacePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalOperatingSystemIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.OperatingSystemIdentity) + model.Name = core.StringPtr("ubuntu-16-amd64") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.OperatingSystemIdentity + err = vpcv1.UnmarshalOperatingSystemIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalPlacementGroupPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.PlacementGroupPatch) + model.Name = core.StringPtr("my-placement-group") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.PlacementGroupPatch + err = vpcv1.UnmarshalPlacementGroupPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalPublicGatewayFloatingIPPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.PublicGatewayFloatingIPPrototype) + model.ID = core.StringPtr("39300233-9995-4806-89a5-3c1b6eb88689") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689") + model.Address = core.StringPtr("203.0.113.1") + model.Name = core.StringPtr("my-floating-ip") + model.ResourceGroup = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.PublicGatewayFloatingIPPrototype + err = vpcv1.UnmarshalPublicGatewayFloatingIPPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalPublicGatewayIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.PublicGatewayIdentity) + model.ID = core.StringPtr("dc5431ef-1fc6-4861-adc9-a59d077d1241") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.PublicGatewayIdentity + err = vpcv1.UnmarshalPublicGatewayIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalPublicGatewayPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.PublicGatewayPatch) + model.Name = core.StringPtr("my-public-gateway") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.PublicGatewayPatch + err = vpcv1.UnmarshalPublicGatewayPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalRegionIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.RegionIdentity) + model.Name = core.StringPtr("us-south") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/regions/us-south") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.RegionIdentity + err = vpcv1.UnmarshalRegionIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalReservationCapacityPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ReservationCapacityPatch) + model.Total = core.Int64Ptr(int64(10)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ReservationCapacityPatch + err = vpcv1.UnmarshalReservationCapacityPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalReservationCapacityPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ReservationCapacityPrototype) + model.Total = core.Int64Ptr(int64(10)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ReservationCapacityPrototype + err = vpcv1.UnmarshalReservationCapacityPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalReservationCommittedUsePatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ReservationCommittedUsePatch) + model.ExpirationPolicy = core.StringPtr("release") + model.Term = core.StringPtr("testString") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ReservationCommittedUsePatch + err = vpcv1.UnmarshalReservationCommittedUsePatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalReservationCommittedUsePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ReservationCommittedUsePrototype) + model.ExpirationPolicy = core.StringPtr("release") + model.Term = core.StringPtr("testString") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ReservationCommittedUsePrototype + err = vpcv1.UnmarshalReservationCommittedUsePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalReservationIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ReservationIdentity) + model.ID = core.StringPtr("7187-ba49df72-37b8-43ac-98da-f8e029de0e63") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ReservationIdentity + err = vpcv1.UnmarshalReservationIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalReservationPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ReservationPatch) + model.Capacity = nil + model.CommittedUse = nil + model.Name = core.StringPtr("my-reservation") + model.Profile = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ReservationPatch + err = vpcv1.UnmarshalReservationPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalReservationProfilePatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ReservationProfilePatch) + model.Name = core.StringPtr("bx2-4x16") + model.ResourceType = core.StringPtr("instance_profile") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ReservationProfilePatch + err = vpcv1.UnmarshalReservationProfilePatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalReservationProfilePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ReservationProfilePrototype) + model.Name = core.StringPtr("bx2-4x16") + model.ResourceType = core.StringPtr("instance_profile") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ReservationProfilePrototype + err = vpcv1.UnmarshalReservationProfilePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalReservedIPPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ReservedIPPatch) + model.AutoDelete = core.BoolPtr(false) + model.Name = core.StringPtr("my-reserved-ip") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ReservedIPPatch + err = vpcv1.UnmarshalReservedIPPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalReservedIPTargetPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ReservedIPTargetPrototype) + model.ID = core.StringPtr("r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ReservedIPTargetPrototype + err = vpcv1.UnmarshalReservedIPTargetPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalResourceFilter successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ResourceFilter) + model.ResourceType = core.StringPtr("vpn_server") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ResourceFilter + err = vpcv1.UnmarshalResourceFilter(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalResourceGroupIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ResourceGroupIdentity) + model.ID = core.StringPtr("fee82deba12e4c0fb69c3b09d1f12345") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ResourceGroupIdentity + err = vpcv1.UnmarshalResourceGroupIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalRouteNextHopPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.RouteNextHopPatch) + model.Address = core.StringPtr("0.0.0.0") + model.ID = core.StringPtr("a10a5771-dc23-442c-8460-c3601d8542f7") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.RouteNextHopPatch + err = vpcv1.UnmarshalRouteNextHopPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalRoutePatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.RoutePatch) + model.Advertise = core.BoolPtr(true) + model.Name = core.StringPtr("my-route-2") + model.NextHop = nil + model.Priority = core.Int64Ptr(int64(1)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.RoutePatch + err = vpcv1.UnmarshalRoutePatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalRoutePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.RoutePrototype) + model.Action = core.StringPtr("deliver") + model.Advertise = core.BoolPtr(false) + model.Destination = core.StringPtr("192.168.3.0/24") + model.Name = core.StringPtr("my-route-1") + model.NextHop = nil + model.Priority = core.Int64Ptr(int64(1)) + model.Zone = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.RoutePrototype + err = vpcv1.UnmarshalRoutePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalRoutePrototypeNextHop successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.RoutePrototypeNextHop) + model.Address = core.StringPtr("0.0.0.0") + model.ID = core.StringPtr("a10a5771-dc23-442c-8460-c3601d8542f7") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.RoutePrototypeNextHop + err = vpcv1.UnmarshalRoutePrototypeNextHop(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalRoutingTableIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.RoutingTableIdentity) + model.ID = core.StringPtr("r006-6885e83f-03b2-4603-8a86-db2a0f55c840") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.RoutingTableIdentity + err = vpcv1.UnmarshalRoutingTableIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalRoutingTablePatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.RoutingTablePatch) + model.AcceptRoutesFrom = nil + model.AdvertiseRoutesTo = []string{"transit_gateway"} + model.Name = core.StringPtr("my-routing-table-2") + model.RouteDirectLinkIngress = core.BoolPtr(true) + model.RouteInternetIngress = core.BoolPtr(true) + model.RouteTransitGatewayIngress = core.BoolPtr(true) + model.RouteVPCZoneIngress = core.BoolPtr(true) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.RoutingTablePatch + err = vpcv1.UnmarshalRoutingTablePatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSecurityGroupIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SecurityGroupIdentity) + model.ID = core.StringPtr("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SecurityGroupIdentity + err = vpcv1.UnmarshalSecurityGroupIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSecurityGroupPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SecurityGroupPatch) + model.Name = core.StringPtr("my-security-group") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SecurityGroupPatch + err = vpcv1.UnmarshalSecurityGroupPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSecurityGroupRuleLocalPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SecurityGroupRuleLocalPatch) + model.Address = core.StringPtr("192.168.3.4") + model.CIDRBlock = core.StringPtr("192.168.3.0/24") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SecurityGroupRuleLocalPatch + err = vpcv1.UnmarshalSecurityGroupRuleLocalPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSecurityGroupRuleLocalPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SecurityGroupRuleLocalPrototype) + model.Address = core.StringPtr("192.168.3.4") + model.CIDRBlock = core.StringPtr("192.168.3.0/24") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SecurityGroupRuleLocalPrototype + err = vpcv1.UnmarshalSecurityGroupRuleLocalPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSecurityGroupRulePatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SecurityGroupRulePatch) + model.Code = core.Int64Ptr(int64(0)) + model.Direction = core.StringPtr("inbound") + model.IPVersion = core.StringPtr("ipv4") + model.Local = nil + model.PortMax = core.Int64Ptr(int64(22)) + model.PortMin = core.Int64Ptr(int64(22)) + model.Remote = nil + model.Type = core.Int64Ptr(int64(8)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SecurityGroupRulePatch + err = vpcv1.UnmarshalSecurityGroupRulePatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSecurityGroupRulePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SecurityGroupRulePrototype) + model.Direction = core.StringPtr("inbound") + model.IPVersion = core.StringPtr("ipv4") + model.Local = nil + model.Protocol = core.StringPtr("tcp") + model.Remote = nil + model.Code = core.Int64Ptr(int64(0)) + model.Type = core.Int64Ptr(int64(8)) + model.PortMax = core.Int64Ptr(int64(22)) + model.PortMin = core.Int64Ptr(int64(22)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result interface{} + err = vpcv1.UnmarshalSecurityGroupRulePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + }) + It(`Invoke UnmarshalSecurityGroupRuleRemotePatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SecurityGroupRuleRemotePatch) + model.Address = core.StringPtr("192.168.3.4") + model.CIDRBlock = core.StringPtr("192.168.3.0/24") + model.ID = core.StringPtr("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SecurityGroupRuleRemotePatch + err = vpcv1.UnmarshalSecurityGroupRuleRemotePatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSecurityGroupRuleRemotePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SecurityGroupRuleRemotePrototype) + model.Address = core.StringPtr("192.168.3.4") + model.CIDRBlock = core.StringPtr("192.168.3.0/24") + model.ID = core.StringPtr("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SecurityGroupRuleRemotePrototype + err = vpcv1.UnmarshalSecurityGroupRuleRemotePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalShareIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ShareIdentity) + model.ID = core.StringPtr("0fe9e5d8-0a4d-4818-96ec-e99708644a58") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ShareIdentity + err = vpcv1.UnmarshalShareIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalShareInitialOwner successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ShareInitialOwner) + model.Gid = core.Int64Ptr(int64(50)) + model.Uid = core.Int64Ptr(int64(50)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ShareInitialOwner + err = vpcv1.UnmarshalShareInitialOwner(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalShareMountTargetPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ShareMountTargetPatch) + model.Name = core.StringPtr("my-share-mount-target") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ShareMountTargetPatch + err = vpcv1.UnmarshalShareMountTargetPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalShareMountTargetPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ShareMountTargetPrototype) + model.Name = core.StringPtr("my-share-mount-target") + model.TransitEncryption = core.StringPtr("none") + model.VirtualNetworkInterface = nil + model.VPC = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ShareMountTargetPrototype + err = vpcv1.UnmarshalShareMountTargetPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalShareMountTargetVirtualNetworkInterfacePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ShareMountTargetVirtualNetworkInterfacePrototype) + model.AllowIPSpoofing = core.BoolPtr(true) + model.AutoDelete = core.BoolPtr(false) + model.EnableInfrastructureNat = core.BoolPtr(true) + model.Ips = nil + model.Name = core.StringPtr("my-virtual-network-interface") + model.PrimaryIP = nil + model.ResourceGroup = nil + model.SecurityGroups = nil + model.Subnet = nil + model.ID = core.StringPtr("0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ShareMountTargetVirtualNetworkInterfacePrototype + err = vpcv1.UnmarshalShareMountTargetVirtualNetworkInterfacePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSharePatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SharePatch) + model.AccessControlMode = core.StringPtr("security_group") + model.Iops = core.Int64Ptr(int64(100)) + model.Name = core.StringPtr("my-share") + model.Profile = nil + model.ReplicationCronSpec = core.StringPtr("0 */5 * * *") + model.Size = core.Int64Ptr(int64(200)) + model.UserTags = []string{"testString"} + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SharePatch + err = vpcv1.UnmarshalSharePatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalShareProfileIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ShareProfileIdentity) + model.Name = core.StringPtr("tier-3iops") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ShareProfileIdentity + err = vpcv1.UnmarshalShareProfileIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSharePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SharePrototype) + model.Iops = core.Int64Ptr(int64(100)) + model.MountTargets = nil + model.Name = core.StringPtr("my-share") + model.Profile = nil + model.ReplicaShare = nil + model.UserTags = nil + model.Zone = nil + model.AccessControlMode = core.StringPtr("security_group") + model.EncryptionKey = nil + model.InitialOwner = nil + model.ResourceGroup = nil + model.Size = core.Int64Ptr(int64(200)) + model.ReplicationCronSpec = core.StringPtr("0 */5 * * *") + model.SourceShare = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SharePrototype + err = vpcv1.UnmarshalSharePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSharePrototypeShareContext successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SharePrototypeShareContext) + model.Iops = core.Int64Ptr(int64(100)) + model.MountTargets = nil + model.Name = core.StringPtr("my-share") + model.Profile = nil + model.ReplicationCronSpec = core.StringPtr("0 */5 * * *") + model.ResourceGroup = nil + model.UserTags = nil + model.Zone = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SharePrototypeShareContext + err = vpcv1.UnmarshalSharePrototypeShareContext(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSnapshotClonePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SnapshotClonePrototype) + model.Zone = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SnapshotClonePrototype + err = vpcv1.UnmarshalSnapshotClonePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSnapshotConsistencyGroupPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SnapshotConsistencyGroupPatch) + model.DeleteSnapshotsOnDelete = core.BoolPtr(true) + model.Name = core.StringPtr("my-snapshot-consistency-group") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SnapshotConsistencyGroupPatch + err = vpcv1.UnmarshalSnapshotConsistencyGroupPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSnapshotConsistencyGroupPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SnapshotConsistencyGroupPrototype) + model.DeleteSnapshotsOnDelete = core.BoolPtr(true) + model.Name = core.StringPtr("my-snapshot-consistency-group") + model.ResourceGroup = nil + model.Snapshots = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SnapshotConsistencyGroupPrototype + err = vpcv1.UnmarshalSnapshotConsistencyGroupPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSnapshotIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SnapshotIdentity) + model.ID = core.StringPtr("r134-f6bfa329-0e36-433f-a3bb-0df632e79263") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SnapshotIdentity + err = vpcv1.UnmarshalSnapshotIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSnapshotPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SnapshotPatch) + model.Name = core.StringPtr("my-snapshot") + model.UserTags = []string{"testString"} + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SnapshotPatch + err = vpcv1.UnmarshalSnapshotPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSnapshotPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SnapshotPrototype) + model.Clones = nil + model.Name = core.StringPtr("my-snapshot") + model.ResourceGroup = nil + model.UserTags = nil + model.SourceVolume = nil + model.EncryptionKey = nil + model.SourceSnapshot = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SnapshotPrototype + err = vpcv1.UnmarshalSnapshotPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSnapshotPrototypeSnapshotConsistencyGroupContext successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SnapshotPrototypeSnapshotConsistencyGroupContext) + model.Name = core.StringPtr("my-snapshot") + model.SourceVolume = nil + model.UserTags = []string{"testString"} + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SnapshotPrototypeSnapshotConsistencyGroupContext + err = vpcv1.UnmarshalSnapshotPrototypeSnapshotConsistencyGroupContext(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSubnetIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SubnetIdentity) + model.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SubnetIdentity + err = vpcv1.UnmarshalSubnetIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSubnetPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SubnetPatch) + model.Name = core.StringPtr("my-subnet") + model.NetworkACL = nil + model.PublicGateway = nil + model.RoutingTable = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SubnetPatch + err = vpcv1.UnmarshalSubnetPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSubnetPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SubnetPrototype) + model.IPVersion = core.StringPtr("ipv4") + model.Name = core.StringPtr("my-subnet") + model.NetworkACL = nil + model.PublicGateway = nil + model.ResourceGroup = nil + model.RoutingTable = nil + model.VPC = nil + model.TotalIpv4AddressCount = core.Int64Ptr(int64(256)) + model.Zone = nil + model.Ipv4CIDRBlock = core.StringPtr("10.0.0.0/24") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SubnetPrototype + err = vpcv1.UnmarshalSubnetPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSubnetPublicGatewayPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SubnetPublicGatewayPatch) + model.ID = core.StringPtr("dc5431ef-1fc6-4861-adc9-a59d077d1241") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SubnetPublicGatewayPatch + err = vpcv1.UnmarshalSubnetPublicGatewayPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalTrustedProfileIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.TrustedProfileIdentity) + model.ID = core.StringPtr("Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5") + model.CRN = core.StringPtr("crn:v1:bluemix:public:iam-identity::a/aa2432b1fa4d4ace891e9b80fc104e34::profile:Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.TrustedProfileIdentity + err = vpcv1.UnmarshalTrustedProfileIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVpcdnsPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VpcdnsPatch) + model.EnableHub = core.BoolPtr(true) + model.Resolver = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VpcdnsPatch + err = vpcv1.UnmarshalVpcdnsPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVpcdnsPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VpcdnsPrototype) + model.EnableHub = core.BoolPtr(false) + model.Resolver = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VpcdnsPrototype + err = vpcv1.UnmarshalVpcdnsPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVpcdnsResolutionBindingPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VpcdnsResolutionBindingPatch) + model.Name = core.StringPtr("my-dns-resolution-binding-updated") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VpcdnsResolutionBindingPatch + err = vpcv1.UnmarshalVpcdnsResolutionBindingPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVpcdnsResolverPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VpcdnsResolverPatch) + model.ManualServers = nil + model.Type = core.StringPtr("delegated") + model.VPC = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VpcdnsResolverPatch + err = vpcv1.UnmarshalVpcdnsResolverPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVpcdnsResolverPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VpcdnsResolverPrototype) + model.Type = core.StringPtr("system") + model.ManualServers = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VpcdnsResolverPrototype + err = vpcv1.UnmarshalVpcdnsResolverPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVpcdnsResolverVPCPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VpcdnsResolverVPCPatch) + model.ID = core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VpcdnsResolverVPCPatch + err = vpcv1.UnmarshalVpcdnsResolverVPCPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPCIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPCIdentity) + model.ID = core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPCIdentity + err = vpcv1.UnmarshalVPCIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPCPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPCPatch) + model.Dns = nil + model.Name = core.StringPtr("my-vpc") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPCPatch + err = vpcv1.UnmarshalVPCPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionDpdPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionDpdPatch) + model.Action = core.StringPtr("restart") + model.Interval = core.Int64Ptr(int64(30)) + model.Timeout = core.Int64Ptr(int64(120)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionDpdPatch + err = vpcv1.UnmarshalVPNGatewayConnectionDpdPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionDpdPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionDpdPrototype) + model.Action = core.StringPtr("restart") + model.Interval = core.Int64Ptr(int64(30)) + model.Timeout = core.Int64Ptr(int64(120)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionDpdPrototype + err = vpcv1.UnmarshalVPNGatewayConnectionDpdPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionIkeIdentityPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionIkeIdentityPrototype) + model.Type = core.StringPtr("fqdn") + model.Value = core.StringPtr("my-service.example.com") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionIkeIdentityPrototype + err = vpcv1.UnmarshalVPNGatewayConnectionIkeIdentityPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionIkePolicyPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionIkePolicyPatch) + model.ID = core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionIkePolicyPatch + err = vpcv1.UnmarshalVPNGatewayConnectionIkePolicyPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionIkePolicyPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionIkePolicyPrototype) + model.ID = core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionIkePolicyPrototype + err = vpcv1.UnmarshalVPNGatewayConnectionIkePolicyPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionIPsecPolicyPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionIPsecPolicyPatch) + model.ID = core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionIPsecPolicyPatch + err = vpcv1.UnmarshalVPNGatewayConnectionIPsecPolicyPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionIPsecPolicyPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionIPsecPolicyPrototype) + model.ID = core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionIPsecPolicyPrototype + err = vpcv1.UnmarshalVPNGatewayConnectionIPsecPolicyPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionPatch) + model.AdminStateUp = core.BoolPtr(true) + model.DeadPeerDetection = nil + model.EstablishMode = core.StringPtr("bidirectional") + model.IkePolicy = nil + model.IpsecPolicy = nil + model.Name = core.StringPtr("my-vpn-connection") + model.Peer = nil + model.Psk = core.StringPtr("lkj14b1oi0alcniejkso") + model.RoutingProtocol = core.StringPtr("none") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionPatch + err = vpcv1.UnmarshalVPNGatewayConnectionPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionPeerPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionPeerPatch) + model.Address = core.StringPtr("169.21.50.5") + model.Fqdn = core.StringPtr("my-service.example.com") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionPeerPatch + err = vpcv1.UnmarshalVPNGatewayConnectionPeerPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionPolicyModeLocalPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionPolicyModeLocalPrototype) + model.CIDRs = []string{"192.168.1.0/24"} + model.IkeIdentities = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionPolicyModeLocalPrototype + err = vpcv1.UnmarshalVPNGatewayConnectionPolicyModeLocalPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionPolicyModePeerPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionPolicyModePeerPrototype) + model.CIDRs = []string{"10.45.1.0/24"} + model.IkeIdentity = nil + model.Address = core.StringPtr("169.21.50.5") + model.Fqdn = core.StringPtr("my-service.example.com") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionPolicyModePeerPrototype + err = vpcv1.UnmarshalVPNGatewayConnectionPolicyModePeerPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionPrototype) + model.AdminStateUp = core.BoolPtr(true) + model.DeadPeerDetection = nil + model.EstablishMode = core.StringPtr("bidirectional") + model.IkePolicy = nil + model.IpsecPolicy = nil + model.Name = core.StringPtr("my-vpn-connection") + model.Psk = core.StringPtr("lkj14b1oi0alcniejkso") + model.Local = nil + model.Peer = nil + model.RoutingProtocol = core.StringPtr("none") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionPrototype + err = vpcv1.UnmarshalVPNGatewayConnectionPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionStaticRouteModeLocalPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionStaticRouteModeLocalPrototype) + model.IkeIdentities = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionStaticRouteModeLocalPrototype + err = vpcv1.UnmarshalVPNGatewayConnectionStaticRouteModeLocalPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionStaticRouteModePeerPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionStaticRouteModePeerPrototype) + model.IkeIdentity = nil + model.Address = core.StringPtr("169.21.50.5") + model.Fqdn = core.StringPtr("my-service.example.com") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionStaticRouteModePeerPrototype + err = vpcv1.UnmarshalVPNGatewayConnectionStaticRouteModePeerPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayPatch) + model.Name = core.StringPtr("my-vpn-gateway") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayPatch + err = vpcv1.UnmarshalVPNGatewayPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayPrototype) + model.Name = core.StringPtr("my-vpn-gateway") + model.ResourceGroup = nil + model.Subnet = nil + model.Mode = core.StringPtr("route") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayPrototype + err = vpcv1.UnmarshalVPNGatewayPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNServerAuthenticationByUsernameIDProvider successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNServerAuthenticationByUsernameIDProvider) + model.ProviderType = core.StringPtr("iam") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNServerAuthenticationByUsernameIDProvider + err = vpcv1.UnmarshalVPNServerAuthenticationByUsernameIDProvider(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNServerAuthenticationPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNServerAuthenticationPrototype) + model.Method = core.StringPtr("certificate") + model.IdentityProvider = nil + model.ClientCa = nil + model.Crl = core.StringPtr("testString") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result interface{} + err = vpcv1.UnmarshalVPNServerAuthenticationPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + }) + It(`Invoke UnmarshalVPNServerPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNServerPatch) + model.Certificate = nil + model.ClientAuthentication = nil + model.ClientDnsServerIps = nil + model.ClientIdleTimeout = core.Int64Ptr(int64(600)) + model.ClientIPPool = core.StringPtr("172.16.0.0/16") + model.EnableSplitTunneling = core.BoolPtr(true) + model.Name = core.StringPtr("my-vpn-server") + model.Port = core.Int64Ptr(int64(443)) + model.Protocol = core.StringPtr("udp") + model.Subnets = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNServerPatch + err = vpcv1.UnmarshalVPNServerPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNServerRoutePatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNServerRoutePatch) + model.Name = core.StringPtr("my-vpn-route-2") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNServerRoutePatch + err = vpcv1.UnmarshalVPNServerRoutePatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVirtualNetworkInterfaceIPPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VirtualNetworkInterfaceIPPrototype) + model.ID = core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + model.Address = core.StringPtr("192.168.3.4") + model.AutoDelete = core.BoolPtr(false) + model.Name = core.StringPtr("my-reserved-ip") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VirtualNetworkInterfaceIPPrototype + err = vpcv1.UnmarshalVirtualNetworkInterfaceIPPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVirtualNetworkInterfacePatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VirtualNetworkInterfacePatch) + model.AllowIPSpoofing = core.BoolPtr(true) + model.AutoDelete = core.BoolPtr(false) + model.EnableInfrastructureNat = core.BoolPtr(true) + model.Name = core.StringPtr("my-virtual-network-interface") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VirtualNetworkInterfacePatch + err = vpcv1.UnmarshalVirtualNetworkInterfacePatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVirtualNetworkInterfacePrimaryIPPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VirtualNetworkInterfacePrimaryIPPrototype) + model.ID = core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + model.Address = core.StringPtr("192.168.3.4") + model.AutoDelete = core.BoolPtr(false) + model.Name = core.StringPtr("my-reserved-ip") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VirtualNetworkInterfacePrimaryIPPrototype + err = vpcv1.UnmarshalVirtualNetworkInterfacePrimaryIPPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVolumeAttachmentPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VolumeAttachmentPatch) + model.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + model.Name = core.StringPtr("my-volume-attachment") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VolumeAttachmentPatch + err = vpcv1.UnmarshalVolumeAttachmentPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVolumeAttachmentPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VolumeAttachmentPrototype) + model.DeleteVolumeOnInstanceDelete = core.BoolPtr(false) + model.Name = core.StringPtr("my-volume-attachment") + model.Volume = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VolumeAttachmentPrototype + err = vpcv1.UnmarshalVolumeAttachmentPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVolumeAttachmentPrototypeInstanceByImageContext successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VolumeAttachmentPrototypeInstanceByImageContext) + model.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + model.Name = core.StringPtr("my-volume-attachment") + model.Volume = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VolumeAttachmentPrototypeInstanceByImageContext + err = vpcv1.UnmarshalVolumeAttachmentPrototypeInstanceByImageContext(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVolumeAttachmentPrototypeInstanceBySourceSnapshotContext successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VolumeAttachmentPrototypeInstanceBySourceSnapshotContext) + model.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + model.Name = core.StringPtr("my-volume-attachment") + model.Volume = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VolumeAttachmentPrototypeInstanceBySourceSnapshotContext + err = vpcv1.UnmarshalVolumeAttachmentPrototypeInstanceBySourceSnapshotContext(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVolumeAttachmentPrototypeInstanceByVolumeContext successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VolumeAttachmentPrototypeInstanceByVolumeContext) + model.DeleteVolumeOnInstanceDelete = core.BoolPtr(false) + model.Name = core.StringPtr("my-volume-attachment") + model.Volume = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VolumeAttachmentPrototypeInstanceByVolumeContext + err = vpcv1.UnmarshalVolumeAttachmentPrototypeInstanceByVolumeContext(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVolumeAttachmentPrototypeVolume successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VolumeAttachmentPrototypeVolume) + model.ID = core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + model.Iops = core.Int64Ptr(int64(10000)) + model.Name = core.StringPtr("my-volume") + model.Profile = nil + model.ResourceGroup = nil + model.UserTags = nil + model.Capacity = core.Int64Ptr(int64(100)) + model.EncryptionKey = nil + model.SourceSnapshot = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VolumeAttachmentPrototypeVolume + err = vpcv1.UnmarshalVolumeAttachmentPrototypeVolume(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVolumeIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VolumeIdentity) + model.ID = core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VolumeIdentity + err = vpcv1.UnmarshalVolumeIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVolumePatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VolumePatch) + model.Capacity = core.Int64Ptr(int64(100)) + model.Iops = core.Int64Ptr(int64(10000)) + model.Name = core.StringPtr("my-volume") + model.Profile = nil + model.UserTags = []string{"testString"} + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VolumePatch + err = vpcv1.UnmarshalVolumePatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVolumeProfileIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VolumeProfileIdentity) + model.Name = core.StringPtr("general-purpose") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VolumeProfileIdentity + err = vpcv1.UnmarshalVolumeProfileIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVolumePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VolumePrototype) + model.Iops = core.Int64Ptr(int64(10000)) + model.Name = core.StringPtr("my-volume") + model.Profile = nil + model.ResourceGroup = nil + model.UserTags = nil + model.Zone = nil + model.Capacity = core.Int64Ptr(int64(100)) + model.EncryptionKey = nil + model.SourceSnapshot = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VolumePrototype + err = vpcv1.UnmarshalVolumePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVolumePrototypeInstanceByImageContext successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VolumePrototypeInstanceByImageContext) + model.Capacity = core.Int64Ptr(int64(100)) + model.EncryptionKey = nil + model.Iops = core.Int64Ptr(int64(10000)) + model.Name = core.StringPtr("my-volume") + model.Profile = nil + model.ResourceGroup = nil + model.UserTags = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VolumePrototypeInstanceByImageContext + err = vpcv1.UnmarshalVolumePrototypeInstanceByImageContext(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVolumePrototypeInstanceBySourceSnapshotContext successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VolumePrototypeInstanceBySourceSnapshotContext) + model.Capacity = core.Int64Ptr(int64(100)) + model.EncryptionKey = nil + model.Iops = core.Int64Ptr(int64(10000)) + model.Name = core.StringPtr("my-volume") + model.Profile = nil + model.ResourceGroup = nil + model.SourceSnapshot = nil + model.UserTags = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VolumePrototypeInstanceBySourceSnapshotContext + err = vpcv1.UnmarshalVolumePrototypeInstanceBySourceSnapshotContext(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalZoneIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ZoneIdentity) + model.Name = core.StringPtr("us-south-1") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ZoneIdentity + err = vpcv1.UnmarshalZoneIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype) + model.MatchUserTags = []string{"my-daily-backup-policy"} + model.Name = core.StringPtr("my-backup-policy") + model.Plans = nil + model.ResourceGroup = nil + model.Scope = nil + model.IncludedContent = []string{"boot_volume", "data_volumes"} + model.MatchResourceType = core.StringPtr("instance") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype + err = vpcv1.UnmarshalBackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype) + model.MatchUserTags = []string{"my-daily-backup-policy"} + model.Name = core.StringPtr("my-backup-policy") + model.Plans = nil + model.ResourceGroup = nil + model.Scope = nil + model.MatchResourceType = core.StringPtr("volume") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype + err = vpcv1.UnmarshalBackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBackupPolicyScopePrototypeEnterpriseIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BackupPolicyScopePrototypeEnterpriseIdentity) + model.CRN = core.StringPtr("crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BackupPolicyScopePrototypeEnterpriseIdentity + err = vpcv1.UnmarshalBackupPolicyScopePrototypeEnterpriseIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity) + model.ID = core.StringPtr("0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity + err = vpcv1.UnmarshalBareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext) + model.AllowIPSpoofing = core.BoolPtr(true) + model.AutoDelete = core.BoolPtr(false) + model.EnableInfrastructureNat = core.BoolPtr(true) + model.Ips = nil + model.Name = core.StringPtr("my-virtual-network-interface") + model.PrimaryIP = nil + model.ResourceGroup = nil + model.SecurityGroups = nil + model.Subnet = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext + err = vpcv1.UnmarshalBareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPciPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPciPrototype) + model.Name = core.StringPtr("my-bare-metal-server-network-attachment") + model.VirtualNetworkInterface = nil + model.AllowedVlans = nil + model.InterfaceType = core.StringPtr("pci") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPciPrototype + err = vpcv1.UnmarshalBareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPciPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVlanPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVlanPrototype) + model.Name = core.StringPtr("my-bare-metal-server-network-attachment") + model.VirtualNetworkInterface = nil + model.AllowToFloat = core.BoolPtr(false) + model.InterfaceType = core.StringPtr("vlan") + model.Vlan = core.Int64Ptr(int64(4)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVlanPrototype + err = vpcv1.UnmarshalBareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVlanPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype) + model.AllowIPSpoofing = core.BoolPtr(true) + model.EnableInfrastructureNat = core.BoolPtr(true) + model.Name = core.StringPtr("my-bare-metal-server-network-interface") + model.PrimaryIP = nil + model.SecurityGroups = nil + model.Subnet = nil + model.InterfaceType = core.StringPtr("hipersocket") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype + err = vpcv1.UnmarshalBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype) + model.AllowIPSpoofing = core.BoolPtr(true) + model.EnableInfrastructureNat = core.BoolPtr(true) + model.Name = core.StringPtr("my-bare-metal-server-network-interface") + model.PrimaryIP = nil + model.SecurityGroups = nil + model.Subnet = nil + model.AllowedVlans = nil + model.InterfaceType = core.StringPtr("pci") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype + err = vpcv1.UnmarshalBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype) + model.AllowIPSpoofing = core.BoolPtr(true) + model.EnableInfrastructureNat = core.BoolPtr(true) + model.Name = core.StringPtr("my-bare-metal-server-network-interface") + model.PrimaryIP = nil + model.SecurityGroups = nil + model.Subnet = nil + model.AllowInterfaceToFloat = core.BoolPtr(false) + model.InterfaceType = core.StringPtr("vlan") + model.Vlan = core.Int64Ptr(int64(4)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype + err = vpcv1.UnmarshalBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPciPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPciPrototype) + model.Name = core.StringPtr("my-bare-metal-server-network-attachment") + model.VirtualNetworkInterface = nil + model.AllowedVlans = nil + model.InterfaceType = core.StringPtr("pci") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPciPrototype + err = vpcv1.UnmarshalBareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPciPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBareMetalServerProfileIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BareMetalServerProfileIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BareMetalServerProfileIdentityByHref + err = vpcv1.UnmarshalBareMetalServerProfileIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBareMetalServerProfileIdentityByName successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BareMetalServerProfileIdentityByName) + model.Name = core.StringPtr("bx2-metal-192x768") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BareMetalServerProfileIdentityByName + err = vpcv1.UnmarshalBareMetalServerProfileIdentityByName(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBareMetalServerPrototypeBareMetalServerByNetworkAttachment successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BareMetalServerPrototypeBareMetalServerByNetworkAttachment) + model.EnableSecureBoot = core.BoolPtr(false) + model.Initialization = nil + model.Name = core.StringPtr("my-bare-metal-server") + model.Profile = nil + model.ResourceGroup = nil + model.TrustedPlatformModule = nil + model.VPC = nil + model.Zone = nil + model.NetworkAttachments = nil + model.PrimaryNetworkAttachment = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BareMetalServerPrototypeBareMetalServerByNetworkAttachment + err = vpcv1.UnmarshalBareMetalServerPrototypeBareMetalServerByNetworkAttachment(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBareMetalServerPrototypeBareMetalServerByNetworkInterface successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BareMetalServerPrototypeBareMetalServerByNetworkInterface) + model.EnableSecureBoot = core.BoolPtr(false) + model.Initialization = nil + model.Name = core.StringPtr("my-bare-metal-server") + model.Profile = nil + model.ResourceGroup = nil + model.TrustedPlatformModule = nil + model.VPC = nil + model.Zone = nil + model.NetworkInterfaces = nil + model.PrimaryNetworkInterface = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BareMetalServerPrototypeBareMetalServerByNetworkInterface + err = vpcv1.UnmarshalBareMetalServerPrototypeBareMetalServerByNetworkInterface(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalCatalogOfferingIdentityCatalogOfferingByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.CatalogOfferingIdentityCatalogOfferingByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.CatalogOfferingIdentityCatalogOfferingByCRN + err = vpcv1.UnmarshalCatalogOfferingIdentityCatalogOfferingByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalCatalogOfferingVersionIdentityCatalogOfferingVersionByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN + err = vpcv1.UnmarshalCatalogOfferingVersionIdentityCatalogOfferingVersionByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalCertificateInstanceIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.CertificateInstanceIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.CertificateInstanceIdentityByCRN + err = vpcv1.UnmarshalCertificateInstanceIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalCloudObjectStorageBucketIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.CloudObjectStorageBucketIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.CloudObjectStorageBucketIdentityByCRN + err = vpcv1.UnmarshalCloudObjectStorageBucketIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName) + model.Name = core.StringPtr("bucket-27200-lwx4cfvcue") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName + err = vpcv1.UnmarshalCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalDnsInstanceIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.DnsInstanceIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.DnsInstanceIdentityByCRN + err = vpcv1.UnmarshalDnsInstanceIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalDnsZoneIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.DnsZoneIdentityByID) + model.ID = core.StringPtr("d66662cc-aa23-4fe1-9987-858487a61f45") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.DnsZoneIdentityByID + err = vpcv1.UnmarshalDnsZoneIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalDedicatedHostGroupIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.DedicatedHostGroupIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.DedicatedHostGroupIdentityByCRN + err = vpcv1.UnmarshalDedicatedHostGroupIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalDedicatedHostGroupIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.DedicatedHostGroupIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.DedicatedHostGroupIdentityByHref + err = vpcv1.UnmarshalDedicatedHostGroupIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalDedicatedHostGroupIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.DedicatedHostGroupIdentityByID) + model.ID = core.StringPtr("bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.DedicatedHostGroupIdentityByID + err = vpcv1.UnmarshalDedicatedHostGroupIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalDedicatedHostProfileIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.DedicatedHostProfileIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles/mx2-host-152x1216") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.DedicatedHostProfileIdentityByHref + err = vpcv1.UnmarshalDedicatedHostProfileIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalDedicatedHostProfileIdentityByName successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.DedicatedHostProfileIdentityByName) + model.Name = core.StringPtr("mx2-host-152x1216") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.DedicatedHostProfileIdentityByName + err = vpcv1.UnmarshalDedicatedHostProfileIdentityByName(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalDedicatedHostPrototypeDedicatedHostByGroup successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.DedicatedHostPrototypeDedicatedHostByGroup) + model.InstancePlacementEnabled = core.BoolPtr(true) + model.Name = core.StringPtr("my-host") + model.Profile = nil + model.ResourceGroup = nil + model.Group = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.DedicatedHostPrototypeDedicatedHostByGroup + err = vpcv1.UnmarshalDedicatedHostPrototypeDedicatedHostByGroup(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalDedicatedHostPrototypeDedicatedHostByZone successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.DedicatedHostPrototypeDedicatedHostByZone) + model.InstancePlacementEnabled = core.BoolPtr(true) + model.Name = core.StringPtr("my-host") + model.Profile = nil + model.ResourceGroup = nil + model.Group = nil + model.Zone = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.DedicatedHostPrototypeDedicatedHostByZone + err = vpcv1.UnmarshalDedicatedHostPrototypeDedicatedHostByZone(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalEncryptionKeyIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.EncryptionKeyIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.EncryptionKeyIdentityByCRN + err = vpcv1.UnmarshalEncryptionKeyIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalEndpointGatewayReservedIPReservedIPIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.EndpointGatewayReservedIPReservedIPIdentity) + model.ID = core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.EndpointGatewayReservedIPReservedIPIdentity + err = vpcv1.UnmarshalEndpointGatewayReservedIPReservedIPIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalEndpointGatewayReservedIPReservedIPPrototypeTargetContext successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.EndpointGatewayReservedIPReservedIPPrototypeTargetContext) + model.Address = core.StringPtr("192.168.3.4") + model.AutoDelete = core.BoolPtr(false) + model.Name = core.StringPtr("my-reserved-ip") + model.Subnet = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.EndpointGatewayReservedIPReservedIPPrototypeTargetContext + err = vpcv1.UnmarshalEndpointGatewayReservedIPReservedIPPrototypeTargetContext(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalEndpointGatewayTargetPrototypeProviderCloudServiceIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.EndpointGatewayTargetPrototypeProviderCloudServiceIdentity) + model.ResourceType = core.StringPtr("provider_cloud_service") + model.CRN = core.StringPtr("crn:v1:bluemix:public:cloudant:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:3527280b-9327-4411-8020-591092e60353::") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.EndpointGatewayTargetPrototypeProviderCloudServiceIdentity + err = vpcv1.UnmarshalEndpointGatewayTargetPrototypeProviderCloudServiceIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalEndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity) + model.ResourceType = core.StringPtr("provider_infrastructure_service") + model.Name = core.StringPtr("ibm-ntp-server") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity + err = vpcv1.UnmarshalEndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFloatingIPPrototypeFloatingIPByTarget successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FloatingIPPrototypeFloatingIPByTarget) + model.Name = core.StringPtr("my-floating-ip") + model.ResourceGroup = nil + model.Target = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FloatingIPPrototypeFloatingIPByTarget + err = vpcv1.UnmarshalFloatingIPPrototypeFloatingIPByTarget(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFloatingIPPrototypeFloatingIPByZone successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FloatingIPPrototypeFloatingIPByZone) + model.Name = core.StringPtr("my-floating-ip") + model.ResourceGroup = nil + model.Zone = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FloatingIPPrototypeFloatingIPByZone + err = vpcv1.UnmarshalFloatingIPPrototypeFloatingIPByZone(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentity) + model.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentity + err = vpcv1.UnmarshalFloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFloatingIPTargetPatchNetworkInterfaceIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FloatingIPTargetPatchNetworkInterfaceIdentity) + model.ID = core.StringPtr("0717-10c02d81-0ecb-4dc5-897d-28392913b81e") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FloatingIPTargetPatchNetworkInterfaceIdentity + err = vpcv1.UnmarshalFloatingIPTargetPatchNetworkInterfaceIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFloatingIPTargetPatchVirtualNetworkInterfaceIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FloatingIPTargetPatchVirtualNetworkInterfaceIdentity) + model.ID = core.StringPtr("0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FloatingIPTargetPatchVirtualNetworkInterfaceIdentity + err = vpcv1.UnmarshalFloatingIPTargetPatchVirtualNetworkInterfaceIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentity) + model.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentity + err = vpcv1.UnmarshalFloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFloatingIPTargetPrototypeNetworkInterfaceIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FloatingIPTargetPrototypeNetworkInterfaceIdentity) + model.ID = core.StringPtr("0717-10c02d81-0ecb-4dc5-897d-28392913b81e") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FloatingIPTargetPrototypeNetworkInterfaceIdentity + err = vpcv1.UnmarshalFloatingIPTargetPrototypeNetworkInterfaceIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFloatingIPTargetPrototypeVirtualNetworkInterfaceIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentity) + model.ID = core.StringPtr("0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentity + err = vpcv1.UnmarshalFloatingIPTargetPrototypeVirtualNetworkInterfaceIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFlowLogCollectorTargetPrototypeInstanceIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FlowLogCollectorTargetPrototypeInstanceIdentity) + model.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FlowLogCollectorTargetPrototypeInstanceIdentity + err = vpcv1.UnmarshalFlowLogCollectorTargetPrototypeInstanceIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentity) + model.ID = core.StringPtr("0717-d54eb633-98ea-459d-aa00-6a8e780175a7") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentity + err = vpcv1.UnmarshalFlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFlowLogCollectorTargetPrototypeNetworkInterfaceIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity) + model.ID = core.StringPtr("0717-10c02d81-0ecb-4dc5-897d-28392913b81e") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity + err = vpcv1.UnmarshalFlowLogCollectorTargetPrototypeNetworkInterfaceIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFlowLogCollectorTargetPrototypeSubnetIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FlowLogCollectorTargetPrototypeSubnetIdentity) + model.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FlowLogCollectorTargetPrototypeSubnetIdentity + err = vpcv1.UnmarshalFlowLogCollectorTargetPrototypeSubnetIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFlowLogCollectorTargetPrototypeVPCIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FlowLogCollectorTargetPrototypeVPCIdentity) + model.ID = core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FlowLogCollectorTargetPrototypeVPCIdentity + err = vpcv1.UnmarshalFlowLogCollectorTargetPrototypeVPCIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentity) + model.ID = core.StringPtr("0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentity + err = vpcv1.UnmarshalFlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalImageIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ImageIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ImageIdentityByCRN + err = vpcv1.UnmarshalImageIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalImageIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ImageIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ImageIdentityByHref + err = vpcv1.UnmarshalImageIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalImageIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ImageIdentityByID) + model.ID = core.StringPtr("r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ImageIdentityByID + err = vpcv1.UnmarshalImageIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalImagePrototypeImageByFile successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ImagePrototypeImageByFile) + model.DeprecationAt = CreateMockDateTime("2019-01-01T12:00:00.000Z") + model.Name = core.StringPtr("my-image") + model.ObsolescenceAt = CreateMockDateTime("2019-01-01T12:00:00.000Z") + model.ResourceGroup = nil + model.EncryptedDataKey = core.StringPtr("testString") + model.EncryptionKey = nil + model.File = nil + model.OperatingSystem = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ImagePrototypeImageByFile + err = vpcv1.UnmarshalImagePrototypeImageByFile(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalImagePrototypeImageBySourceVolume successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ImagePrototypeImageBySourceVolume) + model.DeprecationAt = CreateMockDateTime("2019-01-01T12:00:00.000Z") + model.Name = core.StringPtr("my-image") + model.ObsolescenceAt = CreateMockDateTime("2019-01-01T12:00:00.000Z") + model.ResourceGroup = nil + model.EncryptionKey = nil + model.SourceVolume = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ImagePrototypeImageBySourceVolume + err = vpcv1.UnmarshalImagePrototypeImageBySourceVolume(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceCatalogOfferingPrototypeCatalogOfferingByOffering successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceCatalogOfferingPrototypeCatalogOfferingByOffering) + model.Offering = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceCatalogOfferingPrototypeCatalogOfferingByOffering + err = vpcv1.UnmarshalInstanceCatalogOfferingPrototypeCatalogOfferingByOffering(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceCatalogOfferingPrototypeCatalogOfferingByVersion successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceCatalogOfferingPrototypeCatalogOfferingByVersion) + model.Version = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceCatalogOfferingPrototypeCatalogOfferingByVersion + err = vpcv1.UnmarshalInstanceCatalogOfferingPrototypeCatalogOfferingByVersion(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceGroupManagerActionPrototypeScheduledActionPrototype) + model.Name = core.StringPtr("my-instance-group-manager-action") + model.RunAt = CreateMockDateTime("2019-01-01T12:00:00.000Z") + model.Group = nil + model.Manager = nil + model.CronSpec = core.StringPtr("30 */2 * * 1-5") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceGroupManagerActionPrototypeScheduledActionPrototype + err = vpcv1.UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype) + model.Name = core.StringPtr("my-instance-group-manager-policy") + model.MetricType = core.StringPtr("cpu") + model.MetricValue = core.Int64Ptr(int64(38)) + model.PolicyType = core.StringPtr("target") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype + err = vpcv1.UnmarshalInstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype) + model.ManagementEnabled = core.BoolPtr(true) + model.Name = core.StringPtr("my-instance-group-manager") + model.AggregationWindow = core.Int64Ptr(int64(120)) + model.Cooldown = core.Int64Ptr(int64(210)) + model.ManagerType = core.StringPtr("autoscale") + model.MaxMembershipCount = core.Int64Ptr(int64(10)) + model.MinMembershipCount = core.Int64Ptr(int64(10)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype + err = vpcv1.UnmarshalInstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype) + model.ManagementEnabled = core.BoolPtr(true) + model.Name = core.StringPtr("my-instance-group-manager") + model.ManagerType = core.StringPtr("scheduled") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype + err = vpcv1.UnmarshalInstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype) + model.MaxMembershipCount = core.Int64Ptr(int64(10)) + model.MinMembershipCount = core.Int64Ptr(int64(10)) + model.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype + err = vpcv1.UnmarshalInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity) + model.ID = core.StringPtr("0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity + err = vpcv1.UnmarshalInstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext) + model.AllowIPSpoofing = core.BoolPtr(true) + model.AutoDelete = core.BoolPtr(false) + model.EnableInfrastructureNat = core.BoolPtr(true) + model.Ips = nil + model.Name = core.StringPtr("my-virtual-network-interface") + model.PrimaryIP = nil + model.ResourceGroup = nil + model.SecurityGroups = nil + model.Subnet = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext + err = vpcv1.UnmarshalInstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePatchProfileInstanceProfileIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePatchProfileInstanceProfileIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePatchProfileInstanceProfileIdentityByHref + err = vpcv1.UnmarshalInstancePatchProfileInstanceProfileIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePatchProfileInstanceProfileIdentityByName successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePatchProfileInstanceProfileIdentityByName) + model.Name = core.StringPtr("bx2-4x16") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePatchProfileInstanceProfileIdentityByName + err = vpcv1.UnmarshalInstancePatchProfileInstanceProfileIdentityByName(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePlacementTargetPatchDedicatedHostGroupIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePlacementTargetPatchDedicatedHostGroupIdentity) + model.ID = core.StringPtr("bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePlacementTargetPatchDedicatedHostGroupIdentity + err = vpcv1.UnmarshalInstancePlacementTargetPatchDedicatedHostGroupIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePlacementTargetPatchDedicatedHostIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePlacementTargetPatchDedicatedHostIdentity) + model.ID = core.StringPtr("0717-1e09281b-f177-46fb-baf1-bc152b2e391a") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePlacementTargetPatchDedicatedHostIdentity + err = vpcv1.UnmarshalInstancePlacementTargetPatchDedicatedHostIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePlacementTargetPrototypeDedicatedHostGroupIdentity) + model.ID = core.StringPtr("bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePlacementTargetPrototypeDedicatedHostGroupIdentity + err = vpcv1.UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePlacementTargetPrototypeDedicatedHostIdentity) + model.ID = core.StringPtr("0717-1e09281b-f177-46fb-baf1-bc152b2e391a") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePlacementTargetPrototypeDedicatedHostIdentity + err = vpcv1.UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePlacementTargetPrototypePlacementGroupIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePlacementTargetPrototypePlacementGroupIdentity) + model.ID = core.StringPtr("r018-418fe842-a3e9-47b9-a938-1aa5bd632871") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePlacementTargetPrototypePlacementGroupIdentity + err = vpcv1.UnmarshalInstancePlacementTargetPrototypePlacementGroupIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceProfileIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceProfileIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceProfileIdentityByHref + err = vpcv1.UnmarshalInstanceProfileIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceProfileIdentityByName successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceProfileIdentityByName) + model.Name = core.StringPtr("bx2-4x16") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceProfileIdentityByName + err = vpcv1.UnmarshalInstanceProfileIdentityByName(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePrototypeInstanceByCatalogOffering successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePrototypeInstanceByCatalogOffering) + model.AvailabilityPolicy = nil + model.DefaultTrustedProfile = nil + model.Keys = nil + model.MetadataService = nil + model.Name = core.StringPtr("my-instance") + model.PlacementTarget = nil + model.Profile = nil + model.ReservationAffinity = nil + model.ResourceGroup = nil + model.TotalVolumeBandwidth = core.Int64Ptr(int64(500)) + model.UserData = core.StringPtr("testString") + model.VolumeAttachments = nil + model.VPC = nil + model.BootVolumeAttachment = nil + model.CatalogOffering = nil + model.Zone = nil + model.NetworkAttachments = nil + model.PrimaryNetworkAttachment = nil + model.NetworkInterfaces = nil + model.PrimaryNetworkInterface = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePrototypeInstanceByCatalogOffering + err = vpcv1.UnmarshalInstancePrototypeInstanceByCatalogOffering(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePrototypeInstanceByImage successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePrototypeInstanceByImage) + model.AvailabilityPolicy = nil + model.DefaultTrustedProfile = nil + model.Keys = nil + model.MetadataService = nil + model.Name = core.StringPtr("my-instance") + model.PlacementTarget = nil + model.Profile = nil + model.ReservationAffinity = nil + model.ResourceGroup = nil + model.TotalVolumeBandwidth = core.Int64Ptr(int64(500)) + model.UserData = core.StringPtr("testString") + model.VolumeAttachments = nil + model.VPC = nil + model.BootVolumeAttachment = nil + model.Image = nil + model.Zone = nil + model.NetworkAttachments = nil + model.PrimaryNetworkAttachment = nil + model.NetworkInterfaces = nil + model.PrimaryNetworkInterface = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePrototypeInstanceByImage + err = vpcv1.UnmarshalInstancePrototypeInstanceByImage(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePrototypeInstanceBySourceSnapshot successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePrototypeInstanceBySourceSnapshot) + model.AvailabilityPolicy = nil + model.DefaultTrustedProfile = nil + model.Keys = nil + model.MetadataService = nil + model.Name = core.StringPtr("my-instance") + model.PlacementTarget = nil + model.Profile = nil + model.ReservationAffinity = nil + model.ResourceGroup = nil + model.TotalVolumeBandwidth = core.Int64Ptr(int64(500)) + model.UserData = core.StringPtr("testString") + model.VolumeAttachments = nil + model.VPC = nil + model.BootVolumeAttachment = nil + model.Zone = nil + model.NetworkAttachments = nil + model.PrimaryNetworkAttachment = nil + model.NetworkInterfaces = nil + model.PrimaryNetworkInterface = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePrototypeInstanceBySourceSnapshot + err = vpcv1.UnmarshalInstancePrototypeInstanceBySourceSnapshot(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePrototypeInstanceBySourceTemplate successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePrototypeInstanceBySourceTemplate) + model.AvailabilityPolicy = nil + model.DefaultTrustedProfile = nil + model.Keys = nil + model.MetadataService = nil + model.Name = core.StringPtr("my-instance") + model.PlacementTarget = nil + model.Profile = nil + model.ReservationAffinity = nil + model.ResourceGroup = nil + model.TotalVolumeBandwidth = core.Int64Ptr(int64(500)) + model.UserData = core.StringPtr("testString") + model.VolumeAttachments = nil + model.VPC = nil + model.BootVolumeAttachment = nil + model.CatalogOffering = nil + model.Image = nil + model.NetworkAttachments = nil + model.NetworkInterfaces = nil + model.PrimaryNetworkAttachment = nil + model.PrimaryNetworkInterface = nil + model.SourceTemplate = nil + model.Zone = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePrototypeInstanceBySourceTemplate + err = vpcv1.UnmarshalInstancePrototypeInstanceBySourceTemplate(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePrototypeInstanceByVolume successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePrototypeInstanceByVolume) + model.AvailabilityPolicy = nil + model.DefaultTrustedProfile = nil + model.Keys = nil + model.MetadataService = nil + model.Name = core.StringPtr("my-instance") + model.PlacementTarget = nil + model.Profile = nil + model.ReservationAffinity = nil + model.ResourceGroup = nil + model.TotalVolumeBandwidth = core.Int64Ptr(int64(500)) + model.UserData = core.StringPtr("testString") + model.VolumeAttachments = nil + model.VPC = nil + model.BootVolumeAttachment = nil + model.Zone = nil + model.NetworkAttachments = nil + model.PrimaryNetworkAttachment = nil + model.NetworkInterfaces = nil + model.PrimaryNetworkInterface = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePrototypeInstanceByVolume + err = vpcv1.UnmarshalInstancePrototypeInstanceByVolume(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceTemplateIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceTemplateIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceTemplateIdentityByCRN + err = vpcv1.UnmarshalInstanceTemplateIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceTemplateIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceTemplateIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceTemplateIdentityByHref + err = vpcv1.UnmarshalInstanceTemplateIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceTemplateIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceTemplateIdentityByID) + model.ID = core.StringPtr("a6b1a881-2ce8-41a3-80fc-36316a73f803") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceTemplateIdentityByID + err = vpcv1.UnmarshalInstanceTemplateIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceTemplatePrototypeInstanceTemplateByCatalogOffering successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceTemplatePrototypeInstanceTemplateByCatalogOffering) + model.AvailabilityPolicy = nil + model.DefaultTrustedProfile = nil + model.Keys = nil + model.MetadataService = nil + model.Name = core.StringPtr("my-instance") + model.PlacementTarget = nil + model.Profile = nil + model.ReservationAffinity = nil + model.ResourceGroup = nil + model.TotalVolumeBandwidth = core.Int64Ptr(int64(500)) + model.UserData = core.StringPtr("testString") + model.VolumeAttachments = nil + model.VPC = nil + model.BootVolumeAttachment = nil + model.CatalogOffering = nil + model.Zone = nil + model.NetworkAttachments = nil + model.PrimaryNetworkAttachment = nil + model.NetworkInterfaces = nil + model.PrimaryNetworkInterface = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceTemplatePrototypeInstanceTemplateByCatalogOffering + err = vpcv1.UnmarshalInstanceTemplatePrototypeInstanceTemplateByCatalogOffering(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceTemplatePrototypeInstanceTemplateByImage successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceTemplatePrototypeInstanceTemplateByImage) + model.AvailabilityPolicy = nil + model.DefaultTrustedProfile = nil + model.Keys = nil + model.MetadataService = nil + model.Name = core.StringPtr("my-instance") + model.PlacementTarget = nil + model.Profile = nil + model.ReservationAffinity = nil + model.ResourceGroup = nil + model.TotalVolumeBandwidth = core.Int64Ptr(int64(500)) + model.UserData = core.StringPtr("testString") + model.VolumeAttachments = nil + model.VPC = nil + model.BootVolumeAttachment = nil + model.Image = nil + model.Zone = nil + model.NetworkAttachments = nil + model.PrimaryNetworkAttachment = nil + model.NetworkInterfaces = nil + model.PrimaryNetworkInterface = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceTemplatePrototypeInstanceTemplateByImage + err = vpcv1.UnmarshalInstanceTemplatePrototypeInstanceTemplateByImage(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceTemplatePrototypeInstanceTemplateBySourceSnapshot successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot) + model.AvailabilityPolicy = nil + model.DefaultTrustedProfile = nil + model.Keys = nil + model.MetadataService = nil + model.Name = core.StringPtr("my-instance") + model.PlacementTarget = nil + model.Profile = nil + model.ReservationAffinity = nil + model.ResourceGroup = nil + model.TotalVolumeBandwidth = core.Int64Ptr(int64(500)) + model.UserData = core.StringPtr("testString") + model.VolumeAttachments = nil + model.VPC = nil + model.BootVolumeAttachment = nil + model.Zone = nil + model.NetworkAttachments = nil + model.PrimaryNetworkAttachment = nil + model.NetworkInterfaces = nil + model.PrimaryNetworkInterface = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot + err = vpcv1.UnmarshalInstanceTemplatePrototypeInstanceTemplateBySourceSnapshot(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceTemplatePrototypeInstanceTemplateBySourceTemplate successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceTemplatePrototypeInstanceTemplateBySourceTemplate) + model.AvailabilityPolicy = nil + model.DefaultTrustedProfile = nil + model.Keys = nil + model.MetadataService = nil + model.Name = core.StringPtr("my-instance") + model.PlacementTarget = nil + model.Profile = nil + model.ReservationAffinity = nil + model.ResourceGroup = nil + model.TotalVolumeBandwidth = core.Int64Ptr(int64(500)) + model.UserData = core.StringPtr("testString") + model.VolumeAttachments = nil + model.VPC = nil + model.BootVolumeAttachment = nil + model.CatalogOffering = nil + model.Image = nil + model.NetworkAttachments = nil + model.NetworkInterfaces = nil + model.PrimaryNetworkAttachment = nil + model.PrimaryNetworkInterface = nil + model.SourceTemplate = nil + model.Zone = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceTemplatePrototypeInstanceTemplateBySourceTemplate + err = vpcv1.UnmarshalInstanceTemplatePrototypeInstanceTemplateBySourceTemplate(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalKeyIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.KeyIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:a6b1a881-2ce8-41a3-80fc-36316a73f803") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.KeyIdentityByCRN + err = vpcv1.UnmarshalKeyIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalKeyIdentityByFingerprint successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.KeyIdentityByFingerprint) + model.Fingerprint = core.StringPtr("SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.KeyIdentityByFingerprint + err = vpcv1.UnmarshalKeyIdentityByFingerprint(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalKeyIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.KeyIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.KeyIdentityByHref + err = vpcv1.UnmarshalKeyIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalKeyIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.KeyIdentityByID) + model.ID = core.StringPtr("a6b1a881-2ce8-41a3-80fc-36316a73f803") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.KeyIdentityByID + err = vpcv1.UnmarshalKeyIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName) + model.Name = core.StringPtr("bucket-27200-lwx4cfvcue") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName + err = vpcv1.UnmarshalLegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerIdentityByCRN + err = vpcv1.UnmarshalLoadBalancerIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerIdentityByHref + err = vpcv1.UnmarshalLoadBalancerIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerIdentityByID) + model.ID = core.StringPtr("dd754295-e9e0-4c9d-bf6c-58fbc59e5727") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerIdentityByID + err = vpcv1.UnmarshalLoadBalancerIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref + err = vpcv1.UnmarshalLoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByID) + model.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByID + err = vpcv1.UnmarshalLoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerListenerIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerListenerIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerListenerIdentityByHref + err = vpcv1.UnmarshalLoadBalancerListenerIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerListenerIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerListenerIdentityByID) + model.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerListenerIdentityByID + err = vpcv1.UnmarshalLoadBalancerListenerIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch) + model.HTTPStatusCode = core.Int64Ptr(int64(301)) + model.Listener = nil + model.URI = core.StringPtr("/example?doc=get") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch + err = vpcv1.UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch) + model.HTTPStatusCode = core.Int64Ptr(int64(301)) + model.URL = core.StringPtr("https://www.example.com") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch + err = vpcv1.UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity) + model.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity + err = vpcv1.UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype) + model.HTTPStatusCode = core.Int64Ptr(int64(301)) + model.Listener = nil + model.URI = core.StringPtr("/example?doc=get") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype + err = vpcv1.UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype) + model.HTTPStatusCode = core.Int64Ptr(int64(301)) + model.URL = core.StringPtr("https://www.example.com") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype + err = vpcv1.UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity) + model.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity + err = vpcv1.UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref + err = vpcv1.UnmarshalLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerPoolIdentityLoadBalancerPoolIdentityByID) + model.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerPoolIdentityLoadBalancerPoolIdentityByID + err = vpcv1.UnmarshalLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerPoolMemberTargetPrototypeIP successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeIP) + model.Address = core.StringPtr("192.168.3.4") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerPoolMemberTargetPrototypeIP + err = vpcv1.UnmarshalLoadBalancerPoolMemberTargetPrototypeIP(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerPoolMemberTargetPrototypeInstanceIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentity) + model.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentity + err = vpcv1.UnmarshalLoadBalancerPoolMemberTargetPrototypeInstanceIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerProfileIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerProfileIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerProfileIdentityByHref + err = vpcv1.UnmarshalLoadBalancerProfileIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerProfileIdentityByName successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerProfileIdentityByName) + model.Name = core.StringPtr("network-fixed") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerProfileIdentityByName + err = vpcv1.UnmarshalLoadBalancerProfileIdentityByName(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalNetworkACLIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.NetworkACLIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.NetworkACLIdentityByCRN + err = vpcv1.UnmarshalNetworkACLIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalNetworkACLIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.NetworkACLIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.NetworkACLIdentityByHref + err = vpcv1.UnmarshalNetworkACLIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalNetworkACLIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.NetworkACLIdentityByID) + model.ID = core.StringPtr("r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.NetworkACLIdentityByID + err = vpcv1.UnmarshalNetworkACLIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalNetworkACLPrototypeNetworkACLByRules successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.NetworkACLPrototypeNetworkACLByRules) + model.Name = core.StringPtr("my-network-acl") + model.ResourceGroup = nil + model.VPC = nil + model.Rules = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.NetworkACLPrototypeNetworkACLByRules + err = vpcv1.UnmarshalNetworkACLPrototypeNetworkACLByRules(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalNetworkACLPrototypeNetworkACLBySourceNetworkACL successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.NetworkACLPrototypeNetworkACLBySourceNetworkACL) + model.Name = core.StringPtr("my-network-acl") + model.ResourceGroup = nil + model.VPC = nil + model.SourceNetworkACL = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.NetworkACLPrototypeNetworkACLBySourceNetworkACL + err = vpcv1.UnmarshalNetworkACLPrototypeNetworkACLBySourceNetworkACL(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalNetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref + err = vpcv1.UnmarshalNetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalNetworkACLRuleBeforePatchNetworkACLRuleIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.NetworkACLRuleBeforePatchNetworkACLRuleIdentityByID) + model.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.NetworkACLRuleBeforePatchNetworkACLRuleIdentityByID + err = vpcv1.UnmarshalNetworkACLRuleBeforePatchNetworkACLRuleIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalNetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref + err = vpcv1.UnmarshalNetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalNetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID) + model.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID + err = vpcv1.UnmarshalNetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype) + model.Action = core.StringPtr("allow") + model.Destination = core.StringPtr("192.168.3.2/32") + model.Direction = core.StringPtr("inbound") + model.IPVersion = core.StringPtr("ipv4") + model.Name = core.StringPtr("my-rule-2") + model.Source = core.StringPtr("192.168.3.2/32") + model.Protocol = core.StringPtr("all") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype + err = vpcv1.UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpPrototype) + model.Action = core.StringPtr("allow") + model.Destination = core.StringPtr("192.168.3.2/32") + model.Direction = core.StringPtr("inbound") + model.IPVersion = core.StringPtr("ipv4") + model.Name = core.StringPtr("my-rule-2") + model.Source = core.StringPtr("192.168.3.2/32") + model.Code = core.Int64Ptr(int64(0)) + model.Protocol = core.StringPtr("icmp") + model.Type = core.Int64Ptr(int64(8)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpPrototype + err = vpcv1.UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototype) + model.Action = core.StringPtr("allow") + model.Destination = core.StringPtr("192.168.3.2/32") + model.Direction = core.StringPtr("inbound") + model.IPVersion = core.StringPtr("ipv4") + model.Name = core.StringPtr("my-rule-2") + model.Source = core.StringPtr("192.168.3.2/32") + model.DestinationPortMax = core.Int64Ptr(int64(22)) + model.DestinationPortMin = core.Int64Ptr(int64(22)) + model.Protocol = core.StringPtr("udp") + model.SourcePortMax = core.Int64Ptr(int64(65535)) + model.SourcePortMin = core.Int64Ptr(int64(49152)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototype + err = vpcv1.UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype) + model.Action = core.StringPtr("allow") + model.Before = nil + model.Destination = core.StringPtr("192.168.3.2/32") + model.Direction = core.StringPtr("inbound") + model.IPVersion = core.StringPtr("ipv4") + model.Name = core.StringPtr("my-rule-2") + model.Source = core.StringPtr("192.168.3.2/32") + model.Protocol = core.StringPtr("all") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype + err = vpcv1.UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototype) + model.Action = core.StringPtr("allow") + model.Before = nil + model.Destination = core.StringPtr("192.168.3.2/32") + model.Direction = core.StringPtr("inbound") + model.IPVersion = core.StringPtr("ipv4") + model.Name = core.StringPtr("my-rule-2") + model.Source = core.StringPtr("192.168.3.2/32") + model.Code = core.Int64Ptr(int64(0)) + model.Protocol = core.StringPtr("icmp") + model.Type = core.Int64Ptr(int64(8)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototype + err = vpcv1.UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototype) + model.Action = core.StringPtr("allow") + model.Before = nil + model.Destination = core.StringPtr("192.168.3.2/32") + model.Direction = core.StringPtr("inbound") + model.IPVersion = core.StringPtr("ipv4") + model.Name = core.StringPtr("my-rule-2") + model.Source = core.StringPtr("192.168.3.2/32") + model.DestinationPortMax = core.Int64Ptr(int64(22)) + model.DestinationPortMin = core.Int64Ptr(int64(22)) + model.Protocol = core.StringPtr("udp") + model.SourcePortMax = core.Int64Ptr(int64(65535)) + model.SourcePortMin = core.Int64Ptr(int64(49152)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototype + err = vpcv1.UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalNetworkInterfaceIPPrototypeReservedIPIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.NetworkInterfaceIPPrototypeReservedIPIdentity) + model.ID = core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.NetworkInterfaceIPPrototypeReservedIPIdentity + err = vpcv1.UnmarshalNetworkInterfaceIPPrototypeReservedIPIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalNetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext) + model.Address = core.StringPtr("192.168.3.4") + model.AutoDelete = core.BoolPtr(false) + model.Name = core.StringPtr("my-reserved-ip") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext + err = vpcv1.UnmarshalNetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalOperatingSystemIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.OperatingSystemIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.OperatingSystemIdentityByHref + err = vpcv1.UnmarshalOperatingSystemIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalOperatingSystemIdentityByName successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.OperatingSystemIdentityByName) + model.Name = core.StringPtr("ubuntu-16-amd64") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.OperatingSystemIdentityByName + err = vpcv1.UnmarshalOperatingSystemIdentityByName(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.PublicGatewayFloatingIPPrototypeFloatingIPIdentity) + model.ID = core.StringPtr("39300233-9995-4806-89a5-3c1b6eb88689") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689") + model.Address = core.StringPtr("203.0.113.1") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.PublicGatewayFloatingIPPrototypeFloatingIPIdentity + err = vpcv1.UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext) + model.Name = core.StringPtr("my-floating-ip") + model.ResourceGroup = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext + err = vpcv1.UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalPublicGatewayIdentityPublicGatewayIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.PublicGatewayIdentityPublicGatewayIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.PublicGatewayIdentityPublicGatewayIdentityByCRN + err = vpcv1.UnmarshalPublicGatewayIdentityPublicGatewayIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalPublicGatewayIdentityPublicGatewayIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.PublicGatewayIdentityPublicGatewayIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.PublicGatewayIdentityPublicGatewayIdentityByHref + err = vpcv1.UnmarshalPublicGatewayIdentityPublicGatewayIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalPublicGatewayIdentityPublicGatewayIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.PublicGatewayIdentityPublicGatewayIdentityByID) + model.ID = core.StringPtr("dc5431ef-1fc6-4861-adc9-a59d077d1241") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.PublicGatewayIdentityPublicGatewayIdentityByID + err = vpcv1.UnmarshalPublicGatewayIdentityPublicGatewayIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalRegionIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.RegionIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/regions/us-south") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.RegionIdentityByHref + err = vpcv1.UnmarshalRegionIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalRegionIdentityByName successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.RegionIdentityByName) + model.Name = core.StringPtr("us-south") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.RegionIdentityByName + err = vpcv1.UnmarshalRegionIdentityByName(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalReservationIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ReservationIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ReservationIdentityByCRN + err = vpcv1.UnmarshalReservationIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalReservationIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ReservationIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ReservationIdentityByHref + err = vpcv1.UnmarshalReservationIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalReservationIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ReservationIdentityByID) + model.ID = core.StringPtr("7187-ba49df72-37b8-43ac-98da-f8e029de0e63") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ReservationIdentityByID + err = vpcv1.UnmarshalReservationIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalReservedIPTargetPrototypeEndpointGatewayIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ReservedIPTargetPrototypeEndpointGatewayIdentity) + model.ID = core.StringPtr("r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ReservedIPTargetPrototypeEndpointGatewayIdentity + err = vpcv1.UnmarshalReservedIPTargetPrototypeEndpointGatewayIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalReservedIPTargetPrototypeVirtualNetworkInterfaceIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentity) + model.ID = core.StringPtr("0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentity + err = vpcv1.UnmarshalReservedIPTargetPrototypeVirtualNetworkInterfaceIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalResourceGroupIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ResourceGroupIdentityByID) + model.ID = core.StringPtr("fee82deba12e4c0fb69c3b09d1f12345") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ResourceGroupIdentityByID + err = vpcv1.UnmarshalResourceGroupIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalRouteNextHopPatchRouteNextHopIP successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.RouteNextHopPatchRouteNextHopIP) + model.Address = core.StringPtr("0.0.0.0") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.RouteNextHopPatchRouteNextHopIP + err = vpcv1.UnmarshalRouteNextHopPatchRouteNextHopIP(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalRouteNextHopPatchVPNGatewayConnectionIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.RouteNextHopPatchVPNGatewayConnectionIdentity) + model.ID = core.StringPtr("a10a5771-dc23-442c-8460-c3601d8542f7") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.RouteNextHopPatchVPNGatewayConnectionIdentity + err = vpcv1.UnmarshalRouteNextHopPatchVPNGatewayConnectionIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalRoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP) + model.Address = core.StringPtr("0.0.0.0") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP + err = vpcv1.UnmarshalRoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalRoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity) + model.ID = core.StringPtr("a10a5771-dc23-442c-8460-c3601d8542f7") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity + err = vpcv1.UnmarshalRoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalRoutingTableIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.RoutingTableIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.RoutingTableIdentityByHref + err = vpcv1.UnmarshalRoutingTableIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalRoutingTableIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.RoutingTableIdentityByID) + model.ID = core.StringPtr("r006-6885e83f-03b2-4603-8a86-db2a0f55c840") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.RoutingTableIdentityByID + err = vpcv1.UnmarshalRoutingTableIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSecurityGroupIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SecurityGroupIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SecurityGroupIdentityByCRN + err = vpcv1.UnmarshalSecurityGroupIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSecurityGroupIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SecurityGroupIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SecurityGroupIdentityByHref + err = vpcv1.UnmarshalSecurityGroupIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSecurityGroupIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SecurityGroupIdentityByID) + model.ID = core.StringPtr("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SecurityGroupIdentityByID + err = vpcv1.UnmarshalSecurityGroupIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSecurityGroupRuleLocalPatchCIDR successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SecurityGroupRuleLocalPatchCIDR) + model.CIDRBlock = core.StringPtr("192.168.3.0/24") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SecurityGroupRuleLocalPatchCIDR + err = vpcv1.UnmarshalSecurityGroupRuleLocalPatchCIDR(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSecurityGroupRuleLocalPatchIP successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SecurityGroupRuleLocalPatchIP) + model.Address = core.StringPtr("192.168.3.4") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SecurityGroupRuleLocalPatchIP + err = vpcv1.UnmarshalSecurityGroupRuleLocalPatchIP(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSecurityGroupRuleLocalPrototypeCIDR successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SecurityGroupRuleLocalPrototypeCIDR) + model.CIDRBlock = core.StringPtr("192.168.3.0/24") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SecurityGroupRuleLocalPrototypeCIDR + err = vpcv1.UnmarshalSecurityGroupRuleLocalPrototypeCIDR(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSecurityGroupRuleLocalPrototypeIP successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SecurityGroupRuleLocalPrototypeIP) + model.Address = core.StringPtr("192.168.3.4") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SecurityGroupRuleLocalPrototypeIP + err = vpcv1.UnmarshalSecurityGroupRuleLocalPrototypeIP(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll) + model.Direction = core.StringPtr("inbound") + model.IPVersion = core.StringPtr("ipv4") + model.Local = nil + model.Protocol = core.StringPtr("all") + model.Remote = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll + err = vpcv1.UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp) + model.Code = core.Int64Ptr(int64(0)) + model.Direction = core.StringPtr("inbound") + model.IPVersion = core.StringPtr("ipv4") + model.Local = nil + model.Protocol = core.StringPtr("icmp") + model.Remote = nil + model.Type = core.Int64Ptr(int64(8)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp + err = vpcv1.UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp) + model.Direction = core.StringPtr("inbound") + model.IPVersion = core.StringPtr("ipv4") + model.Local = nil + model.PortMax = core.Int64Ptr(int64(22)) + model.PortMin = core.Int64Ptr(int64(22)) + model.Protocol = core.StringPtr("udp") + model.Remote = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp + err = vpcv1.UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSecurityGroupRuleRemotePatchCIDR successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SecurityGroupRuleRemotePatchCIDR) + model.CIDRBlock = core.StringPtr("192.168.3.0/24") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SecurityGroupRuleRemotePatchCIDR + err = vpcv1.UnmarshalSecurityGroupRuleRemotePatchCIDR(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSecurityGroupRuleRemotePatchIP successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SecurityGroupRuleRemotePatchIP) + model.Address = core.StringPtr("192.168.3.4") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SecurityGroupRuleRemotePatchIP + err = vpcv1.UnmarshalSecurityGroupRuleRemotePatchIP(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSecurityGroupRuleRemotePatchSecurityGroupIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SecurityGroupRuleRemotePatchSecurityGroupIdentity) + model.ID = core.StringPtr("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SecurityGroupRuleRemotePatchSecurityGroupIdentity + err = vpcv1.UnmarshalSecurityGroupRuleRemotePatchSecurityGroupIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSecurityGroupRuleRemotePrototypeCIDR successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SecurityGroupRuleRemotePrototypeCIDR) + model.CIDRBlock = core.StringPtr("192.168.3.0/24") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SecurityGroupRuleRemotePrototypeCIDR + err = vpcv1.UnmarshalSecurityGroupRuleRemotePrototypeCIDR(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSecurityGroupRuleRemotePrototypeIP successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SecurityGroupRuleRemotePrototypeIP) + model.Address = core.StringPtr("192.168.3.4") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SecurityGroupRuleRemotePrototypeIP + err = vpcv1.UnmarshalSecurityGroupRuleRemotePrototypeIP(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSecurityGroupRuleRemotePrototypeSecurityGroupIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SecurityGroupRuleRemotePrototypeSecurityGroupIdentity) + model.ID = core.StringPtr("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SecurityGroupRuleRemotePrototypeSecurityGroupIdentity + err = vpcv1.UnmarshalSecurityGroupRuleRemotePrototypeSecurityGroupIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalShareIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ShareIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ShareIdentityByCRN + err = vpcv1.UnmarshalShareIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalShareIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ShareIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ShareIdentityByHref + err = vpcv1.UnmarshalShareIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalShareIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ShareIdentityByID) + model.ID = core.StringPtr("0fe9e5d8-0a4d-4818-96ec-e99708644a58") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ShareIdentityByID + err = vpcv1.UnmarshalShareIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup) + model.Name = core.StringPtr("my-share-mount-target") + model.TransitEncryption = core.StringPtr("none") + model.VirtualNetworkInterface = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup + err = vpcv1.UnmarshalShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC) + model.Name = core.StringPtr("my-share-mount-target") + model.TransitEncryption = core.StringPtr("none") + model.VPC = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC + err = vpcv1.UnmarshalShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentity) + model.ID = core.StringPtr("0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentity + err = vpcv1.UnmarshalShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext) + model.AllowIPSpoofing = core.BoolPtr(true) + model.AutoDelete = core.BoolPtr(false) + model.EnableInfrastructureNat = core.BoolPtr(true) + model.Ips = nil + model.Name = core.StringPtr("my-virtual-network-interface") + model.PrimaryIP = nil + model.ResourceGroup = nil + model.SecurityGroups = nil + model.Subnet = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext + err = vpcv1.UnmarshalShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalShareProfileIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ShareProfileIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ShareProfileIdentityByHref + err = vpcv1.UnmarshalShareProfileIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalShareProfileIdentityByName successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ShareProfileIdentityByName) + model.Name = core.StringPtr("tier-3iops") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ShareProfileIdentityByName + err = vpcv1.UnmarshalShareProfileIdentityByName(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSharePrototypeShareBySize successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SharePrototypeShareBySize) + model.Iops = core.Int64Ptr(int64(100)) + model.MountTargets = nil + model.Name = core.StringPtr("my-share") + model.Profile = nil + model.ReplicaShare = nil + model.UserTags = nil + model.Zone = nil + model.AccessControlMode = core.StringPtr("security_group") + model.EncryptionKey = nil + model.InitialOwner = nil + model.ResourceGroup = nil + model.Size = core.Int64Ptr(int64(200)) + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SharePrototypeShareBySize + err = vpcv1.UnmarshalSharePrototypeShareBySize(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSharePrototypeShareBySourceShare successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SharePrototypeShareBySourceShare) + model.Iops = core.Int64Ptr(int64(100)) + model.MountTargets = nil + model.Name = core.StringPtr("my-share") + model.Profile = nil + model.ReplicaShare = nil + model.UserTags = nil + model.Zone = nil + model.EncryptionKey = nil + model.ReplicationCronSpec = core.StringPtr("0 */5 * * *") + model.ResourceGroup = nil + model.SourceShare = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SharePrototypeShareBySourceShare + err = vpcv1.UnmarshalSharePrototypeShareBySourceShare(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots) + model.DeleteSnapshotsOnDelete = core.BoolPtr(true) + model.Name = core.StringPtr("my-snapshot-consistency-group") + model.ResourceGroup = nil + model.Snapshots = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots + err = vpcv1.UnmarshalSnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSnapshotIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SnapshotIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SnapshotIdentityByCRN + err = vpcv1.UnmarshalSnapshotIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSnapshotIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SnapshotIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SnapshotIdentityByHref + err = vpcv1.UnmarshalSnapshotIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSnapshotIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SnapshotIdentityByID) + model.ID = core.StringPtr("r134-f6bfa329-0e36-433f-a3bb-0df632e79263") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SnapshotIdentityByID + err = vpcv1.UnmarshalSnapshotIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSnapshotPrototypeSnapshotBySourceSnapshot successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SnapshotPrototypeSnapshotBySourceSnapshot) + model.Clones = nil + model.Name = core.StringPtr("my-snapshot") + model.ResourceGroup = nil + model.UserTags = nil + model.EncryptionKey = nil + model.SourceSnapshot = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SnapshotPrototypeSnapshotBySourceSnapshot + err = vpcv1.UnmarshalSnapshotPrototypeSnapshotBySourceSnapshot(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSnapshotPrototypeSnapshotBySourceVolume successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SnapshotPrototypeSnapshotBySourceVolume) + model.Clones = nil + model.Name = core.StringPtr("my-snapshot") + model.ResourceGroup = nil + model.UserTags = nil + model.SourceVolume = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SnapshotPrototypeSnapshotBySourceVolume + err = vpcv1.UnmarshalSnapshotPrototypeSnapshotBySourceVolume(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSubnetIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SubnetIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SubnetIdentityByCRN + err = vpcv1.UnmarshalSubnetIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSubnetIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SubnetIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SubnetIdentityByHref + err = vpcv1.UnmarshalSubnetIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSubnetIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SubnetIdentityByID) + model.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SubnetIdentityByID + err = vpcv1.UnmarshalSubnetIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSubnetPrototypeSubnetByCIDR successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SubnetPrototypeSubnetByCIDR) + model.IPVersion = core.StringPtr("ipv4") + model.Name = core.StringPtr("my-subnet") + model.NetworkACL = nil + model.PublicGateway = nil + model.ResourceGroup = nil + model.RoutingTable = nil + model.VPC = nil + model.Ipv4CIDRBlock = core.StringPtr("10.0.0.0/24") + model.Zone = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SubnetPrototypeSubnetByCIDR + err = vpcv1.UnmarshalSubnetPrototypeSubnetByCIDR(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSubnetPrototypeSubnetByTotalCount successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SubnetPrototypeSubnetByTotalCount) + model.IPVersion = core.StringPtr("ipv4") + model.Name = core.StringPtr("my-subnet") + model.NetworkACL = nil + model.PublicGateway = nil + model.ResourceGroup = nil + model.RoutingTable = nil + model.VPC = nil + model.TotalIpv4AddressCount = core.Int64Ptr(int64(256)) + model.Zone = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SubnetPrototypeSubnetByTotalCount + err = vpcv1.UnmarshalSubnetPrototypeSubnetByTotalCount(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSubnetPublicGatewayPatchPublicGatewayIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SubnetPublicGatewayPatchPublicGatewayIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SubnetPublicGatewayPatchPublicGatewayIdentityByCRN + err = vpcv1.UnmarshalSubnetPublicGatewayPatchPublicGatewayIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSubnetPublicGatewayPatchPublicGatewayIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SubnetPublicGatewayPatchPublicGatewayIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SubnetPublicGatewayPatchPublicGatewayIdentityByHref + err = vpcv1.UnmarshalSubnetPublicGatewayPatchPublicGatewayIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSubnetPublicGatewayPatchPublicGatewayIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SubnetPublicGatewayPatchPublicGatewayIdentityByID) + model.ID = core.StringPtr("dc5431ef-1fc6-4861-adc9-a59d077d1241") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SubnetPublicGatewayPatchPublicGatewayIdentityByID + err = vpcv1.UnmarshalSubnetPublicGatewayPatchPublicGatewayIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalTrustedProfileIdentityTrustedProfileByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.TrustedProfileIdentityTrustedProfileByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:iam-identity::a/aa2432b1fa4d4ace891e9b80fc104e34::profile:Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.TrustedProfileIdentityTrustedProfileByCRN + err = vpcv1.UnmarshalTrustedProfileIdentityTrustedProfileByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalTrustedProfileIdentityTrustedProfileByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.TrustedProfileIdentityTrustedProfileByID) + model.ID = core.StringPtr("Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.TrustedProfileIdentityTrustedProfileByID + err = vpcv1.UnmarshalTrustedProfileIdentityTrustedProfileByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVpcdnsResolverPrototypeVpcdnsResolverTypeManualPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VpcdnsResolverPrototypeVpcdnsResolverTypeManualPrototype) + model.ManualServers = nil + model.Type = core.StringPtr("manual") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VpcdnsResolverPrototypeVpcdnsResolverTypeManualPrototype + err = vpcv1.UnmarshalVpcdnsResolverPrototypeVpcdnsResolverTypeManualPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVpcdnsResolverPrototypeVpcdnsResolverTypeSystemPrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VpcdnsResolverPrototypeVpcdnsResolverTypeSystemPrototype) + model.Type = core.StringPtr("system") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VpcdnsResolverPrototypeVpcdnsResolverTypeSystemPrototype + err = vpcv1.UnmarshalVpcdnsResolverPrototypeVpcdnsResolverTypeSystemPrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVpcdnsResolverVPCPatchVPCIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VpcdnsResolverVPCPatchVPCIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VpcdnsResolverVPCPatchVPCIdentityByCRN + err = vpcv1.UnmarshalVpcdnsResolverVPCPatchVPCIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVpcdnsResolverVPCPatchVPCIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VpcdnsResolverVPCPatchVPCIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VpcdnsResolverVPCPatchVPCIdentityByHref + err = vpcv1.UnmarshalVpcdnsResolverVPCPatchVPCIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVpcdnsResolverVPCPatchVPCIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VpcdnsResolverVPCPatchVPCIdentityByID) + model.ID = core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VpcdnsResolverVPCPatchVPCIdentityByID + err = vpcv1.UnmarshalVpcdnsResolverVPCPatchVPCIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPCIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPCIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPCIdentityByCRN + err = vpcv1.UnmarshalVPCIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPCIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPCIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPCIdentityByHref + err = vpcv1.UnmarshalVPCIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPCIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPCIdentityByID) + model.ID = core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPCIdentityByID + err = vpcv1.UnmarshalVPCIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn) + model.Type = core.StringPtr("fqdn") + model.Value = core.StringPtr("my-service.example.com") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn + err = vpcv1.UnmarshalVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityHostname successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityHostname) + model.Type = core.StringPtr("fqdn") + model.Value = core.StringPtr("my-hostname") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityHostname + err = vpcv1.UnmarshalVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityHostname(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityIPv4 successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityIPv4) + model.Type = core.StringPtr("fqdn") + model.Value = core.StringPtr("192.168.3.4") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityIPv4 + err = vpcv1.UnmarshalVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityIPv4(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityKeyID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityKeyID) + model.Type = core.StringPtr("fqdn") + model.Value = core.StringPtr("qQ+/YEApnl1ZtEgIrfprzb065307thTkzlnLqL5ICpesdbBN03dyCQ==") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityKeyID + err = vpcv1.UnmarshalVPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityKeyID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref + err = vpcv1.UnmarshalVPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID) + model.ID = core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID + err = vpcv1.UnmarshalVPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref + err = vpcv1.UnmarshalVPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID) + model.ID = core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID + err = vpcv1.UnmarshalVPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref + err = vpcv1.UnmarshalVPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID) + model.ID = core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID + err = vpcv1.UnmarshalVPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref + err = vpcv1.UnmarshalVPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID) + model.ID = core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID + err = vpcv1.UnmarshalVPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch) + model.Address = core.StringPtr("169.21.50.5") + model.Fqdn = core.StringPtr("my-service.example.com") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch + err = vpcv1.UnmarshalVPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch) + model.Address = core.StringPtr("169.21.50.5") + model.Fqdn = core.StringPtr("my-service.example.com") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch + err = vpcv1.UnmarshalVPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress) + model.CIDRs = []string{"10.45.1.0/24"} + model.IkeIdentity = nil + model.Address = core.StringPtr("169.21.50.5") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress + err = vpcv1.UnmarshalVPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFqdn successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFqdn) + model.CIDRs = []string{"10.45.1.0/24"} + model.IkeIdentity = nil + model.Fqdn = core.StringPtr("my-service.example.com") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFqdn + err = vpcv1.UnmarshalVPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFqdn(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype) + model.AdminStateUp = core.BoolPtr(true) + model.DeadPeerDetection = nil + model.EstablishMode = core.StringPtr("bidirectional") + model.IkePolicy = nil + model.IpsecPolicy = nil + model.Name = core.StringPtr("my-vpn-connection") + model.Psk = core.StringPtr("lkj14b1oi0alcniejkso") + model.Local = nil + model.Peer = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype + err = vpcv1.UnmarshalVPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype) + model.AdminStateUp = core.BoolPtr(true) + model.DeadPeerDetection = nil + model.EstablishMode = core.StringPtr("bidirectional") + model.IkePolicy = nil + model.IpsecPolicy = nil + model.Name = core.StringPtr("my-vpn-connection") + model.Psk = core.StringPtr("lkj14b1oi0alcniejkso") + model.Local = nil + model.Peer = nil + model.RoutingProtocol = core.StringPtr("none") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype + err = vpcv1.UnmarshalVPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress) + model.IkeIdentity = nil + model.Address = core.StringPtr("169.21.50.5") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress + err = vpcv1.UnmarshalVPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn) + model.IkeIdentity = nil + model.Fqdn = core.StringPtr("my-service.example.com") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn + err = vpcv1.UnmarshalVPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayPrototypeVPNGatewayPolicyModePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayPrototypeVPNGatewayPolicyModePrototype) + model.Name = core.StringPtr("my-vpn-gateway") + model.ResourceGroup = nil + model.Subnet = nil + model.Mode = core.StringPtr("policy") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayPrototypeVPNGatewayPolicyModePrototype + err = vpcv1.UnmarshalVPNGatewayPrototypeVPNGatewayPolicyModePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayPrototypeVPNGatewayRouteModePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayPrototypeVPNGatewayRouteModePrototype) + model.Name = core.StringPtr("my-vpn-gateway") + model.ResourceGroup = nil + model.Subnet = nil + model.Mode = core.StringPtr("route") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayPrototypeVPNGatewayRouteModePrototype + err = vpcv1.UnmarshalVPNGatewayPrototypeVPNGatewayRouteModePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNServerAuthenticationByUsernameIDProviderByIam successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNServerAuthenticationByUsernameIDProviderByIam) + model.ProviderType = core.StringPtr("iam") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNServerAuthenticationByUsernameIDProviderByIam + err = vpcv1.UnmarshalVPNServerAuthenticationByUsernameIDProviderByIam(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype) + model.Method = core.StringPtr("certificate") + model.ClientCa = nil + model.Crl = core.StringPtr("testString") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype + err = vpcv1.UnmarshalVPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype) + model.Method = core.StringPtr("username") + model.IdentityProvider = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype + err = vpcv1.UnmarshalVPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContext successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContext) + model.ID = core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContext + err = vpcv1.UnmarshalVirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContext(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext) + model.Address = core.StringPtr("192.168.3.4") + model.AutoDelete = core.BoolPtr(false) + model.Name = core.StringPtr("my-reserved-ip") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext + err = vpcv1.UnmarshalVirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext) + model.ID = core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext + err = vpcv1.UnmarshalVirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext) + model.Address = core.StringPtr("192.168.3.4") + model.AutoDelete = core.BoolPtr(false) + model.Name = core.StringPtr("my-reserved-ip") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext + err = vpcv1.UnmarshalVirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVolumeAttachmentPrototypeVolumeVolumeIdentity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VolumeAttachmentPrototypeVolumeVolumeIdentity) + model.ID = core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VolumeAttachmentPrototypeVolumeVolumeIdentity + err = vpcv1.UnmarshalVolumeAttachmentPrototypeVolumeVolumeIdentity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext) + model.Iops = core.Int64Ptr(int64(10000)) + model.Name = core.StringPtr("my-volume") + model.Profile = nil + model.ResourceGroup = nil + model.UserTags = nil + model.Capacity = core.Int64Ptr(int64(100)) + model.EncryptionKey = nil + model.SourceSnapshot = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext + err = vpcv1.UnmarshalVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVolumeIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VolumeIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VolumeIdentityByCRN + err = vpcv1.UnmarshalVolumeIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVolumeIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VolumeIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VolumeIdentityByHref + err = vpcv1.UnmarshalVolumeIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVolumeIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VolumeIdentityByID) + model.ID = core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VolumeIdentityByID + err = vpcv1.UnmarshalVolumeIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVolumeProfileIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VolumeProfileIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VolumeProfileIdentityByHref + err = vpcv1.UnmarshalVolumeProfileIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVolumeProfileIdentityByName successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VolumeProfileIdentityByName) + model.Name = core.StringPtr("general-purpose") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VolumeProfileIdentityByName + err = vpcv1.UnmarshalVolumeProfileIdentityByName(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVolumePrototypeVolumeByCapacity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VolumePrototypeVolumeByCapacity) + model.Iops = core.Int64Ptr(int64(10000)) + model.Name = core.StringPtr("my-volume") + model.Profile = nil + model.ResourceGroup = nil + model.UserTags = nil + model.Zone = nil + model.Capacity = core.Int64Ptr(int64(100)) + model.EncryptionKey = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VolumePrototypeVolumeByCapacity + err = vpcv1.UnmarshalVolumePrototypeVolumeByCapacity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVolumePrototypeVolumeBySourceSnapshot successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VolumePrototypeVolumeBySourceSnapshot) + model.Iops = core.Int64Ptr(int64(10000)) + model.Name = core.StringPtr("my-volume") + model.Profile = nil + model.ResourceGroup = nil + model.UserTags = nil + model.Zone = nil + model.Capacity = core.Int64Ptr(int64(100)) + model.EncryptionKey = nil + model.SourceSnapshot = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VolumePrototypeVolumeBySourceSnapshot + err = vpcv1.UnmarshalVolumePrototypeVolumeBySourceSnapshot(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalZoneIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ZoneIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ZoneIdentityByHref + err = vpcv1.UnmarshalZoneIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalZoneIdentityByName successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ZoneIdentityByName) + model.Name = core.StringPtr("us-south-1") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ZoneIdentityByName + err = vpcv1.UnmarshalZoneIdentityByName(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN + err = vpcv1.UnmarshalBackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN + err = vpcv1.UnmarshalBareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref + err = vpcv1.UnmarshalBareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalBareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID) + model.ID = core.StringPtr("0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID + err = vpcv1.UnmarshalBareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalEndpointGatewayReservedIPReservedIPIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.EndpointGatewayReservedIPReservedIPIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.EndpointGatewayReservedIPReservedIPIdentityByHref + err = vpcv1.UnmarshalEndpointGatewayReservedIPReservedIPIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalEndpointGatewayReservedIPReservedIPIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.EndpointGatewayReservedIPReservedIPIdentityByID) + model.ID = core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.EndpointGatewayReservedIPReservedIPIdentityByID + err = vpcv1.UnmarshalEndpointGatewayReservedIPReservedIPIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalEndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN) + model.ResourceType = core.StringPtr("provider_cloud_service") + model.CRN = core.StringPtr("crn:v1:bluemix:public:cloudant:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:3527280b-9327-4411-8020-591092e60353::") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN + err = vpcv1.UnmarshalEndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalEndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName) + model.ResourceType = core.StringPtr("provider_cloud_service") + model.Name = core.StringPtr("ibm-ntp-server") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName + err = vpcv1.UnmarshalEndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref + err = vpcv1.UnmarshalFloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByID) + model.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByID + err = vpcv1.UnmarshalFloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref + err = vpcv1.UnmarshalFloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByID) + model.ID = core.StringPtr("0717-10c02d81-0ecb-4dc5-897d-28392913b81e") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByID + err = vpcv1.UnmarshalFloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN + err = vpcv1.UnmarshalFloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref + err = vpcv1.UnmarshalFloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID) + model.ID = core.StringPtr("0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID + err = vpcv1.UnmarshalFloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref + err = vpcv1.UnmarshalFloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByID) + model.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByID + err = vpcv1.UnmarshalFloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref + err = vpcv1.UnmarshalFloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID) + model.ID = core.StringPtr("0717-10c02d81-0ecb-4dc5-897d-28392913b81e") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID + err = vpcv1.UnmarshalFloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN + err = vpcv1.UnmarshalFloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref + err = vpcv1.UnmarshalFloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID) + model.ID = core.StringPtr("0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID + err = vpcv1.UnmarshalFloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN + err = vpcv1.UnmarshalFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref + err = vpcv1.UnmarshalFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID) + model.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID + err = vpcv1.UnmarshalFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref + err = vpcv1.UnmarshalFlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByID) + model.ID = core.StringPtr("0717-d54eb633-98ea-459d-aa00-6a8e780175a7") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByID + err = vpcv1.UnmarshalFlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref + err = vpcv1.UnmarshalFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID) + model.ID = core.StringPtr("0717-10c02d81-0ecb-4dc5-897d-28392913b81e") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID + err = vpcv1.UnmarshalFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN + err = vpcv1.UnmarshalFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref + err = vpcv1.UnmarshalFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID) + model.ID = core.StringPtr("0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID + err = vpcv1.UnmarshalFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN + err = vpcv1.UnmarshalFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref + err = vpcv1.UnmarshalFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID) + model.ID = core.StringPtr("r006-4727d842-f94f-4a2d-824a-9bc9b02c523b") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID + err = vpcv1.UnmarshalFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN + err = vpcv1.UnmarshalFlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref + err = vpcv1.UnmarshalFlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalFlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID) + model.ID = core.StringPtr("0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID + err = vpcv1.UnmarshalFlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec) + model.Name = core.StringPtr("my-instance-group-manager-action") + model.CronSpec = core.StringPtr("30 */2 * * 1-5") + model.Group = nil + model.Manager = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec + err = vpcv1.UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt) + model.Name = core.StringPtr("my-instance-group-manager-action") + model.RunAt = CreateMockDateTime("2019-01-01T12:00:00.000Z") + model.Group = nil + model.Manager = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt + err = vpcv1.UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref) + model.MaxMembershipCount = core.Int64Ptr(int64(10)) + model.MinMembershipCount = core.Int64Ptr(int64(10)) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref + err = vpcv1.UnmarshalInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID) + model.MaxMembershipCount = core.Int64Ptr(int64(10)) + model.MinMembershipCount = core.Int64Ptr(int64(10)) + model.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID + err = vpcv1.UnmarshalInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN + err = vpcv1.UnmarshalInstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref + err = vpcv1.UnmarshalInstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID) + model.ID = core.StringPtr("0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID + err = vpcv1.UnmarshalInstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN + err = vpcv1.UnmarshalInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref + err = vpcv1.UnmarshalInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID) + model.ID = core.StringPtr("bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID + err = vpcv1.UnmarshalInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN + err = vpcv1.UnmarshalInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref + err = vpcv1.UnmarshalInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID) + model.ID = core.StringPtr("0717-1e09281b-f177-46fb-baf1-bc152b2e391a") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID + err = vpcv1.UnmarshalInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN + err = vpcv1.UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref + err = vpcv1.UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID) + model.ID = core.StringPtr("bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID + err = vpcv1.UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN + err = vpcv1.UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref + err = vpcv1.UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID) + model.ID = core.StringPtr("0717-1e09281b-f177-46fb-baf1-bc152b2e391a") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID + err = vpcv1.UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN + err = vpcv1.UnmarshalInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref + err = vpcv1.UnmarshalInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID) + model.ID = core.StringPtr("r018-418fe842-a3e9-47b9-a938-1aa5bd632871") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID + err = vpcv1.UnmarshalInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment) + model.AvailabilityPolicy = nil + model.DefaultTrustedProfile = nil + model.Keys = nil + model.MetadataService = nil + model.Name = core.StringPtr("my-instance") + model.PlacementTarget = nil + model.Profile = nil + model.ReservationAffinity = nil + model.ResourceGroup = nil + model.TotalVolumeBandwidth = core.Int64Ptr(int64(500)) + model.UserData = core.StringPtr("testString") + model.VolumeAttachments = nil + model.VPC = nil + model.BootVolumeAttachment = nil + model.CatalogOffering = nil + model.Zone = nil + model.NetworkAttachments = nil + model.PrimaryNetworkAttachment = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment + err = vpcv1.UnmarshalInstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface) + model.AvailabilityPolicy = nil + model.DefaultTrustedProfile = nil + model.Keys = nil + model.MetadataService = nil + model.Name = core.StringPtr("my-instance") + model.PlacementTarget = nil + model.Profile = nil + model.ReservationAffinity = nil + model.ResourceGroup = nil + model.TotalVolumeBandwidth = core.Int64Ptr(int64(500)) + model.UserData = core.StringPtr("testString") + model.VolumeAttachments = nil + model.VPC = nil + model.BootVolumeAttachment = nil + model.CatalogOffering = nil + model.Zone = nil + model.NetworkInterfaces = nil + model.PrimaryNetworkInterface = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface + err = vpcv1.UnmarshalInstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment) + model.AvailabilityPolicy = nil + model.DefaultTrustedProfile = nil + model.Keys = nil + model.MetadataService = nil + model.Name = core.StringPtr("my-instance") + model.PlacementTarget = nil + model.Profile = nil + model.ReservationAffinity = nil + model.ResourceGroup = nil + model.TotalVolumeBandwidth = core.Int64Ptr(int64(500)) + model.UserData = core.StringPtr("testString") + model.VolumeAttachments = nil + model.VPC = nil + model.BootVolumeAttachment = nil + model.Image = nil + model.Zone = nil + model.NetworkAttachments = nil + model.PrimaryNetworkAttachment = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment + err = vpcv1.UnmarshalInstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface) + model.AvailabilityPolicy = nil + model.DefaultTrustedProfile = nil + model.Keys = nil + model.MetadataService = nil + model.Name = core.StringPtr("my-instance") + model.PlacementTarget = nil + model.Profile = nil + model.ReservationAffinity = nil + model.ResourceGroup = nil + model.TotalVolumeBandwidth = core.Int64Ptr(int64(500)) + model.UserData = core.StringPtr("testString") + model.VolumeAttachments = nil + model.VPC = nil + model.BootVolumeAttachment = nil + model.Image = nil + model.Zone = nil + model.NetworkInterfaces = nil + model.PrimaryNetworkInterface = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface + err = vpcv1.UnmarshalInstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment) + model.AvailabilityPolicy = nil + model.DefaultTrustedProfile = nil + model.Keys = nil + model.MetadataService = nil + model.Name = core.StringPtr("my-instance") + model.PlacementTarget = nil + model.Profile = nil + model.ReservationAffinity = nil + model.ResourceGroup = nil + model.TotalVolumeBandwidth = core.Int64Ptr(int64(500)) + model.UserData = core.StringPtr("testString") + model.VolumeAttachments = nil + model.VPC = nil + model.BootVolumeAttachment = nil + model.Zone = nil + model.NetworkAttachments = nil + model.PrimaryNetworkAttachment = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment + err = vpcv1.UnmarshalInstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface) + model.AvailabilityPolicy = nil + model.DefaultTrustedProfile = nil + model.Keys = nil + model.MetadataService = nil + model.Name = core.StringPtr("my-instance") + model.PlacementTarget = nil + model.Profile = nil + model.ReservationAffinity = nil + model.ResourceGroup = nil + model.TotalVolumeBandwidth = core.Int64Ptr(int64(500)) + model.UserData = core.StringPtr("testString") + model.VolumeAttachments = nil + model.VPC = nil + model.BootVolumeAttachment = nil + model.Zone = nil + model.NetworkInterfaces = nil + model.PrimaryNetworkInterface = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface + err = vpcv1.UnmarshalInstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment) + model.AvailabilityPolicy = nil + model.DefaultTrustedProfile = nil + model.Keys = nil + model.MetadataService = nil + model.Name = core.StringPtr("my-instance") + model.PlacementTarget = nil + model.Profile = nil + model.ReservationAffinity = nil + model.ResourceGroup = nil + model.TotalVolumeBandwidth = core.Int64Ptr(int64(500)) + model.UserData = core.StringPtr("testString") + model.VolumeAttachments = nil + model.VPC = nil + model.BootVolumeAttachment = nil + model.Zone = nil + model.NetworkAttachments = nil + model.PrimaryNetworkAttachment = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment + err = vpcv1.UnmarshalInstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface) + model.AvailabilityPolicy = nil + model.DefaultTrustedProfile = nil + model.Keys = nil + model.MetadataService = nil + model.Name = core.StringPtr("my-instance") + model.PlacementTarget = nil + model.Profile = nil + model.ReservationAffinity = nil + model.ResourceGroup = nil + model.TotalVolumeBandwidth = core.Int64Ptr(int64(500)) + model.UserData = core.StringPtr("testString") + model.VolumeAttachments = nil + model.VPC = nil + model.BootVolumeAttachment = nil + model.Zone = nil + model.NetworkInterfaces = nil + model.PrimaryNetworkInterface = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface + err = vpcv1.UnmarshalInstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment) + model.AvailabilityPolicy = nil + model.DefaultTrustedProfile = nil + model.Keys = nil + model.MetadataService = nil + model.Name = core.StringPtr("my-instance") + model.PlacementTarget = nil + model.Profile = nil + model.ReservationAffinity = nil + model.ResourceGroup = nil + model.TotalVolumeBandwidth = core.Int64Ptr(int64(500)) + model.UserData = core.StringPtr("testString") + model.VolumeAttachments = nil + model.VPC = nil + model.BootVolumeAttachment = nil + model.CatalogOffering = nil + model.Zone = nil + model.NetworkAttachments = nil + model.PrimaryNetworkAttachment = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment + err = vpcv1.UnmarshalInstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface) + model.AvailabilityPolicy = nil + model.DefaultTrustedProfile = nil + model.Keys = nil + model.MetadataService = nil + model.Name = core.StringPtr("my-instance") + model.PlacementTarget = nil + model.Profile = nil + model.ReservationAffinity = nil + model.ResourceGroup = nil + model.TotalVolumeBandwidth = core.Int64Ptr(int64(500)) + model.UserData = core.StringPtr("testString") + model.VolumeAttachments = nil + model.VPC = nil + model.BootVolumeAttachment = nil + model.CatalogOffering = nil + model.Zone = nil + model.NetworkInterfaces = nil + model.PrimaryNetworkInterface = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface + err = vpcv1.UnmarshalInstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment) + model.AvailabilityPolicy = nil + model.DefaultTrustedProfile = nil + model.Keys = nil + model.MetadataService = nil + model.Name = core.StringPtr("my-instance") + model.PlacementTarget = nil + model.Profile = nil + model.ReservationAffinity = nil + model.ResourceGroup = nil + model.TotalVolumeBandwidth = core.Int64Ptr(int64(500)) + model.UserData = core.StringPtr("testString") + model.VolumeAttachments = nil + model.VPC = nil + model.BootVolumeAttachment = nil + model.Image = nil + model.Zone = nil + model.NetworkAttachments = nil + model.PrimaryNetworkAttachment = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment + err = vpcv1.UnmarshalInstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface) + model.AvailabilityPolicy = nil + model.DefaultTrustedProfile = nil + model.Keys = nil + model.MetadataService = nil + model.Name = core.StringPtr("my-instance") + model.PlacementTarget = nil + model.Profile = nil + model.ReservationAffinity = nil + model.ResourceGroup = nil + model.TotalVolumeBandwidth = core.Int64Ptr(int64(500)) + model.UserData = core.StringPtr("testString") + model.VolumeAttachments = nil + model.VPC = nil + model.BootVolumeAttachment = nil + model.Image = nil + model.Zone = nil + model.NetworkInterfaces = nil + model.PrimaryNetworkInterface = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface + err = vpcv1.UnmarshalInstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment) + model.AvailabilityPolicy = nil + model.DefaultTrustedProfile = nil + model.Keys = nil + model.MetadataService = nil + model.Name = core.StringPtr("my-instance") + model.PlacementTarget = nil + model.Profile = nil + model.ReservationAffinity = nil + model.ResourceGroup = nil + model.TotalVolumeBandwidth = core.Int64Ptr(int64(500)) + model.UserData = core.StringPtr("testString") + model.VolumeAttachments = nil + model.VPC = nil + model.BootVolumeAttachment = nil + model.Zone = nil + model.NetworkAttachments = nil + model.PrimaryNetworkAttachment = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment + err = vpcv1.UnmarshalInstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface) + model.AvailabilityPolicy = nil + model.DefaultTrustedProfile = nil + model.Keys = nil + model.MetadataService = nil + model.Name = core.StringPtr("my-instance") + model.PlacementTarget = nil + model.Profile = nil + model.ReservationAffinity = nil + model.ResourceGroup = nil + model.TotalVolumeBandwidth = core.Int64Ptr(int64(500)) + model.UserData = core.StringPtr("testString") + model.VolumeAttachments = nil + model.VPC = nil + model.BootVolumeAttachment = nil + model.Zone = nil + model.NetworkInterfaces = nil + model.PrimaryNetworkInterface = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface + err = vpcv1.UnmarshalInstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref + err = vpcv1.UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID) + model.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID + err = vpcv1.UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref + err = vpcv1.UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID) + model.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID + err = vpcv1.UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN + err = vpcv1.UnmarshalLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref + err = vpcv1.UnmarshalLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) + model.ID = core.StringPtr("0717_1e09281b-f177-46f2-b1f1-bc152b2e391a") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID + err = vpcv1.UnmarshalLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalNetworkInterfaceIPPrototypeReservedIPIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.NetworkInterfaceIPPrototypeReservedIPIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.NetworkInterfaceIPPrototypeReservedIPIdentityByHref + err = vpcv1.UnmarshalNetworkInterfaceIPPrototypeReservedIPIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalNetworkInterfaceIPPrototypeReservedIPIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.NetworkInterfaceIPPrototypeReservedIPIdentityByID) + model.ID = core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.NetworkInterfaceIPPrototypeReservedIPIdentityByID + err = vpcv1.UnmarshalNetworkInterfaceIPPrototypeReservedIPIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress) + model.Address = core.StringPtr("203.0.113.1") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress + err = vpcv1.UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN + err = vpcv1.UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref + err = vpcv1.UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID) + model.ID = core.StringPtr("39300233-9995-4806-89a5-3c1b6eb88689") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID + err = vpcv1.UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN + err = vpcv1.UnmarshalReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref + err = vpcv1.UnmarshalReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID) + model.ID = core.StringPtr("r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID + err = vpcv1.UnmarshalReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN + err = vpcv1.UnmarshalReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref + err = vpcv1.UnmarshalReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID) + model.ID = core.StringPtr("0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID + err = vpcv1.UnmarshalReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalRouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP) + model.Address = core.StringPtr("0.0.0.0") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP + err = vpcv1.UnmarshalRouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalRouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP) + model.Address = core.StringPtr("192.168.3.4") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP + err = vpcv1.UnmarshalRouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalRouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref + err = vpcv1.UnmarshalRouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalRouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID) + model.ID = core.StringPtr("a10a5771-dc23-442c-8460-c3601d8542f7") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID + err = vpcv1.UnmarshalRouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalRoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP) + model.Address = core.StringPtr("0.0.0.0") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP + err = vpcv1.UnmarshalRoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalRoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP) + model.Address = core.StringPtr("192.168.3.4") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP + err = vpcv1.UnmarshalRoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalRoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref + err = vpcv1.UnmarshalRoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalRoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID) + model.ID = core.StringPtr("a10a5771-dc23-442c-8460-c3601d8542f7") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID + err = vpcv1.UnmarshalRoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN + err = vpcv1.UnmarshalSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref + err = vpcv1.UnmarshalSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID) + model.ID = core.StringPtr("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID + err = vpcv1.UnmarshalSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN + err = vpcv1.UnmarshalSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref + err = vpcv1.UnmarshalSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID) + model.ID = core.StringPtr("r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID + err = vpcv1.UnmarshalSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN + err = vpcv1.UnmarshalShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref + err = vpcv1.UnmarshalShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID) + model.ID = core.StringPtr("0767-fa41aecb-4f21-423d-8082-630bfba1e1d9") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID + err = vpcv1.UnmarshalShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch) + model.Address = core.StringPtr("169.21.50.5") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch + err = vpcv1.UnmarshalVPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFqdnPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFqdnPatch) + model.Fqdn = core.StringPtr("my-service.example.com") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFqdnPatch + err = vpcv1.UnmarshalVPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFqdnPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch) + model.Address = core.StringPtr("169.21.50.5") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch + err = vpcv1.UnmarshalVPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFqdnPatch successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFqdnPatch) + model.Fqdn = core.StringPtr("my-service.example.com") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFqdnPatch + err = vpcv1.UnmarshalVPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFqdnPatch(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref + err = vpcv1.UnmarshalVirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByID) + model.ID = core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByID + err = vpcv1.UnmarshalVirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref + err = vpcv1.UnmarshalVirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID) + model.ID = core.StringPtr("0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID + err = vpcv1.UnmarshalVirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN) + model.CRN = core.StringPtr("crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN + err = vpcv1.UnmarshalVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref) + model.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref + err = vpcv1.UnmarshalVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID) + model.ID = core.StringPtr("r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5") + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID + err = vpcv1.UnmarshalVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity) + model.Iops = core.Int64Ptr(int64(10000)) + model.Name = core.StringPtr("my-volume") + model.Profile = nil + model.ResourceGroup = nil + model.UserTags = nil + model.Capacity = core.Int64Ptr(int64(100)) + model.EncryptionKey = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity + err = vpcv1.UnmarshalVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot) + model.Iops = core.Int64Ptr(int64(10000)) + model.Name = core.StringPtr("my-volume") + model.Profile = nil + model.ResourceGroup = nil + model.UserTags = nil + model.Capacity = core.Int64Ptr(int64(100)) + model.EncryptionKey = nil + model.SourceSnapshot = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot + err = vpcv1.UnmarshalVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup) + model.Name = core.StringPtr("my-instance-group-manager-action") + model.CronSpec = core.StringPtr("30 */2 * * 1-5") + model.Group = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup + err = vpcv1.UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager) + model.Name = core.StringPtr("my-instance-group-manager-action") + model.CronSpec = core.StringPtr("30 */2 * * 1-5") + model.Manager = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager + err = vpcv1.UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup) + model.Name = core.StringPtr("my-instance-group-manager-action") + model.RunAt = CreateMockDateTime("2019-01-01T12:00:00.000Z") + model.Group = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup + err = vpcv1.UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + It(`Invoke UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager successfully`, func() { + // Construct an instance of the model. + model := new(vpcv1.InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager) + model.Name = core.StringPtr("my-instance-group-manager-action") + model.RunAt = CreateMockDateTime("2019-01-01T12:00:00.000Z") + model.Manager = nil + + b, err := json.Marshal(model) + Expect(err).To(BeNil()) + + var raw map[string]json.RawMessage + err = json.Unmarshal(b, &raw) + Expect(err).To(BeNil()) + + var result *vpcv1.InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager + err = vpcv1.UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager(raw, &result) + Expect(err).To(BeNil()) + Expect(result).ToNot(BeNil()) + Expect(result).To(Equal(model)) + }) + }) + Describe(`Utility function tests`, func() { It(`Invoke CreateMockByteArray() successfully`, func() { mockByteArray := CreateMockByteArray("This is a test") @@ -109648,8 +122006,7 @@ var _ = Describe(`VpcV1`, func() { // func CreateMockByteArray(mockData string) *[]byte { - ba := make([]byte, 0) - ba = append(ba, mockData...) + ba := []byte(mockData) return &ba }