mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
231 lines
6.4 KiB
Go
231 lines
6.4 KiB
Go
/*
|
|
Hanzo Cloud API
|
|
|
|
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
|
|
|
API version: v1
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package hanzoai
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the IndexIndexVersion type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &IndexIndexVersion{}
|
|
|
|
// IndexIndexVersion struct for IndexIndexVersion
|
|
type IndexIndexVersion struct {
|
|
// CommitDate is empty here: this surface is a dialect implementation, not a build of Meilisearch, so there is no upstream commit to date.
|
|
CommitDate *string `json:"commitDate,omitempty"`
|
|
// CommitSha names the implementation (`hanzo-cloud`) rather than a build hash, so a client logging it records which server answered instead of implying a Meilisearch release.
|
|
CommitSha *string `json:"commitSha,omitempty"`
|
|
// PkgVersion is this dialect implementation's own version.
|
|
PkgVersion *string `json:"pkgVersion,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _IndexIndexVersion IndexIndexVersion
|
|
|
|
// NewIndexIndexVersion instantiates a new IndexIndexVersion 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 NewIndexIndexVersion() *IndexIndexVersion {
|
|
this := IndexIndexVersion{}
|
|
return &this
|
|
}
|
|
|
|
// NewIndexIndexVersionWithDefaults instantiates a new IndexIndexVersion 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 NewIndexIndexVersionWithDefaults() *IndexIndexVersion {
|
|
this := IndexIndexVersion{}
|
|
return &this
|
|
}
|
|
|
|
// GetCommitDate returns the CommitDate field value if set, zero value otherwise.
|
|
func (o *IndexIndexVersion) GetCommitDate() string {
|
|
if o == nil || IsNil(o.CommitDate) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.CommitDate
|
|
}
|
|
|
|
// GetCommitDateOk returns a tuple with the CommitDate field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IndexIndexVersion) GetCommitDateOk() (*string, bool) {
|
|
if o == nil || IsNil(o.CommitDate) {
|
|
return nil, false
|
|
}
|
|
return o.CommitDate, true
|
|
}
|
|
|
|
// HasCommitDate returns a boolean if a field has been set.
|
|
func (o *IndexIndexVersion) HasCommitDate() bool {
|
|
if o != nil && !IsNil(o.CommitDate) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCommitDate gets a reference to the given string and assigns it to the CommitDate field.
|
|
func (o *IndexIndexVersion) SetCommitDate(v string) {
|
|
o.CommitDate = &v
|
|
}
|
|
|
|
// GetCommitSha returns the CommitSha field value if set, zero value otherwise.
|
|
func (o *IndexIndexVersion) GetCommitSha() string {
|
|
if o == nil || IsNil(o.CommitSha) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.CommitSha
|
|
}
|
|
|
|
// GetCommitShaOk returns a tuple with the CommitSha field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IndexIndexVersion) GetCommitShaOk() (*string, bool) {
|
|
if o == nil || IsNil(o.CommitSha) {
|
|
return nil, false
|
|
}
|
|
return o.CommitSha, true
|
|
}
|
|
|
|
// HasCommitSha returns a boolean if a field has been set.
|
|
func (o *IndexIndexVersion) HasCommitSha() bool {
|
|
if o != nil && !IsNil(o.CommitSha) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCommitSha gets a reference to the given string and assigns it to the CommitSha field.
|
|
func (o *IndexIndexVersion) SetCommitSha(v string) {
|
|
o.CommitSha = &v
|
|
}
|
|
|
|
// GetPkgVersion returns the PkgVersion field value if set, zero value otherwise.
|
|
func (o *IndexIndexVersion) GetPkgVersion() string {
|
|
if o == nil || IsNil(o.PkgVersion) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.PkgVersion
|
|
}
|
|
|
|
// GetPkgVersionOk returns a tuple with the PkgVersion field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IndexIndexVersion) GetPkgVersionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.PkgVersion) {
|
|
return nil, false
|
|
}
|
|
return o.PkgVersion, true
|
|
}
|
|
|
|
// HasPkgVersion returns a boolean if a field has been set.
|
|
func (o *IndexIndexVersion) HasPkgVersion() bool {
|
|
if o != nil && !IsNil(o.PkgVersion) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPkgVersion gets a reference to the given string and assigns it to the PkgVersion field.
|
|
func (o *IndexIndexVersion) SetPkgVersion(v string) {
|
|
o.PkgVersion = &v
|
|
}
|
|
|
|
func (o IndexIndexVersion) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o IndexIndexVersion) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.CommitDate) {
|
|
toSerialize["commitDate"] = o.CommitDate
|
|
}
|
|
if !IsNil(o.CommitSha) {
|
|
toSerialize["commitSha"] = o.CommitSha
|
|
}
|
|
if !IsNil(o.PkgVersion) {
|
|
toSerialize["pkgVersion"] = o.PkgVersion
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *IndexIndexVersion) UnmarshalJSON(data []byte) (err error) {
|
|
varIndexIndexVersion := _IndexIndexVersion{}
|
|
|
|
err = json.Unmarshal(data, &varIndexIndexVersion)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = IndexIndexVersion(varIndexIndexVersion)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "commitDate")
|
|
delete(additionalProperties, "commitSha")
|
|
delete(additionalProperties, "pkgVersion")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableIndexIndexVersion struct {
|
|
value *IndexIndexVersion
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableIndexIndexVersion) Get() *IndexIndexVersion {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableIndexIndexVersion) Set(val *IndexIndexVersion) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableIndexIndexVersion) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableIndexIndexVersion) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableIndexIndexVersion(val *IndexIndexVersion) *NullableIndexIndexVersion {
|
|
return &NullableIndexIndexVersion{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableIndexIndexVersion) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableIndexIndexVersion) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|