Skip to content

Commit

Permalink
fix(vpngwc): updated the UnmarshalVPNGatewayConnectionRouteMode for v…
Browse files Browse the repository at this point in the history
…pn gateway connection (#89)

* fix(vpngwc): updated the UnmarshalVPNGatewayConnectionRouteMode for vpn gateway connection

Signed-off-by: Ujjwal Kumar <Ujjwal.Kumar1@ibm.com>

* fix(vpngwc): updated the UnmarshalVPNGatewayConnectionRouteMode for vpn gateway connection

Signed-off-by: Ujjwal Kumar <Ujjwal.Kumar1@ibm.com>

---------

Signed-off-by: Ujjwal Kumar <Ujjwal.Kumar1@ibm.com>
  • Loading branch information
ujjwal-ibm committed Mar 21, 2024
1 parent aebbd97 commit be810ca
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 15 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
```


Expand All @@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion common/version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package common

// Version of the SDK
const Version = "0.49.0"
const Version = "0.49.1"
74 changes: 64 additions & 10 deletions vpcv1/vpc_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit be810ca

Please sign in to comment.