mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
302 lines
7.1 KiB
Go
302 lines
7.1 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 Remark type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &Remark{}
|
|
|
|
// Remark struct for Remark
|
|
type Remark struct {
|
|
IsPublic *bool `json:"isPublic,omitempty"`
|
|
Score *string `json:"score,omitempty"`
|
|
Text *string `json:"text,omitempty"`
|
|
Timestamp *string `json:"timestamp,omitempty"`
|
|
User *string `json:"user,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _Remark Remark
|
|
|
|
// NewRemark instantiates a new Remark 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 NewRemark() *Remark {
|
|
this := Remark{}
|
|
return &this
|
|
}
|
|
|
|
// NewRemarkWithDefaults instantiates a new Remark 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 NewRemarkWithDefaults() *Remark {
|
|
this := Remark{}
|
|
return &this
|
|
}
|
|
|
|
// GetIsPublic returns the IsPublic field value if set, zero value otherwise.
|
|
func (o *Remark) GetIsPublic() bool {
|
|
if o == nil || IsNil(o.IsPublic) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.IsPublic
|
|
}
|
|
|
|
// GetIsPublicOk returns a tuple with the IsPublic field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Remark) GetIsPublicOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.IsPublic) {
|
|
return nil, false
|
|
}
|
|
return o.IsPublic, true
|
|
}
|
|
|
|
// HasIsPublic returns a boolean if a field has been set.
|
|
func (o *Remark) HasIsPublic() bool {
|
|
if o != nil && !IsNil(o.IsPublic) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetIsPublic gets a reference to the given bool and assigns it to the IsPublic field.
|
|
func (o *Remark) SetIsPublic(v bool) {
|
|
o.IsPublic = &v
|
|
}
|
|
|
|
// GetScore returns the Score field value if set, zero value otherwise.
|
|
func (o *Remark) GetScore() string {
|
|
if o == nil || IsNil(o.Score) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Score
|
|
}
|
|
|
|
// GetScoreOk returns a tuple with the Score field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Remark) GetScoreOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Score) {
|
|
return nil, false
|
|
}
|
|
return o.Score, true
|
|
}
|
|
|
|
// HasScore returns a boolean if a field has been set.
|
|
func (o *Remark) HasScore() bool {
|
|
if o != nil && !IsNil(o.Score) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetScore gets a reference to the given string and assigns it to the Score field.
|
|
func (o *Remark) SetScore(v string) {
|
|
o.Score = &v
|
|
}
|
|
|
|
// GetText returns the Text field value if set, zero value otherwise.
|
|
func (o *Remark) GetText() string {
|
|
if o == nil || IsNil(o.Text) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Text
|
|
}
|
|
|
|
// GetTextOk returns a tuple with the Text field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Remark) GetTextOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Text) {
|
|
return nil, false
|
|
}
|
|
return o.Text, true
|
|
}
|
|
|
|
// HasText returns a boolean if a field has been set.
|
|
func (o *Remark) HasText() bool {
|
|
if o != nil && !IsNil(o.Text) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetText gets a reference to the given string and assigns it to the Text field.
|
|
func (o *Remark) SetText(v string) {
|
|
o.Text = &v
|
|
}
|
|
|
|
// GetTimestamp returns the Timestamp field value if set, zero value otherwise.
|
|
func (o *Remark) GetTimestamp() string {
|
|
if o == nil || IsNil(o.Timestamp) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Timestamp
|
|
}
|
|
|
|
// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Remark) GetTimestampOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Timestamp) {
|
|
return nil, false
|
|
}
|
|
return o.Timestamp, true
|
|
}
|
|
|
|
// HasTimestamp returns a boolean if a field has been set.
|
|
func (o *Remark) HasTimestamp() bool {
|
|
if o != nil && !IsNil(o.Timestamp) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTimestamp gets a reference to the given string and assigns it to the Timestamp field.
|
|
func (o *Remark) SetTimestamp(v string) {
|
|
o.Timestamp = &v
|
|
}
|
|
|
|
// GetUser returns the User field value if set, zero value otherwise.
|
|
func (o *Remark) GetUser() string {
|
|
if o == nil || IsNil(o.User) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.User
|
|
}
|
|
|
|
// GetUserOk returns a tuple with the User field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Remark) GetUserOk() (*string, bool) {
|
|
if o == nil || IsNil(o.User) {
|
|
return nil, false
|
|
}
|
|
return o.User, true
|
|
}
|
|
|
|
// HasUser returns a boolean if a field has been set.
|
|
func (o *Remark) HasUser() bool {
|
|
if o != nil && !IsNil(o.User) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUser gets a reference to the given string and assigns it to the User field.
|
|
func (o *Remark) SetUser(v string) {
|
|
o.User = &v
|
|
}
|
|
|
|
func (o Remark) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o Remark) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.IsPublic) {
|
|
toSerialize["isPublic"] = o.IsPublic
|
|
}
|
|
if !IsNil(o.Score) {
|
|
toSerialize["score"] = o.Score
|
|
}
|
|
if !IsNil(o.Text) {
|
|
toSerialize["text"] = o.Text
|
|
}
|
|
if !IsNil(o.Timestamp) {
|
|
toSerialize["timestamp"] = o.Timestamp
|
|
}
|
|
if !IsNil(o.User) {
|
|
toSerialize["user"] = o.User
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *Remark) UnmarshalJSON(data []byte) (err error) {
|
|
varRemark := _Remark{}
|
|
|
|
err = json.Unmarshal(data, &varRemark)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = Remark(varRemark)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "isPublic")
|
|
delete(additionalProperties, "score")
|
|
delete(additionalProperties, "text")
|
|
delete(additionalProperties, "timestamp")
|
|
delete(additionalProperties, "user")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableRemark struct {
|
|
value *Remark
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableRemark) Get() *Remark {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableRemark) Set(val *Remark) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableRemark) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableRemark) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableRemark(val *Remark) *NullableRemark {
|
|
return &NullableRemark{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableRemark) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableRemark) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|