Skip to content

Commit a6e054a

Browse files
jasonpetwhitesource-ets[bot]michael-magrianreggeenrJohn Sartore
authored
Sdk update 20240126 134305 (#18)
Signed-off-by: Jason Peterson <[email protected]> Co-authored-by: whitesource-ets[bot] <328400+whitesource-ets[bot]@users.noreply.github.ibm.com> Co-authored-by: Michael Magrian <[email protected]> Co-authored-by: Enrico Regge <[email protected]> Co-authored-by: John Sartore <[email protected]> Co-authored-by: semantic-release-bot <[email protected]> Co-authored-by: whitesource-ets[bot] <409986+whitesource-ets[bot]@users.noreply.github.ibm.com> Co-authored-by: whitesource-ets[bot] <whitesource-ets[bot]@users.noreply.github.ibm.com>
1 parent 44442df commit a6e054a

File tree

5 files changed

+211
-97
lines changed

5 files changed

+211
-97
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[![Build Status](https://travis-ci.com/IBM/code-engine-go-sdk.svg?branch=main)](https://travis-ci.com/IBM/code-engine-go-sdk)
22
[![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)
33

4-
# IBM Cloud Code Engine Go SDK 4.2.0
4+
# IBM Cloud Code Engine Go SDK 4.3.0
55
Go client library to interact with the [Code Engine API](https://cloud.ibm.com/apidocs/codeengine).
66

77
## Table of Contents
@@ -17,7 +17,7 @@ Go client library to interact with the [Code Engine API](https://cloud.ibm.com/a
1717

1818
<!-- toc -->
1919

20-
- [IBM Cloud Code Engine Go SDK 4.2.0](#ibm-cloud-code-engine-go-sdk-310)
20+
- [IBM Cloud Code Engine Go SDK 4.3.0](#ibm-cloud-code-engine-go-sdk-310)
2121
- [Table of Contents](#table-of-contents)
2222
- [Overview](#overview)
2323
- [Prerequisites](#prerequisites)
@@ -52,7 +52,7 @@ Service Name | Package name
5252
* Go version 1.18 or above.
5353

5454
## Installation
55-
The current version of this SDK: 4.2.0
55+
The current version of this SDK: 4.3.0
5656

5757
There are a few different ways to download and install the Code Engine Go SDK project for use by your
5858
Go application:
@@ -85,7 +85,7 @@ to your `Gopkg.toml` file. Here is an example:
8585
```
8686
[[constraint]]
8787
name = "github.com/IBM/code-engine-go-sdk"
88-
version = "4.2.0"
88+
version = "4.3.0"
8989
9090
```
9191

codeenginev2/code_engine_v2.go

Lines changed: 113 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* (C) Copyright IBM Corp. 2023.
2+
* (C) Copyright IBM Corp. 2024.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
1515
*/
1616

1717
/*
18-
* IBM OpenAPI SDK Code Generator Version: 3.80.0-29334a73-20230925-151553
18+
* IBM OpenAPI SDK Code Generator Version: 3.84.1-55f6d880-20240110-194020
1919
*/
2020

2121
// Package codeenginev2 : Operations and models for the CodeEngineV2 service
@@ -1592,6 +1592,9 @@ func (codeEngine *CodeEngineV2) CreateJobRunWithContext(ctx context.Context, cre
15921592
if createJobRunOptions.RunVolumeMounts != nil {
15931593
body["run_volume_mounts"] = createJobRunOptions.RunVolumeMounts
15941594
}
1595+
if createJobRunOptions.ScaleArraySizeVariableOverride != nil {
1596+
body["scale_array_size_variable_override"] = createJobRunOptions.ScaleArraySizeVariableOverride
1597+
}
15951598
if createJobRunOptions.ScaleArraySpec != nil {
15961599
body["scale_array_spec"] = createJobRunOptions.ScaleArraySpec
15971600
}
@@ -3681,6 +3684,10 @@ type App struct {
36813684
// The ID of the project the resource is located in.
36823685
ProjectID *string `json:"project_id,omitempty"`
36833686

3687+
// The region of the project the resource is located in. Possible values: 'au-syd', 'br-sao', 'ca-tor', 'eu-de',
3688+
// 'eu-gb', 'jp-osa', 'jp-tok', 'us-east', 'us-south'.
3689+
Region *string `json:"region,omitempty"`
3690+
36843691
// The type of the app.
36853692
ResourceType *string `json:"resource_type,omitempty"`
36863693

@@ -3857,6 +3864,10 @@ func UnmarshalApp(m map[string]json.RawMessage, result interface{}) (err error)
38573864
if err != nil {
38583865
return
38593866
}
3867+
err = core.UnmarshalPrimitive(m, "region", &obj.Region)
3868+
if err != nil {
3869+
return
3870+
}
38603871
err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
38613872
if err != nil {
38623873
return
@@ -4237,6 +4248,10 @@ type AppRevision struct {
42374248
// The ID of the project the resource is located in.
42384249
ProjectID *string `json:"project_id,omitempty"`
42394250

4251+
// The region of the project the resource is located in. Possible values: 'au-syd', 'br-sao', 'ca-tor', 'eu-de',
4252+
// 'eu-gb', 'jp-osa', 'jp-tok', 'us-east', 'us-south'.
4253+
Region *string `json:"region,omitempty"`
4254+
42404255
// The type of the app revision.
42414256
ResourceType *string `json:"resource_type,omitempty"`
42424257

@@ -4375,6 +4390,10 @@ func UnmarshalAppRevision(m map[string]json.RawMessage, result interface{}) (err
43754390
if err != nil {
43764391
return
43774392
}
4393+
err = core.UnmarshalPrimitive(m, "region", &obj.Region)
4394+
if err != nil {
4395+
return
4396+
}
43784397
err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
43794398
if err != nil {
43804399
return
@@ -4733,6 +4752,10 @@ type Build struct {
47334752
// The ID of the project the resource is located in.
47344753
ProjectID *string `json:"project_id,omitempty"`
47354754

4755+
// The region of the project the resource is located in. Possible values: 'au-syd', 'br-sao', 'ca-tor', 'eu-de',
4756+
// 'eu-gb', 'jp-osa', 'jp-tok', 'us-east', 'us-south'.
4757+
Region *string `json:"region,omitempty"`
4758+
47364759
// The type of the build.
47374760
ResourceType *string `json:"resource_type,omitempty"`
47384761

@@ -4767,7 +4790,7 @@ type Build struct {
47674790
StatusDetails *BuildStatus `json:"status_details,omitempty"`
47684791

47694792
// Optional size for the build, which determines the amount of resources used. Build sizes are `small`, `medium`,
4770-
// `large`, `xlarge`.
4793+
// `large`, `xlarge`, `xxlarge`.
47714794
StrategySize *string `json:"strategy_size" validate:"required"`
47724795

47734796
// Optional path to the specification file that is used for build strategies for building an image.
@@ -4837,6 +4860,10 @@ func UnmarshalBuild(m map[string]json.RawMessage, result interface{}) (err error
48374860
if err != nil {
48384861
return
48394862
}
4863+
err = core.UnmarshalPrimitive(m, "region", &obj.Region)
4864+
if err != nil {
4865+
return
4866+
}
48404867
err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
48414868
if err != nil {
48424869
return
@@ -4969,7 +4996,7 @@ type BuildPatch struct {
49694996
SourceURL *string `json:"source_url,omitempty"`
49704997

49714998
// Optional size for the build, which determines the amount of resources used. Build sizes are `small`, `medium`,
4972-
// `large`, `xlarge`.
4999+
// `large`, `xlarge`, `xxlarge`.
49735000
StrategySize *string `json:"strategy_size,omitempty"`
49745001

49755002
// Optional path to the specification file that is used for build strategies for building an image.
@@ -5081,6 +5108,10 @@ type BuildRun struct {
50815108
// The ID of the project the resource is located in.
50825109
ProjectID *string `json:"project_id,omitempty"`
50835110

5111+
// The region of the project the resource is located in. Possible values: 'au-syd', 'br-sao', 'ca-tor', 'eu-de',
5112+
// 'eu-gb', 'jp-osa', 'jp-tok', 'us-east', 'us-south'.
5113+
Region *string `json:"region,omitempty"`
5114+
50845115
// The type of the build run.
50855116
ResourceType *string `json:"resource_type,omitempty"`
50865117

@@ -5118,7 +5149,7 @@ type BuildRun struct {
51185149
StatusDetails *BuildRunStatus `json:"status_details,omitempty"`
51195150

51205151
// Optional size for the build, which determines the amount of resources used. Build sizes are `small`, `medium`,
5121-
// `large`, `xlarge`.
5152+
// `large`, `xlarge`, `xxlarge`.
51225153
StrategySize *string `json:"strategy_size,omitempty"`
51235154

51245155
// Optional path to the specification file that is used for build strategies for building an image.
@@ -5200,6 +5231,10 @@ func UnmarshalBuildRun(m map[string]json.RawMessage, result interface{}) (err er
52005231
if err != nil {
52015232
return
52025233
}
5234+
err = core.UnmarshalPrimitive(m, "region", &obj.Region)
5235+
if err != nil {
5236+
return
5237+
}
52035238
err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
52045239
if err != nil {
52055240
return
@@ -5452,6 +5487,10 @@ type ConfigMap struct {
54525487
// The ID of the project the resource is located in.
54535488
ProjectID *string `json:"project_id,omitempty"`
54545489

5490+
// The region of the project the resource is located in. Possible values: 'au-syd', 'br-sao', 'ca-tor', 'eu-de',
5491+
// 'eu-gb', 'jp-osa', 'jp-tok', 'us-east', 'us-south'.
5492+
Region *string `json:"region,omitempty"`
5493+
54555494
// The type of the config map.
54565495
ResourceType *string `json:"resource_type,omitempty"`
54575496
}
@@ -5493,6 +5532,10 @@ func UnmarshalConfigMap(m map[string]json.RawMessage, result interface{}) (err e
54935532
if err != nil {
54945533
return
54955534
}
5535+
err = core.UnmarshalPrimitive(m, "region", &obj.Region)
5536+
if err != nil {
5537+
return
5538+
}
54965539
err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
54975540
if err != nil {
54985541
return
@@ -5930,7 +5973,7 @@ type CreateBuildOptions struct {
59305973
SourceURL *string `json:"source_url,omitempty"`
59315974

59325975
// Optional size for the build, which determines the amount of resources used. Build sizes are `small`, `medium`,
5933-
// `large`, `xlarge`.
5976+
// `large`, `xlarge`, `xxlarge`.
59345977
StrategySize *string `json:"strategy_size,omitempty"`
59355978

59365979
// Optional path to the specification file that is used for build strategies for building an image.
@@ -6096,7 +6139,7 @@ type CreateBuildRunOptions struct {
60966139
SourceURL *string `json:"source_url,omitempty"`
60976140

60986141
// Optional size for the build, which determines the amount of resources used. Build sizes are `small`, `medium`,
6099-
// `large`, `xlarge`.
6142+
// `large`, `xlarge`, `xxlarge`.
61006143
StrategySize *string `json:"strategy_size,omitempty"`
61016144

61026145
// Optional path to the specification file that is used for build strategies for building an image.
@@ -6607,6 +6650,9 @@ type CreateJobRunOptions struct {
66076650
// Optional mounts of config maps or a secrets.
66086651
RunVolumeMounts []VolumeMountPrototype `json:"run_volume_mounts,omitempty"`
66096652

6653+
// Optional value to override the JOB_ARRAY_SIZE environment variable for a job run.
6654+
ScaleArraySizeVariableOverride *int64 `json:"scale_array_size_variable_override,omitempty"`
6655+
66106656
// Define a custom set of array indices as comma-separated list containing single values and hyphen-separated ranges
66116657
// like `5,12-14,23,27`. Each instance can pick up its array index via environment variable `JOB_INDEX`. The number of
66126658
// unique array indices specified here determines the number of job instances to run.
@@ -6739,6 +6785,12 @@ func (_options *CreateJobRunOptions) SetRunVolumeMounts(runVolumeMounts []Volume
67396785
return _options
67406786
}
67416787

6788+
// SetScaleArraySizeVariableOverride : Allow user to set ScaleArraySizeVariableOverride
6789+
func (_options *CreateJobRunOptions) SetScaleArraySizeVariableOverride(scaleArraySizeVariableOverride int64) *CreateJobRunOptions {
6790+
_options.ScaleArraySizeVariableOverride = core.Int64Ptr(scaleArraySizeVariableOverride)
6791+
return _options
6792+
}
6793+
67426794
// SetScaleArraySpec : Allow user to set ScaleArraySpec
67436795
func (_options *CreateJobRunOptions) SetScaleArraySpec(scaleArraySpec string) *CreateJobRunOptions {
67446796
_options.ScaleArraySpec = core.StringPtr(scaleArraySpec)
@@ -7365,6 +7417,10 @@ type DomainMapping struct {
73657417
// The ID of the project the resource is located in.
73667418
ProjectID *string `json:"project_id,omitempty"`
73677419

7420+
// The region of the project the resource is located in. Possible values: 'au-syd', 'br-sao', 'ca-tor', 'eu-de',
7421+
// 'eu-gb', 'jp-osa', 'jp-tok', 'us-east', 'us-south'.
7422+
Region *string `json:"region,omitempty"`
7423+
73687424
// The type of the CE Resource.
73697425
ResourceType *string `json:"resource_type,omitempty"`
73707426

@@ -7444,6 +7500,10 @@ func UnmarshalDomainMapping(m map[string]json.RawMessage, result interface{}) (e
74447500
if err != nil {
74457501
return
74467502
}
7503+
err = core.UnmarshalPrimitive(m, "region", &obj.Region)
7504+
if err != nil {
7505+
return
7506+
}
74477507
err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
74487508
if err != nil {
74497509
return
@@ -8180,6 +8240,12 @@ func (options *GetSecretOptions) SetHeaders(param map[string]string) *GetSecretO
81808240

81818241
// Job : Job is the response model for job resources.
81828242
type Job struct {
8243+
// Reference to a build that is associated with the job.
8244+
Build *string `json:"build,omitempty"`
8245+
8246+
// Reference to a buildrun that is associated with the job.
8247+
BuildRun *string `json:"build_run,omitempty"`
8248+
81838249
// The timestamp when the resource was created.
81848250
CreatedAt *string `json:"created_at,omitempty"`
81858251

@@ -8210,6 +8276,10 @@ type Job struct {
82108276
// The ID of the project the resource is located in.
82118277
ProjectID *string `json:"project_id,omitempty"`
82128278

8279+
// The region of the project the resource is located in. Possible values: 'au-syd', 'br-sao', 'ca-tor', 'eu-de',
8280+
// 'eu-gb', 'jp-osa', 'jp-tok', 'us-east', 'us-south'.
8281+
Region *string `json:"region,omitempty"`
8282+
82138283
// The type of the job.
82148284
ResourceType *string `json:"resource_type,omitempty"`
82158285

@@ -8298,6 +8368,14 @@ const (
82988368
// UnmarshalJob unmarshals an instance of Job from the specified map of raw messages.
82998369
func UnmarshalJob(m map[string]json.RawMessage, result interface{}) (err error) {
83008370
obj := new(Job)
8371+
err = core.UnmarshalPrimitive(m, "build", &obj.Build)
8372+
if err != nil {
8373+
return
8374+
}
8375+
err = core.UnmarshalPrimitive(m, "build_run", &obj.BuildRun)
8376+
if err != nil {
8377+
return
8378+
}
83018379
err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
83028380
if err != nil {
83038381
return
@@ -8330,6 +8408,10 @@ func UnmarshalJob(m map[string]json.RawMessage, result interface{}) (err error)
83308408
if err != nil {
83318409
return
83328410
}
8411+
err = core.UnmarshalPrimitive(m, "region", &obj.Region)
8412+
if err != nil {
8413+
return
8414+
}
83338415
err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
83348416
if err != nil {
83358417
return
@@ -8637,6 +8719,10 @@ type JobRun struct {
86378719
// The ID of the project the resource is located in.
86388720
ProjectID *string `json:"project_id,omitempty"`
86398721

8722+
// The region of the project the resource is located in. Possible values: 'au-syd', 'br-sao', 'ca-tor', 'eu-de',
8723+
// 'eu-gb', 'jp-osa', 'jp-tok', 'us-east', 'us-south'.
8724+
Region *string `json:"region,omitempty"`
8725+
86408726
// The type of the job run.
86418727
ResourceType *string `json:"resource_type,omitempty"`
86428728

@@ -8666,6 +8752,9 @@ type JobRun struct {
86668752
// Optional mounts of config maps or a secrets.
86678753
RunVolumeMounts []VolumeMount `json:"run_volume_mounts" validate:"required"`
86688754

8755+
// Optional value to override the JOB_ARRAY_SIZE environment variable for a job run.
8756+
ScaleArraySizeVariableOverride *int64 `json:"scale_array_size_variable_override,omitempty"`
8757+
86698758
// Define a custom set of array indices as comma-separated list containing single values and hyphen-separated ranges
86708759
// like `5,12-14,23,27`. Each instance can pick up its array index via environment variable `JOB_INDEX`. The number of
86718760
// unique array indices specified here determines the number of job instances to run.
@@ -8733,6 +8822,7 @@ const (
87338822
const (
87348823
JobRun_Status_Completed = "completed"
87358824
JobRun_Status_Failed = "failed"
8825+
JobRun_Status_Pending = "pending"
87368826
JobRun_Status_Running = "running"
87378827
)
87388828

@@ -8771,6 +8861,10 @@ func UnmarshalJobRun(m map[string]json.RawMessage, result interface{}) (err erro
87718861
if err != nil {
87728862
return
87738863
}
8864+
err = core.UnmarshalPrimitive(m, "region", &obj.Region)
8865+
if err != nil {
8866+
return
8867+
}
87748868
err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
87758869
if err != nil {
87768870
return
@@ -8803,6 +8897,10 @@ func UnmarshalJobRun(m map[string]json.RawMessage, result interface{}) (err erro
88038897
if err != nil {
88048898
return
88058899
}
8900+
err = core.UnmarshalPrimitive(m, "scale_array_size_variable_override", &obj.ScaleArraySizeVariableOverride)
8901+
if err != nil {
8902+
return
8903+
}
88068904
err = core.UnmarshalPrimitive(m, "scale_array_spec", &obj.ScaleArraySpec)
88078905
if err != nil {
88088906
return
@@ -10198,6 +10296,10 @@ type Secret struct {
1019810296
// The ID of the project the resource is located in.
1019910297
ProjectID *string `json:"project_id,omitempty"`
1020010298

10299+
// The region of the project the resource is located in. Possible values: 'au-syd', 'br-sao', 'ca-tor', 'eu-de',
10300+
// 'eu-gb', 'jp-osa', 'jp-tok', 'us-east', 'us-south'.
10301+
Region *string `json:"region,omitempty"`
10302+
1020110303
// The type of the secret.
1020210304
ResourceType *string `json:"resource_type,omitempty"`
1020310305

@@ -10256,6 +10358,10 @@ func UnmarshalSecret(m map[string]json.RawMessage, result interface{}) (err erro
1025610358
if err != nil {
1025710359
return
1025810360
}
10361+
err = core.UnmarshalPrimitive(m, "region", &obj.Region)
10362+
if err != nil {
10363+
return
10364+
}
1025910365
err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
1026010366
if err != nil {
1026110367
return

0 commit comments

Comments
 (0)