Added examples
This commit is contained in:
parent
93bae7115c
commit
c687b1bbea
|
@ -0,0 +1,229 @@
|
|||
/*
|
||||
Contract Reporting Service
|
||||
|
||||
Service to handle contract reporting.
|
||||
|
||||
API version: 1.0.0
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package dto
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// Version struct for Version
|
||||
type Version struct {
|
||||
// date-time the app has been compiled.
|
||||
BuildDate string `json:"buildDate" validate:"required"`
|
||||
// date-time the current build commit has be committed.
|
||||
CommitDate string `json:"commitDate" validate:"required"`
|
||||
// hash of the current build commit.
|
||||
CommitHash string `json:"commitHash" validate:"required"`
|
||||
// server description.
|
||||
Description string `json:"description" validate:"required"`
|
||||
// server version.
|
||||
Version string `json:"version" validate:"required"`
|
||||
}
|
||||
|
||||
// NewVersion instantiates a new Version 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 NewVersion(buildDate string, commitDate string, commitHash string, description string, version string) *Version {
|
||||
this := Version{}
|
||||
this.BuildDate = buildDate
|
||||
this.CommitDate = commitDate
|
||||
this.CommitHash = commitHash
|
||||
this.Description = description
|
||||
this.Version = version
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewVersionWithDefaults instantiates a new Version object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewVersionWithDefaults() *Version {
|
||||
this := Version{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetBuildDate returns the BuildDate field value
|
||||
func (o *Version) GetBuildDate() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.BuildDate
|
||||
}
|
||||
|
||||
// GetBuildDateOk returns a tuple with the BuildDate field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Version) GetBuildDateOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.BuildDate, true
|
||||
}
|
||||
|
||||
// SetBuildDate sets field value
|
||||
func (o *Version) SetBuildDate(v string) {
|
||||
o.BuildDate = v
|
||||
}
|
||||
|
||||
// GetCommitDate returns the CommitDate field value
|
||||
func (o *Version) GetCommitDate() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.CommitDate
|
||||
}
|
||||
|
||||
// GetCommitDateOk returns a tuple with the CommitDate field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Version) GetCommitDateOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.CommitDate, true
|
||||
}
|
||||
|
||||
// SetCommitDate sets field value
|
||||
func (o *Version) SetCommitDate(v string) {
|
||||
o.CommitDate = v
|
||||
}
|
||||
|
||||
// GetCommitHash returns the CommitHash field value
|
||||
func (o *Version) GetCommitHash() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.CommitHash
|
||||
}
|
||||
|
||||
// GetCommitHashOk returns a tuple with the CommitHash field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Version) GetCommitHashOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.CommitHash, true
|
||||
}
|
||||
|
||||
// SetCommitHash sets field value
|
||||
func (o *Version) SetCommitHash(v string) {
|
||||
o.CommitHash = v
|
||||
}
|
||||
|
||||
// GetDescription returns the Description field value
|
||||
func (o *Version) GetDescription() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Description
|
||||
}
|
||||
|
||||
// GetDescriptionOk returns a tuple with the Description field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Version) GetDescriptionOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Description, true
|
||||
}
|
||||
|
||||
// SetDescription sets field value
|
||||
func (o *Version) SetDescription(v string) {
|
||||
o.Description = v
|
||||
}
|
||||
|
||||
// GetVersion returns the Version field value
|
||||
func (o *Version) GetVersion() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Version
|
||||
}
|
||||
|
||||
// GetVersionOk returns a tuple with the Version field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Version) GetVersionOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Version, true
|
||||
}
|
||||
|
||||
// SetVersion sets field value
|
||||
func (o *Version) SetVersion(v string) {
|
||||
o.Version = v
|
||||
}
|
||||
|
||||
func (o Version) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if true {
|
||||
toSerialize["buildDate"] = o.BuildDate
|
||||
}
|
||||
if true {
|
||||
toSerialize["commitDate"] = o.CommitDate
|
||||
}
|
||||
if true {
|
||||
toSerialize["commitHash"] = o.CommitHash
|
||||
}
|
||||
if true {
|
||||
toSerialize["description"] = o.Description
|
||||
}
|
||||
if true {
|
||||
toSerialize["version"] = o.Version
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableVersion struct {
|
||||
value *Version
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableVersion) Get() *Version {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableVersion) Set(val *Version) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableVersion) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableVersion) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableVersion(val *Version) *NullableVersion {
|
||||
return &NullableVersion{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableVersion) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableVersion) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package dto
|
||||
|
||||
type Version struct {
|
||||
// date-time the app has been compiled.
|
||||
BuildDate string `json:"buildDate" validate:"required"`
|
||||
// date-time the current build commit has be committed.
|
||||
CommitDate string `json:"commitDate" validate:"required"`
|
||||
// hash of the current build commit.
|
||||
CommitHash string `json:"commitHash" validate:"required"`
|
||||
// server description.
|
||||
Description string `json:"description" validate:"required"`
|
||||
// server version.
|
||||
Version string `json:"version" validate:"required"`
|
||||
}
|
Loading…
Reference in New Issue