Skip to content

Commit

Permalink
feat(2023-02-14): updated the sdk as per the api spec released on 202…
Browse files Browse the repository at this point in the history
…3-02-14 (#66)

Signed-off-by: Ujjwal Kumar <Ujjwal.Kumar1@ibm.com>
  • Loading branch information
ujjwal-ibm committed Feb 16, 2023
1 parent ed0310a commit 0356e37
Show file tree
Hide file tree
Showing 4 changed files with 151 additions and 29 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.31.0
# IBM Cloud VPC Go SDK Version 0.32.0
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.31.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.32.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.

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.31.0
go get github.com/IBM/vpc-go-sdk@v0.32.0
```


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.31.0"
version = "0.32.0"
```

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.31.0"
const Version = "0.32.0"
86 changes: 85 additions & 1 deletion vpcv1/vpc_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,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: 2023-02-07
// API Version: 2023-02-14
type VpcV1 struct {
Service *core.BaseService

Expand Down Expand Up @@ -41992,15 +41992,43 @@ func UnmarshalInstanceInitializationPassword(m map[string]json.RawMessage, resul
type InstanceMetadataService struct {
// Indicates whether the metadata service endpoint is available to the virtual server instance.
Enabled *bool `json:"enabled" validate:"required"`

// The communication protocol to use for the metadata service endpoint. Applies only when the metadata service is
// enabled.
// - `http`: HTTP protocol (unencrypted)
// - `https`: HTTP Secure protocol.
Protocol *string `json:"protocol" validate:"required"`

// The hop limit (IP time to live) for IP response packets from the metadata service. Applies only when the metadata
// service is enabled.
ResponseHopLimit *int64 `json:"response_hop_limit" validate:"required"`
}

// Constants associated with the InstanceMetadataService.Protocol property.
// The communication protocol to use for the metadata service endpoint. Applies only when the metadata service is
// enabled.
// - `http`: HTTP protocol (unencrypted)
// - `https`: HTTP Secure protocol.
const (
InstanceMetadataServiceProtocolHTTPConst = "http"
InstanceMetadataServiceProtocolHTTPSConst = "https"
)

// UnmarshalInstanceMetadataService unmarshals an instance of InstanceMetadataService from the specified map of raw messages.
func UnmarshalInstanceMetadataService(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(InstanceMetadataService)
err = core.UnmarshalPrimitive(m, "enabled", &obj.Enabled)
if err != nil {
return
}
err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
if err != nil {
return
}
err = core.UnmarshalPrimitive(m, "response_hop_limit", &obj.ResponseHopLimit)
if err != nil {
return
}
reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
return
}
Expand All @@ -42009,15 +42037,43 @@ func UnmarshalInstanceMetadataService(m map[string]json.RawMessage, result inter
type InstanceMetadataServicePatch struct {
// Indicates whether the metadata service endpoint will be available to the virtual server instance.
Enabled *bool `json:"enabled,omitempty"`

// The communication protocol to use for the metadata service endpoint. Applies only when the metadata service is
// enabled.
// - `http`: HTTP protocol (unencrypted)
// - `https`: HTTP Secure protocol.
Protocol *string `json:"protocol,omitempty"`

// The hop limit (IP time to live) for IP response packets from the metadata service. Applies only when the metadata
// service is enabled.
ResponseHopLimit *int64 `json:"response_hop_limit,omitempty"`
}

// Constants associated with the InstanceMetadataServicePatch.Protocol property.
// The communication protocol to use for the metadata service endpoint. Applies only when the metadata service is
// enabled.
// - `http`: HTTP protocol (unencrypted)
// - `https`: HTTP Secure protocol.
const (
InstanceMetadataServicePatchProtocolHTTPConst = "http"
InstanceMetadataServicePatchProtocolHTTPSConst = "https"
)

// UnmarshalInstanceMetadataServicePatch unmarshals an instance of InstanceMetadataServicePatch from the specified map of raw messages.
func UnmarshalInstanceMetadataServicePatch(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(InstanceMetadataServicePatch)
err = core.UnmarshalPrimitive(m, "enabled", &obj.Enabled)
if err != nil {
return
}
err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
if err != nil {
return
}
err = core.UnmarshalPrimitive(m, "response_hop_limit", &obj.ResponseHopLimit)
if err != nil {
return
}
reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
return
}
Expand All @@ -42026,15 +42082,43 @@ func UnmarshalInstanceMetadataServicePatch(m map[string]json.RawMessage, result
type InstanceMetadataServicePrototype struct {
// Indicates whether the metadata service endpoint will be available to the virtual server instance.
Enabled *bool `json:"enabled,omitempty"`

// The communication protocol to use for the metadata service endpoint. Applies only when the metadata service is
// enabled.
// - `http`: HTTP protocol (unencrypted)
// - `https`: HTTP Secure protocol.
Protocol *string `json:"protocol,omitempty"`

// The hop limit (IP time to live) for IP response packets from the metadata service. Applies only when the metadata
// service is enabled.
ResponseHopLimit *int64 `json:"response_hop_limit,omitempty"`
}

// Constants associated with the InstanceMetadataServicePrototype.Protocol property.
// The communication protocol to use for the metadata service endpoint. Applies only when the metadata service is
// enabled.
// - `http`: HTTP protocol (unencrypted)
// - `https`: HTTP Secure protocol.
const (
InstanceMetadataServicePrototypeProtocolHTTPConst = "http"
InstanceMetadataServicePrototypeProtocolHTTPSConst = "https"
)

// UnmarshalInstanceMetadataServicePrototype unmarshals an instance of InstanceMetadataServicePrototype from the specified map of raw messages.
func UnmarshalInstanceMetadataServicePrototype(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(InstanceMetadataServicePrototype)