Skip to content

Commit 1e1c334

Browse files
authored
feat(spec): update the sdk to the api spec version 2026-01-27 (#151)
Signed-off-by: Ujjwal Kumar <Ujjwal.Kumar1@ibm.com>
1 parent 7617751 commit 1e1c334

File tree

4 files changed

+251
-13
lines changed

4 files changed

+251
-13
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/IBM/vpc-go-sdk)
44
[![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)
55

6-
# IBM Cloud VPC Go SDK Version 0.79.0
6+
# IBM Cloud VPC Go SDK Version 0.80.0
77
Go client library to interact with the various [IBM Cloud VPC Services APIs](https://cloud.ibm.com/apidocs?category=vpc).
88

99
**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.
10-
Consider using v0.79.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.
10+
Consider using v0.80.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.
1111

1212
This SDK uses [Semantic Versioning](https://semver.org), and as such there may be backward-incompatible changes for any new `0.y.z` version.
1313
## Table of Contents
@@ -64,7 +64,7 @@ Use this command to download and install the VPC Go SDK service to allow your Go
6464
use it:
6565

6666
```
67-
go get github.com/IBM/vpc-go-sdk@v0.79.0
67+
go get github.com/IBM/vpc-go-sdk@v0.80.0
6868
```
6969

7070

@@ -90,7 +90,7 @@ to your `Gopkg.toml` file. Here is an example:
9090
```
9191
[[constraint]]
9292
name = "github.com/IBM/vpc-go-sdk/"
93-
version = "0.79.0"
93+
version = "0.80.0"
9494
```
9595

9696
Then run `dep ensure`.

common/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
package common
22

33
// Version of the SDK
4-
const Version = "0.79.0"
4+
const Version = "0.80.0"

vpcv1/vpc_v1.go

Lines changed: 242 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ type VpcV1 struct {
4747
Generation *int64
4848

4949
// The API version, in format `YYYY-MM-DD`. For the API behavior documented here, specify any date between `2025-12-09`
50-
// and `2026-01-22`.
50+
// and `2026-01-30`.
5151
Version *string
5252
}
5353

@@ -68,7 +68,7 @@ type VpcV1Options struct {
6868
Generation *int64
6969

7070
// The API version, in format `YYYY-MM-DD`. For the API behavior documented here, specify any date between `2025-12-09`
71-
// and `2026-01-22`.
71+
// and `2026-01-30`.
7272
Version *string
7373
}
7474

@@ -133,7 +133,7 @@ func NewVpcV1(options *VpcV1Options) (service *VpcV1, err error) {
133133
}
134134

135135
if options.Version == nil {
136-
options.Version = core.StringPtr("2026-01-20")
136+
options.Version = core.StringPtr("2026-01-27")
137137
}
138138

139139
service = &VpcV1{
@@ -35677,7 +35677,7 @@ func (vpc *VpcV1) UpdateVPNServerRouteWithContext(ctx context.Context, updateVPN
3567735677
return
3567835678
}
3567935679
func getServiceComponentInfo() *core.ProblemComponent {
35680-
return core.NewProblemComponent(DefaultServiceName, "2026-01-20")
35680+
return core.NewProblemComponent(DefaultServiceName, "2026-01-27")
3568135681
}
3568235682

3568335683
// AccountIdentity : Identifies an account by a unique property.
@@ -69355,6 +69355,8 @@ type InstanceProfile struct {
6935569355

6935669356
NetworkAttachmentCount InstanceProfileNetworkAttachmentCountIntf `json:"network_attachment_count" validate:"required"`
6935769357

69358+
NetworkBandwidthMode InstanceProfileNetworkBandwidthModeIntf `json:"network_bandwidth_mode" validate:"required"`
69359+
6935869360
NetworkInterfaceCount InstanceProfileNetworkInterfaceCountIntf `json:"network_interface_count" validate:"required"`
6935969361

6936069362
NumaCount InstanceProfileNumaCountIntf `json:"numa_count,omitempty"`
@@ -69498,6 +69500,11 @@ func UnmarshalInstanceProfile(m map[string]json.RawMessage, result interface{})
6949869500
err = core.SDKErrorf(err, "", "network_attachment_count-error", common.GetComponentInfo())
6949969501
return
6950069502
}
69503+
err = core.UnmarshalModel(m, "network_bandwidth_mode", &obj.NetworkBandwidthMode, UnmarshalInstanceProfileNetworkBandwidthMode)
69504+
if err != nil {
69505+
err = core.SDKErrorf(err, "", "network_bandwidth_mode-error", common.GetComponentInfo())
69506+
return
69507+
}
6950169508
err = core.UnmarshalModel(m, "network_interface_count", &obj.NetworkInterfaceCount, UnmarshalInstanceProfileNetworkInterfaceCount)
6950269509
if err != nil {
6950369510
err = core.SDKErrorf(err, "", "network_interface_count-error", common.GetComponentInfo())
@@ -70588,6 +70595,110 @@ func UnmarshalInstanceProfileNetworkAttachmentCount(m map[string]json.RawMessage
7058870595
return
7058970596
}
7059070597

70598+
// InstanceProfileNetworkBandwidthMode : InstanceProfileNetworkBandwidthMode struct
70599+
// Models which "extend" this model:
70600+
// - InstanceProfileNetworkBandwidthModeEnum
70601+
// - InstanceProfileNetworkBandwidthModeFixed
70602+
type InstanceProfileNetworkBandwidthMode struct {
70603+
// The default network bandwidth mode for this profile.
70604+
Default *string `json:"default,omitempty"`
70605+
70606+
// The type for this profile field.
70607+
Type *string `json:"type,omitempty"`
70608+
70609+
// The supported network bandwidth modes for an instance with this profile.
70610+
Values []string `json:"values,omitempty"`
70611+
70612+
// A network bandwidth mode:
70613+
//
70614+
// - `divided`: network bandwidth divided equally across the instance's network attachments
70615+
// (or the instance's network interfaces).
70616+
// - `pooled`: network bandwidth pooled among instance network attachments
70617+
// (or the instance's network interfaces).
70618+
//
70619+
// The enumerated values for this property may
70620+
// [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future.
70621+
Value *string `json:"value,omitempty"`
70622+
}
70623+
70624+
// Constants associated with the InstanceProfileNetworkBandwidthMode.Default property.
70625+
// The default network bandwidth mode for this profile.
70626+
const (
70627+
InstanceProfileNetworkBandwidthModeDefaultDividedConst = "divided"
70628+
InstanceProfileNetworkBandwidthModeDefaultPooledConst = "pooled"
70629+
)
70630+
70631+
// Constants associated with the InstanceProfileNetworkBandwidthMode.Type property.
70632+
// The type for this profile field.
70633+
const (
70634+
InstanceProfileNetworkBandwidthModeTypeEnumConst = "enum"
70635+
)
70636+
70637+
// Constants associated with the InstanceProfileNetworkBandwidthMode.Values property.
70638+
// A network bandwidth mode:
70639+
//
70640+
// - `divided`: network bandwidth divided equally across the instance's network attachments
70641+
// (or the instance's network interfaces).
70642+
// - `pooled`: network bandwidth pooled among instance network attachments
70643+
// (or the instance's network interfaces).
70644+
//
70645+
// The enumerated values for this property may
70646+
// [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future.
70647+
const (
70648+
InstanceProfileNetworkBandwidthModeValuesDividedConst = "divided"
70649+
InstanceProfileNetworkBandwidthModeValuesPooledConst = "pooled"
70650+
)
70651+
70652+
// Constants associated with the InstanceProfileNetworkBandwidthMode.Value property.
70653+
// A network bandwidth mode:
70654+
//
70655+
// - `divided`: network bandwidth divided equally across the instance's network attachments
70656+
// (or the instance's network interfaces).
70657+
// - `pooled`: network bandwidth pooled among instance network attachments
70658+
// (or the instance's network interfaces).
70659+
//
70660+
// The enumerated values for this property may
70661+
// [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future.
70662+
const (
70663+
InstanceProfileNetworkBandwidthModeValueDividedConst = "divided"
70664+
InstanceProfileNetworkBandwidthModeValuePooledConst = "pooled"
70665+
)
70666+
70667+
func (*InstanceProfileNetworkBandwidthMode) isaInstanceProfileNetworkBandwidthMode() bool {
70668+
return true
70669+
}
70670+
70671+
type InstanceProfileNetworkBandwidthModeIntf interface {
70672+
isaInstanceProfileNetworkBandwidthMode() bool
70673+
}
70674+
70675+
// UnmarshalInstanceProfileNetworkBandwidthMode unmarshals an instance of InstanceProfileNetworkBandwidthMode from the specified map of raw messages.
70676+
func UnmarshalInstanceProfileNetworkBandwidthMode(m map[string]json.RawMessage, result interface{}) (err error) {
70677+
obj := new(InstanceProfileNetworkBandwidthMode)
70678+
err = core.UnmarshalPrimitive(m, "default", &obj.Default)
70679+
if err != nil {
70680+
err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo())
70681+
return
70682+
}
70683+
err = core.UnmarshalPrimitive(m, "type", &obj.Type)
70684+
if err != nil {
70685+
err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo())
70686+
return
70687+
}
70688+
err = core.UnmarshalPrimitive(m, "values", &obj.Values)
70689+
if err != nil {
70690+
err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo())
70691+
return
70692+
}
70693+
err = core.UnmarshalPrimitive(m, "value", &obj.Value)
70694+
if err != nil {
70695+
err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo())
70696+
return
70697+
}
70698+
reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
70699+
return
70700+
}
70701+
7059170702
// InstanceProfileNetworkInterfaceCount : InstanceProfileNetworkInterfaceCount struct
7059270703
// Models which "extend" this model:
7059370704
// - InstanceProfileNetworkInterfaceCountRange
@@ -131262,6 +131373,133 @@ func UnmarshalInstanceProfileNetworkAttachmentCountRange(m map[string]json.RawMe
131262131373
return
131263131374
}
131264131375

131376+
// InstanceProfileNetworkBandwidthModeEnum : The permitted network bandwidth modes for an instance with this profile.
131377+
// This model "extends" InstanceProfileNetworkBandwidthMode
131378+
type InstanceProfileNetworkBandwidthModeEnum struct {
131379+
// The default network bandwidth mode for this profile.
131380+
Default *string `json:"default,omitempty"`
131381+
131382+
// The type for this profile field.
131383+
Type *string `json:"type" validate:"required"`
131384+
131385+
// The supported network bandwidth modes for an instance with this profile.
131386+
Values []string `json:"values" validate:"required"`
131387+
}
131388+
131389+
// Constants associated with the InstanceProfileNetworkBandwidthModeEnum.Default property.
131390+
// The default network bandwidth mode for this profile.
131391+
const (
131392+
InstanceProfileNetworkBandwidthModeEnumDefaultDividedConst = "divided"
131393+
InstanceProfileNetworkBandwidthModeEnumDefaultPooledConst = "pooled"
131394+
)
131395+
131396+
// Constants associated with the InstanceProfileNetworkBandwidthModeEnum.Type property.
131397+
// The type for this profile field.
131398+
const (
131399+
InstanceProfileNetworkBandwidthModeEnumTypeEnumConst = "enum"
131400+
)
131401+
131402+
// Constants associated with the InstanceProfileNetworkBandwidthModeEnum.Values property.
131403+
// A network bandwidth mode:
131404+
//
131405+
// - `divided`: network bandwidth divided equally across the instance's network attachments
131406+
// (or the instance's network interfaces).
131407+
// - `pooled`: network bandwidth pooled among instance network attachments
131408+
// (or the instance's network interfaces).
131409+
//
131410+
// The enumerated values for this property may
131411+
// [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future.
131412+
const (
131413+
InstanceProfileNetworkBandwidthModeEnumValuesDividedConst = "divided"
131414+
InstanceProfileNetworkBandwidthModeEnumValuesPooledConst = "pooled"
131415+
)
131416+
131417+
func (*InstanceProfileNetworkBandwidthModeEnum) isaInstanceProfileNetworkBandwidthMode() bool {
131418+
return true
131419+
}
131420+
131421+
// UnmarshalInstanceProfileNetworkBandwidthModeEnum unmarshals an instance of InstanceProfileNetworkBandwidthModeEnum from the specified map of raw messages.
131422+
func UnmarshalInstanceProfileNetworkBandwidthModeEnum(m map[string]json.RawMessage, result interface{}) (err error) {
131423+
obj := new(InstanceProfileNetworkBandwidthModeEnum)
131424+
err = core.UnmarshalPrimitive(m, "default", &obj.Default)
131425+
if err != nil {
131426+
err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo())
131427+
return
131428+
}
131429+
err = core.UnmarshalPrimitive(m, "type", &obj.Type)
131430+
if err != nil {
131431+
err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo())
131432+
return
131433+
}
131434+
err = core.UnmarshalPrimitive(m, "values", &obj.Values)
131435+
if err != nil {
131436+
err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo())
131437+
return
131438+
}
131439+
reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
131440+
return
131441+
}
131442+
131443+
// InstanceProfileNetworkBandwidthModeFixed : The network bandwidth mode for an instance with this profile.
131444+
// This model "extends" InstanceProfileNetworkBandwidthMode
131445+
type InstanceProfileNetworkBandwidthModeFixed struct {
131446+
// The type for this profile field.
131447+
Type *string `json:"type" validate:"required"`
131448+
131449+
// A network bandwidth mode:
131450+
//
131451+
// - `divided`: network bandwidth divided equally across the instance's network attachments
131452+
// (or the instance's network interfaces).
131453+
// - `pooled`: network bandwidth pooled among instance network attachments
131454+
// (or the instance's network interfaces).
131455+
//
131456+
// The enumerated values for this property may
131457+
// [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future.
131458+
Value *string `json:"value" validate:"required"`
131459+
}
131460+
131461+
// Constants associated with the InstanceProfileNetworkBandwidthModeFixed.Type property.
131462+
// The type for this profile field.
131463+
const (
131464+
InstanceProfileNetworkBandwidthModeFixedTypeFixedConst = "fixed"
131465+
)
131466+
131467+
// Constants associated with the InstanceProfileNetworkBandwidthModeFixed.Value property.
131468+
// A network bandwidth mode:
131469+
//
131470+
// - `divided`: network bandwidth divided equally across the instance's network attachments
131471+
// (or the instance's network interfaces).
131472+
// - `pooled`: network bandwidth pooled among instance network attachments
131473+
// (or the instance's network interfaces).
131474+
//
131475+
// The enumerated values for this property may
131476+
// [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future.
131477+
const (
131478+
InstanceProfileNetworkBandwidthModeFixedValueDividedConst = "divided"
131479+
InstanceProfileNetworkBandwidthModeFixedValuePooledConst = "pooled"
131480+
)
131481+
131482+
func (*InstanceProfileNetworkBandwidthModeFixed) isaInstanceProfileNetworkBandwidthMode() bool {
131483+
return true
131484+
}
131485+
131486+
// UnmarshalInstanceProfileNetworkBandwidthModeFixed unmarshals an instance of InstanceProfileNetworkBandwidthModeFixed from the specified map of raw messages.
131487+
func UnmarshalInstanceProfileNetworkBandwidthModeFixed(m map[string]json.RawMessage, result interface{}) (err error) {
131488+
obj := new(InstanceProfileNetworkBandwidthModeFixed)
131489+
err = core.UnmarshalPrimitive(m, "type", &obj.Type)
131490+
if err != nil {
131491+
err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo())
131492+
return
131493+
}
131494+
err = core.UnmarshalPrimitive(m, "value", &obj.Value)
131495+
if err != nil {
131496+
err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo())
131497+
return
131498+
}
131499+
reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
131500+
return
131501+
}
131502+
131265131503
// InstanceProfileNetworkInterfaceCountDependent : The number of network interfaces supported on an instance with this profile is dependent on its configuration.
131266131504
// This model "extends" InstanceProfileNetworkInterfaceCount
131267131505
type InstanceProfileNetworkInterfaceCountDependent struct {

0 commit comments

Comments
 (0)