mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
154 lines
3.5 KiB
Go
154 lines
3.5 KiB
Go
/*
|
|
Membership API
|
|
|
|
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
|
|
API version: 0.1.0
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package membershipclient
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the Error type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &Error{}
|
|
|
|
// Error struct for Error
|
|
type Error struct {
|
|
ErrorCode string `json:"errorCode"`
|
|
ErrorMessage *string `json:"errorMessage,omitempty"`
|
|
}
|
|
|
|
// NewError instantiates a new Error 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 NewError(errorCode string) *Error {
|
|
this := Error{}
|
|
this.ErrorCode = errorCode
|
|
return &this
|
|
}
|
|
|
|
// NewErrorWithDefaults instantiates a new Error 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 NewErrorWithDefaults() *Error {
|
|
this := Error{}
|
|
return &this
|
|
}
|
|
|
|
// GetErrorCode returns the ErrorCode field value
|
|
func (o *Error) GetErrorCode() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.ErrorCode
|
|
}
|
|
|
|
// GetErrorCodeOk returns a tuple with the ErrorCode field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Error) GetErrorCodeOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.ErrorCode, true
|
|
}
|
|
|
|
// SetErrorCode sets field value
|
|
func (o *Error) SetErrorCode(v string) {
|
|
o.ErrorCode = v
|
|
}
|
|
|
|
// GetErrorMessage returns the ErrorMessage field value if set, zero value otherwise.
|
|
func (o *Error) GetErrorMessage() string {
|
|
if o == nil || IsNil(o.ErrorMessage) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.ErrorMessage
|
|
}
|
|
|
|
// GetErrorMessageOk returns a tuple with the ErrorMessage field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Error) GetErrorMessageOk() (*string, bool) {
|
|
if o == nil || IsNil(o.ErrorMessage) {
|
|
return nil, false
|
|
}
|
|
return o.ErrorMessage, true
|
|
}
|
|
|
|
// HasErrorMessage returns a boolean if a field has been set.
|
|
func (o *Error) HasErrorMessage() bool {
|
|
if o != nil && !IsNil(o.ErrorMessage) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetErrorMessage gets a reference to the given string and assigns it to the ErrorMessage field.
|
|
func (o *Error) SetErrorMessage(v string) {
|
|
o.ErrorMessage = &v
|
|
}
|
|
|
|
func (o Error) MarshalJSON() ([]byte, error) {
|
|
toSerialize,err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o Error) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
toSerialize["errorCode"] = o.ErrorCode
|
|
if !IsNil(o.ErrorMessage) {
|
|
toSerialize["errorMessage"] = o.ErrorMessage
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableError struct {
|
|
value *Error
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableError) Get() *Error {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableError) Set(val *Error) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableError) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableError) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableError(val *Error) *NullableError {
|
|
return &NullableError{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableError) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableError) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|