Skip to content

Commit

Permalink
Sdk update 20240126 134305 (#18)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
8 people authored Jan 26, 2024
1 parent 44442df commit a6e054a
Show file tree
Hide file tree
Showing 5 changed files with 211 additions and 97 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![Build Status](https://travis-ci.com/IBM/code-engine-go-sdk.svg?branch=main)](https://travis-ci.com/IBM/code-engine-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 Code Engine Go SDK 4.2.0
# IBM Cloud Code Engine Go SDK 4.3.0
Go client library to interact with the [Code Engine API](https://cloud.ibm.com/apidocs/codeengine).

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

<!-- toc -->

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

## Installation
The current version of this SDK: 4.2.0
The current version of this SDK: 4.3.0

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

Expand Down
120 changes: 113 additions & 7 deletions codeenginev2/code_engine_v2.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corp. 2023.
* (C) Copyright IBM Corp. 2024.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,7 +15,7 @@
*/

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

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

// The region of the project the resource is located in. Possible values: 'au-syd', 'br-sao', 'ca-tor', 'eu-de',
// 'eu-gb', 'jp-osa', 'jp-tok', 'us-east', 'us-south'.
Region *string `json:"region,omitempty"`

// The type of the app.
ResourceType *string `json:"resource_type,omitempty"`

Expand Down Expand Up @@ -3857,6 +3864,10 @@ func UnmarshalApp(m map[string]json.RawMessage, result interface{}) (err error)
if err != nil {
return
}
err = core.UnmarshalPrimitive(m, "region", &obj.Region)
if err != nil {
return
}
err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
if err != nil {
return
Expand Down Expand Up @@ -4237,6 +4248,10 @@ type AppRevision struct {
// The ID of the project the resource is located in.
ProjectID *string `json:"project_id,omitempty"`

// The region of the project the resource is located in. Possible values: 'au-syd', 'br-sao', 'ca-tor', 'eu-de',
// 'eu-gb', 'jp-osa', 'jp-tok', 'us-east', 'us-south'.
Region *string `json:"region,omitempty"`

// The type of the app revision.
ResourceType *string `json:"resource_type,omitempty"`

Expand Down Expand Up @@ -4375,6 +4390,10 @@ func UnmarshalAppRevision(m map[string]json.RawMessage, result interface{}) (err
if err != nil {
return
}
err = core.UnmarshalPrimitive(m, "region", &obj.Region)
if err != nil {
return
}
err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
if err != nil {
return
Expand Down Expand Up @@ -4733,6 +4752,10 @@ type Build struct {
// The ID of the project the resource is located in.
ProjectID *string `json:"project_id,omitempty"`

// The region of the project the resource is located in. Possible values: 'au-syd', 'br-sao', 'ca-tor', 'eu-de',
// 'eu-gb', 'jp-osa', 'jp-tok', 'us-east', 'us-south'.
Region *string `json:"region,omitempty"`

// The type of the build.
ResourceType *string `json:"resource_type,omitempty"`

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

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

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

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

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

// The region of the project the resource is located in. Possible values: 'au-syd', 'br-sao', 'ca-tor', 'eu-de',
// 'eu-gb', 'jp-osa', 'jp-tok', 'us-east', 'us-south'.
Region *string `json:"region,omitempty"`

// The type of the build run.
ResourceType *string `json:"resource_type,omitempty"`

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

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

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

// The region of the project the resource is located in. Possible values: 'au-syd', 'br-sao', 'ca-tor', 'eu-de',
// 'eu-gb', 'jp-osa', 'jp-tok', 'us-east', 'us-south'.
Region *string `json:"region,omitempty"`

// The type of the config map.
ResourceType *string `json:"resource_type,omitempty"`
}
Expand Down Expand Up @@ -5493,6 +5532,10 @@ func UnmarshalConfigMap(m map[string]json.RawMessage, result interface{}) (err e
if err != nil {
return
}
err = core.UnmarshalPrimitive(m, "region", &obj.Region)
if err != nil {
return
}
err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
if err != nil {
return
Expand Down Expand Up @@ -5930,7 +5973,7 @@ type CreateBuildOptions struct {
SourceURL *string `json:"source_url,omitempty"`

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

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

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

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

// Optional value to override the JOB_ARRAY_SIZE environment variable for a job run.
ScaleArraySizeVariableOverride *int64 `json:"scale_array_size_variable_override,omitempty"`

// Define a custom set of array indices as comma-separated list containing single values and hyphen-separated ranges
// like `5,12-14,23,27`. Each instance can pick up its array index via environment variable `JOB_INDEX`. The number of
// unique array indices specified here determines the number of job instances to run.
Expand Down Expand Up @@ -6739,6 +6785,12 @@ func (_options *CreateJobRunOptions) SetRunVolumeMounts(runVolumeMounts []Volume
return _options
}

// SetScaleArraySizeVariableOverride : Allow user to set ScaleArraySizeVariableOverride
func (_options *CreateJobRunOptions) SetScaleArraySizeVariableOverride(scaleArraySizeVariableOverride int64) *CreateJobRunOptions {
_options.ScaleArraySizeVariableOverride = core.Int64Ptr(scaleArraySizeVariableOverride)
return _options
}

// SetScaleArraySpec : Allow user to set ScaleArraySpec
func (_options *CreateJobRunOptions) SetScaleArraySpec(scaleArraySpec string) *CreateJobRunOptions {
_options.ScaleArraySpec = core.StringPtr(scaleArraySpec)
Expand Down Expand Up @@ -7365,6 +7417,10 @@ type DomainMapping struct {
// The ID of the project the resource is located in.
ProjectID *string `json:"project_id,omitempty"`

// The region of the project the resource is located in. Possible values: 'au-syd', 'br-sao', 'ca-tor', 'eu-de',
// 'eu-gb', 'jp-osa', 'jp-tok', 'us-east', 'us-south'.
Region *string `json:"region,omitempty"`

// The type of the CE Resource.
ResourceType *string `json:"resource_type,omitempty"`

Expand Down Expand Up @@ -7444,6 +7500,10 @@ func UnmarshalDomainMapping(m map[string]json.RawMessage, result interface{}) (e
if err != nil {
return
}
err = core.UnmarshalPrimitive(m, "region", &obj.Region)
if err != nil {
return
}
err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
if err != nil {
return
Expand Down Expand Up @@ -8180,6 +8240,12 @@ func (options *GetSecretOptions) SetHeaders(param map[string]string) *GetSecretO

// Job : Job is the response model for job resources.
type Job struct {
// Reference to a build that is associated with the job.
Build *string `json:"build,omitempty"`

// Reference to a buildrun that is associated with the job.
BuildRun *string `json:"build_run,omitempty"`

// The timestamp when the resource was created.
CreatedAt *string `json:"created_at,omitempty"`

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

// The region of the project the resource is located in. Possible values: 'au-syd', 'br-sao', 'ca-tor', 'eu-de',
// 'eu-gb', 'jp-osa', 'jp-tok', 'us-east', 'us-south'.
Region *string `json:"region,omitempty"`

// The type of the job.
ResourceType *string `json:"resource_type,omitempty"`

Expand Down Expand Up @@ -8298,6 +8368,14 @@ const (
// UnmarshalJob unmarshals an instance of Job from the specified map of raw messages.
func UnmarshalJob(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(Job)
err = core.UnmarshalPrimitive(m, "build", &obj.Build)
if err != nil {
return
}
err = core.UnmarshalPrimitive(m, "build_run", &obj.BuildRun)
if err != nil {
return
}
err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
if err != nil {
return
Expand Down Expand Up @@ -8330,6 +8408,10 @@ func UnmarshalJob(m map[string]json.RawMessage, result interface{}) (err error)
if err != nil {
return
}
err = core.UnmarshalPrimitive(m, "region", &obj.Region)
if err != nil {
return
}
err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
if err != nil {
return
Expand Down Expand Up @@ -8637,6 +8719,10 @@ type JobRun struct {
// The ID of the project the resource is located in.
ProjectID *string `json:"project_id,omitempty"`

// The region of the project the resource is located in. Possible values: 'au-syd', 'br-sao', 'ca-tor', 'eu-de',
// 'eu-gb', 'jp-osa', 'jp-tok', 'us-east', 'us-south'.
Region *string `json:"region,omitempty"`

// The type of the job run.
ResourceType *string `json:"resource_type,omitempty"`

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

// Optional value to override the JOB_ARRAY_SIZE environment variable for a job run.
ScaleArraySizeVariableOverride *int64 `json:"scale_array_size_variable_override,omitempty"`

// Define a custom set of array indices as comma-separated list containing single values and hyphen-separated ranges
// like `5,12-14,23,27`. Each instance can pick up its array index via environment variable `JOB_INDEX`. The number of
// unique array indices specified here determines the number of job instances to run.
Expand Down Expand Up @@ -8733,6 +8822,7 @@ const (
const (
JobRun_Status_Completed = "completed"
JobRun_Status_Failed = "failed"
JobRun_Status_Pending = "pending"
JobRun_Status_Running = "running"
)

Expand Down Expand Up @@ -8771,6 +8861,10 @@ func UnmarshalJobRun(m map[string]json.RawMessage, result interface{}) (err erro
if err != nil {
return
}
err = core.UnmarshalPrimitive(m, "region", &obj.Region)
if err != nil {
return
}
err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
if err != nil {
return
Expand Down Expand Up @@ -8803,6 +8897,10 @@ func UnmarshalJobRun(m map[string]json.RawMessage, result interface{}) (err erro
if err != nil {
return
}
err = core.UnmarshalPrimitive(m, "scale_array_size_variable_override", &obj.ScaleArraySizeVariableOverride)
if err != nil {
return
}
err = core.UnmarshalPrimitive(m, "scale_array_spec", &obj.ScaleArraySpec)
if err != nil {
return
Expand Down Expand Up @@ -10198,6 +10296,10 @@ type Secret struct {
// The ID of the project the resource is located in.
ProjectID *string `json:"project_id,omitempty"`

// The region of the project the resource is located in. Possible values: 'au-syd', 'br-sao', 'ca-tor', 'eu-de',
// 'eu-gb', 'jp-osa', 'jp-tok', 'us-east', 'us-south'.
Region *string `json:"region,omitempty"`

// The type of the secret.
ResourceType *string `json:"resource_type,omitempty"`

Expand Down Expand Up @@ -10256,6 +10358,10 @@ func UnmarshalSecret(m map[string]json.RawMessage, result interface{}) (err erro
if err != nil {
return
}
err = core.UnmarshalPrimitive(m, "region", &obj.Region)
if err != nil {
return
}
err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
if err != nil {
return
Expand Down
Loading

0 comments on commit a6e054a

Please sign in to comment.