api-v1 golang #1

Merged
quentin merged 8 commits from v0.9.x into main 2023-11-28 15:36:13 +00:00
4 changed files with 27 additions and 36 deletions
Showing only changes of commit 6dad7660a9 - Show all commits

View file

@ -1010,7 +1010,10 @@ components:
properties:
version:
example: 13
format: int64
type: integer
required:
- version
type: object
KeyInfo:
example:

View file

@ -98,7 +98,7 @@ import (
)
func main() {
layoutVersion := *openapiclient.NewLayoutVersion() // LayoutVersion | Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster.
layoutVersion := *openapiclient.NewLayoutVersion(int64(13)) // LayoutVersion | Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
@ -225,7 +225,7 @@ import (
)
func main() {
layoutVersion := *openapiclient.NewLayoutVersion() // LayoutVersion | Reverting the staged changes is done by incrementing the version number and clearing the contents of the staged change list. Similarly to the CLI, the body must include the incremented version number, which MUST be 1 + the value of the currently existing layout in the cluster.
layoutVersion := *openapiclient.NewLayoutVersion(int64(13)) // LayoutVersion | Reverting the staged changes is done by incrementing the version number and clearing the contents of the staged change list. Similarly to the CLI, the body must include the incremented version number, which MUST be 1 + the value of the currently existing layout in the cluster.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)

View file

@ -4,13 +4,13 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Version** | Pointer to **int32** | | [optional]
**Version** | **int64** | |
## Methods
### NewLayoutVersion
`func NewLayoutVersion() *LayoutVersion`
`func NewLayoutVersion(version int64, ) *LayoutVersion`
NewLayoutVersion instantiates a new LayoutVersion object
This constructor will assign default values to properties that have it defined,
@ -27,28 +27,23 @@ but it doesn't guarantee that properties required by API are set
### GetVersion
`func (o *LayoutVersion) GetVersion() int32`
`func (o *LayoutVersion) GetVersion() int64`
GetVersion returns the Version field if non-nil, zero value otherwise.
### GetVersionOk
`func (o *LayoutVersion) GetVersionOk() (*int32, bool)`
`func (o *LayoutVersion) GetVersionOk() (*int64, bool)`
GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetVersion
`func (o *LayoutVersion) SetVersion(v int32)`
`func (o *LayoutVersion) SetVersion(v int64)`
SetVersion sets Version field to given value.
### HasVersion
`func (o *LayoutVersion) HasVersion() bool`
HasVersion returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -16,15 +16,16 @@ import (
// LayoutVersion struct for LayoutVersion
type LayoutVersion struct {
Version *int32 `json:"version,omitempty"`
Version int64 `json:"version"`
}
// NewLayoutVersion instantiates a new LayoutVersion object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewLayoutVersion() *LayoutVersion {
func NewLayoutVersion(version int64) *LayoutVersion {
this := LayoutVersion{}
this.Version = version
return &this
}
@ -36,41 +37,33 @@ func NewLayoutVersionWithDefaults() *LayoutVersion {
return &this
}
// GetVersion returns the Version field value if set, zero value otherwise.
func (o *LayoutVersion) GetVersion() int32 {
if o == nil || o.Version == nil {
var ret int32
// GetVersion returns the Version field value
func (o *LayoutVersion) GetVersion() int64 {
if o == nil {
var ret int64
return ret
}
return *o.Version
return o.Version
}
// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
// GetVersionOk returns a tuple with the Version field value
// and a boolean to check if the value has been set.
func (o *LayoutVersion) GetVersionOk() (*int32, bool) {
if o == nil || o.Version == nil {
func (o *LayoutVersion) GetVersionOk() (*int64, bool) {
if o == nil {
return nil, false
}
return o.Version, true
return &o.Version, true
}
// HasVersion returns a boolean if a field has been set.
func (o *LayoutVersion) HasVersion() bool {
if o != nil && o.Version != nil {
return true
}
return false
}
// SetVersion gets a reference to the given int32 and assigns it to the Version field.
func (o *LayoutVersion) SetVersion(v int32) {
o.Version = &v
// SetVersion sets field value
func (o *LayoutVersion) SetVersion(v int64) {
o.Version = v
}
func (o LayoutVersion) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Version != nil {
if true {
toSerialize["version"] = o.Version
}
return json.Marshal(toSerialize)