diff --git a/README.md b/README.md index 55f4d5d..e6b13b3 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,11 @@ ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/IBM/vpc-go-sdk) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) -# IBM Cloud VPC Go SDK Version 0.49.0 +# IBM Cloud VPC Go SDK Version 0.49.1 Go client library to interact with the various [IBM Cloud VPC Services APIs](https://cloud.ibm.com/apidocs?category=vpc). **Note:** Given the current version of all VPC SDKs across supported languages and the current VPC API specification, we retracted the vpc-go-sdk version 1.x to version v0.6.0, which had the same features as v1.0.1. -Consider using v0.49.0 from now on. Refrain from using commands like `go get -u ..` and `go get ..@latest` on go 1.14 and lower as you will not get the latest release. +Consider using v0.49.1 from now on. Refrain from using commands like `go get -u ..` and `go get ..@latest` on go 1.14 and lower as you will not get the latest release. This SDK uses [Semantic Versioning](https://semver.org), and as such there may be backward-incompatible changes for any new `0.y.z` version. ## Table of Contents @@ -64,7 +64,7 @@ Use this command to download and install the VPC Go SDK service to allow your Go use it: ``` -go get github.com/IBM/vpc-go-sdk@v0.49.0 +go get github.com/IBM/vpc-go-sdk@v0.49.1 ``` @@ -90,7 +90,7 @@ to your `Gopkg.toml` file. Here is an example: ``` [[constraint]] name = "github.com/IBM/vpc-go-sdk/" - version = "0.49.0" + version = "0.49.1" ``` Then run `dep ensure`. diff --git a/common/version.go b/common/version.go index ad09fea..055e685 100644 --- a/common/version.go +++ b/common/version.go @@ -1,4 +1,4 @@ package common // Version of the SDK -const Version = "0.49.0" +const Version = "0.49.1" diff --git a/vpcv1/vpc_v1.go b/vpcv1/vpc_v1.go index 1035d23..c51a452 100644 --- a/vpcv1/vpc_v1.go +++ b/vpcv1/vpc_v1.go @@ -106054,22 +106054,76 @@ 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) { - // Retrieve discriminator value to determine correct "subclass". - var discValue string - err = core.UnmarshalPrimitive(m, "routing_protocol", &discValue) + obj := new(VPNGatewayConnectionRouteMode) + err = core.UnmarshalPrimitive(m, "admin_state_up", &obj.AdminStateUp) if err != nil { - err = fmt.Errorf("error unmarshalling discriminator property 'routing_protocol': %s", err.Error()) return } - if discValue == "" { - err = fmt.Errorf("required discriminator property 'routing_protocol' not found in JSON object") + err = core.UnmarshalPrimitive(m, "authentication_mode", &obj.AuthenticationMode) + if err != nil { return } - if discValue == "none" { - err = core.UnmarshalModel(m, "", result, UnmarshalVPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode) - } else { - err = fmt.Errorf("unrecognized value for discriminator property 'routing_protocol': %s", discValue) + err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) + if err != nil { + return + } + err = core.UnmarshalModel(m, "dead_peer_detection", &obj.DeadPeerDetection, UnmarshalVPNGatewayConnectionDpd) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "href", &obj.Href) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + return + } + err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalIkePolicyReference) + if err != nil { + return + } + err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalIPsecPolicyReference) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "mode", &obj.Mode) + if err != nil { + return } + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "peer_address", &obj.PeerAddress) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "psk", &obj.Psk) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "status", &obj.Status) + if err != nil { + return + } + err = core.UnmarshalModel(m, "status_reasons", &obj.StatusReasons, UnmarshalVPNGatewayConnectionStatusReason) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "routing_protocol", &obj.RoutingProtocol) + if err != nil { + return + } + err = core.UnmarshalModel(m, "tunnels", &obj.Tunnels, UnmarshalVPNGatewayConnectionStaticRouteModeTunnel) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return }